Add how to update master_compute_data.pkl
to CONTRIBUTING.rst
#888
Labels
documentation
Add documentation or better warnings etc.
When the outputs of the compute quantities tested by the
test_compute_everything
test are changed in a PR, that test will fail. The three(? maybe more) reasons this could occur are:master
)Curve
likeLinearCurve
etc)If the 2nd case is the reason, then you must update the
master_compute_data.pkl
file with the correct quantities being computed by your PR:pytest tests -k test_compute_everything
and inspect the compute quantities whose values are in error, to ensure that only the quantities you expect to be different are shown (and that the new values are indeed the correct ones, you should have a test elsewhere for that though).with
pytest tests -k test_compute_everything
, now any compute quantity that is different between the PR and master will be updated with the PR valuegit restore tests/test_compute_funs.py
to remove the change you made to the testgit add tests/inputs/master_compute_data.pkl
and commit to commit the new data fileIf the 3rd case is the reason, then you must simply add the new parametrization to the
test_compute_everything
testthings
dictionary with a sensible example instance of the class to use for the test, andgrid
dictionary with a sensible default grid to use when computing the compute quantities for the new classpytest tests -k test_compute_everything
will add the compute quantities for the new class and save them to the.pkl
filegit add tests/inputs/master_compute_data.pkl
and commit to commit the new data fileThe text was updated successfully, but these errors were encountered: