Skip to content

Commit

Permalink
project: rearrange folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Mah Neh committed Sep 19, 2024
1 parent 95fe358 commit abd9cf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions pip_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ def build() -> None | Path:
shutil.copy(fname, build_directory / fname)

os.chdir(build_directory) # build
# # Restructure the codebase so that source files live in
# # `keras_tuner/src`
# Restructure the codebase so that source files live in
# `keras_tuner/src`
namex.convert_codebase(str(package), code_directory="src")

# # # Generate API __init__.py files in `keras_tuner/`
# Generate API __init__.py files in `keras_tuner/`
namex.generate_api_files(
str(package),
code_directory="src",
Expand All @@ -67,9 +67,8 @@ def build() -> None | Path:
f.write("\n\n" + version_string)

command = ["python3", "-m", "build"]
subprocess.run(command, check=True)
subprocess.run(command, check=True) # noqa: S603

# # # Save the dist files generated by the build process
os.chdir("..")
if not dist_directory.exists():
dist_directory.mkdir()
Expand Down Expand Up @@ -97,7 +96,7 @@ def install_whl(whl_fpath: Path) -> None:
"--force-reinstall",
"--no-dependencies",
]
subprocess.run(command, check=True)
subprocess.run(command, shell=False, check=True) # noqa: S603


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ docstring-code-line-length = "dynamic"

[tool.pytest.ini_options]
addopts = "-vv -p no:warnings --log-cli-level=CRITICAL --durations=10"
norecursedirs = "build src"
# norecursedirs = "build"

[tool.coverage.report]
exclude_lines = ["pragma: no cover", "@abstract", "raise NotImplementedError"]
Expand Down

0 comments on commit abd9cf9

Please sign in to comment.