Skip to content

Commit 558b05f

Browse files
committed
Document V&V process
1 parent c76ea50 commit 558b05f

File tree

1 file changed

+38
-8
lines changed

1 file changed

+38
-8
lines changed

README.rst

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ The first step is to clone the repo::
2323
...git will copy the repository from github and place it in your current directory...
2424
:~$ cd vivarium_gates_mncnh
2525

26-
Cloning the repository should take a fair bit of time as git must fetch
27-
the data artifact associated with the demo (several GB of data) from the
28-
large file system storage (``git-lfs``). **If your clone works quickly,
29-
you are likely only retrieving the checksum file that github holds onto,
30-
and your simulations will fail.** If you are only retrieving checksum
31-
files you can explicitly pull the data by executing ``git-lfs pull``.
32-
3326
Users can create environments by running
3427
``bash environment.sh`` and ``bash environment.sh -t artifact`` which will automatically create and active conda environments
3528
for running the simulation and artifact generation respectively.
@@ -199,4 +192,41 @@ You are now ready to run the main simulation with::
199192
Results of the simulation will be written to ``sim_results/``.
200193
For example, you can check the total deaths due to maternal disorders by
201194
summing the ``value`` column in the Parquet file at
202-
``sim_results/pakistan/<timestamp>/results/maternal_disorders_burden_observer_disorder_deaths.parquet``.
195+
``sim_results/pakistan/<timestamp>/results/maternal_disorders_burden_observer_disorder_deaths.parquet``.
196+
197+
V&V process
198+
-----------
199+
200+
When we make changes to the model, we do so in a git branch, so that changes are not merged into the main branch until they have been verified and validated (V&V).
201+
202+
However, this process is a bit more involved than typical software testing, and may involve multiple people:
203+
the model-runner person and the V&V person.
204+
Often the model-runner is an engineer, though with task shifting it is becoming more common for researchers to take on this role as well.
205+
The general process is as follows:
206+
207+
1. The model-runner creates a new git branch (the name of which should include the model number), and makes the changes to the model.
208+
2. If necessary, the model-runner creates a new artifact in a model-number-named directory, and updates the path in the model spec.
209+
3. The model-runner runs the pytest suite *without updating the MODEL_RESULTS_DIR constant*.
210+
If the tests fail, they post on Slack and do a cursory (time-boxed: 15 minutes) investigation into why.
211+
If that identifies the root cause, and solution to, the issue, they fix it and repeat this step.
212+
Otherwise, the V&V person investigates, by making a new branch off the model-runner's branch,
213+
running the tests, and updating the tests if needed or summarizing the issue.
214+
4. The model-runner runs the simulation with `psimulate` saving results to a model-number-named directory.
215+
They update the MODEL_RESULTS_DIR constant in the code to reflect this new directory,
216+
and create a git tag for the new model version.
217+
5. The model-runner runs the pytest suite *again*, to ensure that the tests pass with the new results.
218+
If the tests fail, they post on Slack and do a cursory (time-boxed: 15 minutes) investigation into why.
219+
If that identifies the root cause, and solution to, the issue, they fix it and return to step 4 (if the issue doesn't involve the artifact)
220+
or step 2 (if the issue does involve the artifact).
221+
Otherwise, the V&V person investigates, by making a new branch off the model-runner's branch,
222+
running the tests, and updating the tests if needed or summarizing the issue.
223+
6. If all existing tests have now passed, and additional tests are needed for new functionality,
224+
the V&V person now makes a branch off the model-runner's branch, and adds the new tests.
225+
If the new tests do not pass, the V&V person investigates why.
226+
7. If all tests have now passed, the model-runner's branch can be merged to the main branch.
227+
If the V&V person also has a branch, this can be merged to the model-runner's branch first,
228+
or can be merged directly to main *after* the model-runner's branch is merged to main;
229+
this decision should be made based on the potential merge conflicts and who would be better placed to resolve them.
230+
If all tests have *not* passed and a follow-up run is needed to fix issues or investigate further,
231+
the whole process repeats, branching off the *last* branch made during this process
232+
(so, the V&V person's branch, if there is one).

0 commit comments

Comments
 (0)