GalSim-developers / JAX-GalSim

JAX port of GalSim, for parallelized, GPU accelerated, and differentiable galaxy image simulations.
Other
28 stars 3 forks source link

Adding automated test suite mechanism to branch #5 #14

Closed EiffL closed 2 years ago

EiffL commented 2 years ago

This PR proposes a mechanism to automate the testing against GalSim. Here is the idea:

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:

and here is what running the tests look like:

[francois@Achernar JAX-GalSim]$ pytest
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss-----.sssss [ 39%]
s-----.sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 78%]
sssssssssssssssssssssssssssssssssssssssssssssssssss---.---sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss                                                                                                                    [100%]
========================================================================================================================== short test summary info ===========================================================================================================================
3 passed, 652 skipped, 16 allowed failure in 1.43s
ismael-mendoza commented 2 years ago

Awesome! Never knew that pytest was this flexible :D

b-remy commented 2 years ago

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

EiffL commented 2 years ago

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

EiffL commented 2 years ago

because this is not a PR for the main branch I'll go ahead and merge these modifs into #7 given your feedback