Skip to content

Commit

Permalink
Remove dependency on internal.CWD, test improvements on #255
Browse files Browse the repository at this point in the history
Co-authored-by: Claire Carouge <[email protected]>
  • Loading branch information
abhaasgoyal and ccarouge committed Mar 6, 2024
1 parent d26fa61 commit 2bf9820
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions benchcab/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ def generate_parser(app: Benchcab) -> argparse.ArgumentParser:
choices=["all", "realisations", "submissions"],
help="""Can be one of three options:
submissions: deletes src/ and revision log files
realisations: deletes runs/ and benchmark submission files
realisations: deletes src/
submissions: deletes runs/ and benchmark submission files
all: deletes in both stages of submissions and realisations""",
)

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ realisations:

### [name](#name)

: **Default:** base name of [branch_path](#+repo.svn.branch_path) if an SVN repository is given, for Git repositories the default is the branch name, _optional key_. :octicons-dash-24: An alias name used internally by `benchcab` for the branch. The `name` key also specifies the directory name of the source code when retrieving from SVN or GitHub.
: **Default:** base name of [branch_path](#+repo.svn.branch_path) if an SVN repository is given; the branch name if a git repository is given; the folder name if a local path is given, _optional key_. :octicons-dash-24: An alias name used internally by `benchcab` for the branch. The `name` key also specifies the directory name of the source code when retrieving from SVN, GitHub or local.

```yaml
realisations:
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The tool will follow the steps:
In case the code branches are already checked out before running Step (1) - `benchcab` will fail. This could happen on re-runs of `benchcab`. In that case, run `benchcab clean realisations` before the `checkout` step.

!!! warning
It is dangerous to delete `src/` via `rm -rf`, since `src/` may contain symlinks to local directories that could also be affected. Use `benchcab clean realisations` instead, which would also delete unecessary log files like `rev_number-*.log`.
It is dangerous to delete `src/` via `rm -rf`, since `src/` may contain symlinks to local directories that could also be affected. Use `benchcab clean realisations` instead.

!!! tip "Expected output"

Expand Down
2 changes: 0 additions & 2 deletions tests/test_workdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,11 @@ def test_clean_realisation_files_local(
self,
local_cable_src_path: Path,
src_path_with_local: Path,
revision_log_files: List[Path],
):
"""Success case: Local realisation files created by benchcab are removed after clean."""
clean_realisation_files()
assert local_cable_src_path.exists()
assert not src_path_with_local.exists()
assert not self._check_if_any_files_exist(revision_log_files)

def test_clean_realisation_files_git(
self, src_path_with_git: Path, revision_log_files: Path
Expand Down

0 comments on commit 2bf9820

Please sign in to comment.