Skip to content

Commit

Permalink
Add test instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Apr 14, 2024
1 parent 5546ced commit 1c9d069
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,39 @@ Only checkpoints for `Lagrange` or `DG` functions are supported from legacy DOLF
See the [API](./docs/api) for more information.
## Testing
This library uses `pytest` for testing.
To execute the tests, one should first install the library and its dependencies, as listed above.
Then, can execute all tests by calling
```bash
python3 -m pytest .
```
### Testing against data from legacy dolfin
Some tests check the capability of reading data created with the legacy version of DOLFIN.
To create this dataset, start a docker container with legacy DOLFIN, for instance:
```bash
docker run -ti -v $(pwd):/root/shared -w /root/s
hared --rm ghcr.io/scientificcomputing/fenics:2024-02-19
```
Then, inside this container, call
```bash
python3 ./tests/create_legacy_data.py --output-dir=legacy
```

### Testing against data from older versions of ADIOS4DOLFINx
Some tests check the capability to read data generated by `adios4dolfinx<0.7.2`.
To generate data for these tests use the following commands:
```bash
docker run -ti -v $(pwd):/root/shared -w /root/shared --rm ghcr.io/fenics/dolfinx/dolfinx:v0.7.3
```
Then, inside the container, call
```bash
python3 -m pip install adios4dolfinx==0.7.1
python3 ./tests/create_legacy_checkpoint.py --output-dir=legacy_checkpoint
```

## Long term plan

The long term plan is to get this library merged into DOLFINx (rewritten in C++ with appropriate Python-bindings).

0 comments on commit 1c9d069

Please sign in to comment.