Skip to content

Commit 573adc9

Browse files
committed
Add documentation related to CABLE local checkout and benchcab clean
1 parent a9f9638 commit 573adc9

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

benchcab/cli.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,18 @@ def generate_parser(app: Benchcab) -> argparse.ArgumentParser:
231231
help="Cleanup files created by running benchcab.",
232232
description="""Removes src/ and runs/ directories, along with log files in the
233233
project root directory. The user has to specify which stage of files to remove
234-
via \{all, realisations, submissions\} subcommand""",
234+
via \{all, realisations, submissions\} subcommand.""",
235235
add_help=False,
236236
)
237237

238238
parser_clean.add_argument(
239-
"clean_option", choices=["all", "realisations", "submissions"]
239+
"clean_option",
240+
choices=["all", "realisations", "submissions"],
241+
help="""Can be one of three options:
242+
243+
submissions: deletes src/ and revision log files
244+
realisations: deletes runs/ and benchmark submission files
245+
all: deletes in both stages of submissions and realisations""",
240246
)
241247

242248
parser_clean.set_defaults(func=app.clean)

docs/user_guide/config_options.md

+15
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,21 @@ realisations:
352352

353353
: **Default:** URL of the [CABLE GitHub repository][cable-github], _optional key_. :octicons-dash-24: Specify the GitHub repository url to clone from when checking out the branch.
354354

355+
#### [`local`](#+repo.local){ #+repo.local}
356+
357+
Contains settings to specify CABLE checkouts on a local repository.
358+
359+
```yaml
360+
realisations:
361+
- repo:
362+
local:
363+
path: /scratch/tm70/ab1234/CABLE
364+
```
365+
366+
[`path`](#+repo.local.path){ #+repo.local.path}
367+
368+
: **Default:** _required key, no default_. :octicons-dash-24: Specify the local checkout path of CABLE branch.
369+
355370
### [name](#name)
356371

357372
: **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.

docs/user_guide/index.md

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ The tool will follow the steps:
9191
3. Setup and launch a PBS job to run the flux site simulations in parallel. When `benchcab` launches the PBS job, it will print out the job ID to the terminal. You can check the status of the job with `qstat`. `benchcab` will not warn you when the simulations are over.
9292
4. Setup and run an ensemble of offline spatial runs using the [`payu`][payu-github] framework.
9393

94+
!!! info
95+
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.
96+
97+
!!! warning
98+
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`.
99+
94100
!!! tip "Expected output"
95101

96102
You can see [an example of the expected output](expected_output.md) printed out to the screen by `benchcab run` to check if the tool has worked as expected.

0 commit comments

Comments
 (0)