gravity-toolkit uses the pytest framework to run tests and verify outputs.
Running the test suite requires a dev installation of the gravity-toolkit package to include all of the optional dependencies.
python -m pip install --editable '.[dev]'Using the pytest command:
pytest --directory <path_to_tide_models> test/Using pixi:
pixi run test "--directory <path_to_tide_models>"The test suite is run in verbose mode as a default.
Coverage reports can be generated using the pytest-cov plugin (which is installed with the dev installation).
pytest --cov pyTMD --cov-report=termpixi run test "--cov ../gravity-toolkit --cov-report=term"As a default, the pytest suite is run in parallel using the pytest-xdist plugin (which is also installed with the dev installation).
To run in series and disable parallelization, set the number of processes to 0:
pytest -n 0pixi run test "-n 0"We use GitHub Actions continuous integration (CI) services to build and test the project on Linux (ubuntu-latest), Mac (macos-latest) and Windows (windows-latest) Operating Systems.
The configuration files for this service are in the GitHub workflows directory.
The workflows use pixi to install the required dependencies and build the custom environment.
The GitHub Actions jobs include: