diff --git a/README.md b/README.md index 633060b..dc28d26 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,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).