Update the Regression Data

A special kind of tests are executed only when pytest is called alongside the --regression-data flag. These tests compare the output of the TARDIS code (mostly arrays) against the information stored in the regression data files.

TARDIS stores regression data in the tardis-regression-data repository. Sometimes, this data needs to be updated. The procedure to update these files has been simplified, allowing for a more straightforward process.

Imagine you are working on a new feature (or fix) for TARDIS, and you have opened a pull request. If the regression data tests are failing, this could happen for various reasons:

  1. There’s a problem in your code.

  2. Your code is OK, but the regression data is outdated.

  3. The pipeline is broken.

If you suspect scenario B, please follow these instructions:

  1. Activate the tardis environment.

  2. Fork and clone the tardis-regression-data repository.

  3. Follow any necessary instructions within your local copy.

  4. Go to your local tardis repository and ensure you are working on the branch from which you want to generate new regression data.

  5. Generate new regression data with pytest tardis --regression-data=/path/to/tardis-regression-data --generate-reference.

  6. Check your results and ensure everything is correct.

  7. Make a new branch in tardis-regression-data, push your new regression data, and open a pull request.

If any issues arise during this process, please tag a TARDIS team member responsible for CI/CD.