We use cucumber specifications to describe and execute modelling scenarios, and systematically produce corresponding causal graphs that can be used to test causal relationships.
This repository is currently in an experimental phase.
git clone https://github.com/CITCOM-project/causcumber.git
cd causcumber
./causcumber
, run python3 -m venv causcumber_venv
source causcumber_venv/bin/activate
GraphViz
causcumber
using the command pip install -e .
Due to the current experimental nature of this work, contributions are currently limited to the core citcom team. Once key architectural decisions are finalised, we will open to a broader community. The current process for making changes to the code (e.g. adding new features or fixing bugs) in this repository are:
main
branch and request a review from one of the citcom teammain
The scenarios
directory contains different example scenarios implemented in the Covasim model. For each scenario in the directory, a separate sub-directory should be created that contains the simulation and a cucumber specification. Within each scenario sub-directory, three directories should be created:
dags/
: this directory should contain any causal graphs as .dot
files. This is where CauseCumber will place causal graphs too.features/
: this directory should contain all of the elements for behave, including .feature
files, an environment.py
file, and a directory steps/
containing python scripts to implement step definitions for each .feature
file.observational_data/
: this directory should contain any observational data that you wish to use instead of running the model. This is optional..feature
file specifying desired causal properties as scenarios in Gherkin language.Background
scenario that lists the inputs and outputs of interest.Background
and prune manually.Then
clauses.We work with CSV files produced by Covasim simulations. These have 164 columns, the headings of which is as follows:
t
(time step)date
cum_
) and new (new_
)
infections
reinfections
infectious
symptomatic
severe
critical
recoveries
deaths
tests
diagnoses
known_deaths
quarantined
vaccinations
vaccinated
n_susceptible
n_exposed
n_infectious
n_symptomatic
n_severe
n_critical
n_recovered
n_dead
n_diagnosed
n_known_dead
n_quarantined
n_vaccinated
n_alive
n_naive
n_preinfectious
n_removed
prevalence
incidence
r_eff
doubling_time
test_yield
rel_test_yield
frac_vaccinated
pop_nabs
pop_protection
pop_symp_protection
Each row in the CSV represents a single time step (day) in the model. The outputs are stored in compare_interventions/results
, which is ignored by Git during the development process. We will make our results publicly available via ORDA when it is appropriate to do so.