Closed EiffL closed 2 years ago
Awesome! Never knew that pytest
was this flexible :D
Since we are using the GalSim repo as a git submodule, we might want to write somewhere how to install or clone the repo so we can run the tests. I imagine that once this branch will be merged into the main branch, we will just clone and install with
git clone --recurse-submodules https://github.com/GalSim-developers/JAX-GalSim
cd JAX-GalSim
pip install .
And add pytest to the requirements in the setup.py
Thank you @b-remy ! I've added the instructions to clone the repo including submodules in the contibuting.md being developed here: https://github.com/GalSim-developers/JAX-GalSim/blob/contributing/CONTRIBUTING.md
And, I've added pytest to the dependencies in the setup.py
because this is not a PR for the main
branch I'll go ahead and merge these modifs into #7 given your feedback
This PR proposes a mechanism to automate the testing against GalSim. Here is the idea:
The GalSim repo is included as a git submodule inside the
test
folder. This corresponds to a specific version that we want to test against, typically the latest released version.In a yaml file,
galsim_tests_config.yaml
we can specify which galsim test modules we want to run, and we can specify what error messages to ignore. the file looks like this:This documents which error messages will be allowed
without being reported as an error. These typically
correspond to features that are not implemented yet
in jax_galsim
allowed_failures:
conftest.py
file, we tell pytest to:import galsim
at the top of the test files byimport jax_galsim as galsim
and here is what running the tests look like: