Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-basevi committed May 17, 2024
1 parent ff8597d commit 341afe2
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@ The checksum pytests are used for reproducibility CI checks in the [ACCESS-NRI/r
Code from these tests is adapted from COSIMAS's ACCESS-OM2's [
bit reproducibility tests](https://github.com/COSIMA/access-om2/blob/master/test/test_bit_reproducibility.py).

### How to run tests manually
### How to run tests manually (from a local install of model-config-tests)

1. First clone the pytest code into a separate directory.
```sh
git clone https://github.com/ACCESS-NRI/model-config-tests/ test-code
git clone https://github.com/ACCESS-NRI/model-config-tests/ model-config-tests
```

2. To create a local install of `model-config-tests`
```sh
cd model-config-tests
pip install --user -e .
model-config-tests --help # model-config-tests runs the pytest command for tests in the package
```

2. Checkout an experiment (in this case it is using an ACCESS-OM2 config)
Expand All @@ -30,7 +37,7 @@ module load payu/1.1

4. Run the pytests
```sh
pytest <path/to/test-code>
model-config-tests
```

### Pytest Options
Expand All @@ -44,7 +51,7 @@ This output directory also contains files generated by pytests, including the `C
To specify a different folder for pytest outputs, use `--output-path` command flag, for example:

```sh
pytest <path/to/test-code> --output-path /some/other/path/for/output
model-config-tests --output-path /some/other/path/for/output
```

By default, the control directory, e.g. the model configuration to test, is the current working directory. This can be set similarly to above by using the
Expand All @@ -57,13 +64,13 @@ file which is stored in the control directory.
To run only CI reproducibility checksum tests, use `-m checksum`, e.g.

```sh
pytest <path/to/test-code> -m checksum
model-config-tests -m checksum
```

To run quick configuration tests, use the `config` marker. To additionally run
ACCESS-OM2 specific quick configuration tests, use `access_om2` marker,
e.g.:

```sh
pytest <path/to/test-code> -m "config or access_om2"
model-config-tests -m "config or access_om2"
```

0 comments on commit 341afe2

Please sign in to comment.