Skip to content

Commit 66dc6f4

Browse files
committed
Update dev_docs for Prysk
1 parent e38083a commit 66dc6f4

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

docs/contribute/DEV_DOCS.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ They can be helpful for testing a real-world example and determining if a regres
6161

6262
#### 3. Functional tests
6363

64-
Augur's command line interface is tested by functional tests implemented with the [Cram framework](https://bitheap.org/cram/).
64+
Augur's command line interface is tested by functional tests implemented with the [Prysk framework](https://www.prysk.net/).
6565
These tests complement existing unit tests of individual augur Python functions by running augur commands in the shell and confirming that these commands:
6666

6767
1. execute without any errors
6868
2. produce exactly the expected outputs for the given inputs
6969

7070
These tests can reveal bugs resulting from untested internal functions or untested combinations fo internal functions.
7171

72-
Over time, we have changed the way we design and organize Augur's Cram tests. You might find older practices in existing tests that haven't been updated yet, but these are the latest guidelines that we've discovered to be helpful.
72+
Over time, we have changed the way we design and organize Augur's Prysk tests. You might find older practices in existing tests that haven't been updated yet, but these are the latest guidelines that we've discovered to be helpful.
7373

74-
1. Keep cram files modular. This makes it easier to see which command is failing.
74+
1. Keep prysk files modular. This makes it easier to see which command is failing.
7575
2. Create files in the initial working directory (e.g. `./file.txt` or simply `file.txt`), as it is a temporary working directory unique to the test. Note that the name of the `$TMP` directory is misleading - although it is temporary, it is shared across all tests so you'll have to explicitly remove files at the end of each test to avoid affecting other tests. The initial directory of each test is a unique directory within `$TMP`.
76-
3. Each directory containing cram tests should have a setup script named `_setup.sh`. Keep all shared setup commands in this file.
76+
3. Each directory containing prysk tests should have a setup script named `_setup.sh`. Keep all shared setup commands in this file.
7777

7878
##### Comparing outputs of augur commands
7979

@@ -105,34 +105,40 @@ Next, run all augur tests with the following command from the root, top-level of
105105
./run_tests.sh
106106
```
107107

108+
For faster execution by runnning tests in parallel, add the `-n` argument.
109+
Using the `-n auto` will use all available cores:
110+
111+
```bash
112+
./run_test.sh -n auto
113+
```
108114
For rapid execution of a subset of unit tests (as during test-driven development), the `-k` argument will disable code coverage and functional tests and pass directly to pytest to limit the tests that are run.
109115
For example, the following command only runs unit tests related to augur mask.
110116

111117
```bash
112118
./run_tests.sh -k test_mask
113119
```
114120

115-
You can run specific integration test(s) with `cram` directly or via our parallel-wrapper which will use all
116-
available CPUs by default. For instance to run `tests/functional/clades.t` these will both work:
121+
You can run specific integration test(s) with the `-k` argument as well, via pytest, or prysk directly.
117122

118123
```bash
119-
cram tests/functional/clades.t
120-
./scripts/run-cram-parallel.py tests/functional/clades.t
124+
./run_tests.sh -k tests/functional/clades/
125+
pytest tests/functional/clades/
126+
prysk tests/functional/clades/
121127
```
122128

123129
To run all tests in parallel simply run
124130

125131
```bash
126-
./scripts/run-cram-parallel.py
132+
./run_tests.sh -k tests/functional -n auto
127133
```
128134

129-
To run cram tests locally and capture test coverage data, you can use this invocation:
135+
To run prysk tests locally and capture test coverage data, you can use this invocation:
130136

131137
```bash
132-
AUGUR="coverage run --data-file="$PWD/.coverage" $PWD/bin/augur" cram
138+
AUGUR="coverage run --data-file="$PWD/.coverage" $PWD/bin/augur" prysk
133139
```
134140

135-
You can provide one or more cram test file names to get coverage for just those tests, or omit file names to run the entire cram test suite.
141+
You can provide one or more prysk test file names to get coverage for just those tests, or omit file names to run the entire prysk test suite.
136142

137143
Troubleshooting tip: As tests run on the development code in the augur repository, your environment should not have an existing augur installation that could cause a conflict in pytest.
138144

0 commit comments

Comments
 (0)