Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@ absent. `run.bash` runs it after the examples.
python3 tests/python/test_validate.py
```

`tests/python/test_farsite_reference.py` compares the Farsite model with the
FARSITE reference code (`mbedward/farsite`) over the 13 fuel models. It needs
a C++ compiler and is not run by CI. Gaps on slope and at flank/back are
reported; `--strict` makes the slope gap fail.

```bash
./.venv/bin/python tests/python/test_farsite_reference.py
```

`tests/python/` also holds `idealizedwind.py`, `farsite_flat.py` and
`percolation.py`. They are examples rather than tests — they produce plots and
assert nothing — and are not run anywhere. They are the closest thing to
Expand Down
14 changes: 14 additions & 0 deletions tests/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ python tests/python/test_moisture_invariants.py # -v for every probe

`--model NAME` and `--test NAME`, both repeatable, narrow it down.

### `test_farsite_reference.py`

Compares the `Farsite` model with FARSITE's own code for the 13 standard fuel
models, four midflame winds, three slopes and three moisture sets. The
reference is `farsite_reference.cpp`, FARSITE's spread rate and ellipse copied
from mbedward/farsite and compiled by the test with the system C++ compiler.
Fails when the head rate of spread differs from the reference; flank, back and
the gap on a slope are printed, not asserted (`--strict` asserts the slope
too). Needs a C++ compiler besides `pyforefire`. Manually:

```bash
python tests/python/test_farsite_reference.py # -v for every case
```

### `test_runner.py`

Checks `pyforefire.ForeFireRunner`: eight simulations, each in its own worker
Expand Down
Loading
Loading