This repository is an example of how to begin testing models and ensuring that their outputs are reproducible. It contains a simple stochastic model that draws samples from a normal distribution, and some tests that check whether the model outputs are consistent with our expectations.
The model is defined in model.py
, and test cases are defined in test.py
.
You can run the test cases by running the following command:
python3 test.py
The code is distributed under the terms of the BSD 3-Clause license (see
LICENSE
).
-
Can you run the test cases, as described above?
-
Is the model reproducible?
-
Are the test cases sensible?
-
Are the test cases comprehensive?
-
Define a reproducible environment in which the model can run.
-
Update the model so that its outputs can be reproduced.
-
Write test cases that check if the model outputs are reproducible.
-
Use pytest to run the test cases.
-
Use GitHub Actions to run the test cases every time you push a new commit.