You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple template for creating DES models in Python, within a **reproducible analytical pipeline (RAP)** <br>
11
11
Click on <kbd>Use this template</kbd> to initialise new repository.<br>
@@ -38,10 +38,10 @@ This repository provides a template for building discrete-event simulation (DES)
38
38
39
39
♻️ **Reproducible:** This template is designed to function as a RAP. It adheres to reproducibility recommendations from:
40
40
41
-
*["Levels of RAP" framework](https://nhsdigital.github.io/rap-community-of-practice/introduction_to_RAP/levels_of_RAP/) from the NHS RAP Community of Practice (as documented in `docs/nhs_rap.md`).
42
-
* Recommendations from [Heather et al. 2025](TODO:ADDLINK) "*On the reproducibility of discrete-event simulation studies in health research: a computational investigation using open models*" (as documented in `docs/heather_2025.md`).
41
+
*["Levels of RAP" framework](https://nhsdigital.github.io/rap-community-of-practice/introduction_to_RAP/levels_of_RAP/) from the NHS RAP Community of Practice (`docs/nhs_rap.md`).
42
+
* Recommendations from [Heather et al. 2025](TODO:ADDLINK) "*On the reproducibility of discrete-event simulation studies in health research: a computational investigation using open models*" (`docs/heather_2025.md`).
43
43
44
-
🚀 **Extendable:** This template adapts from and complements material from Sammi Rosser and Dan Chalk (2024) ["HSMA - the little book of DES"](https://github.com/hsma-programme/hsma6_des_book). For clarity, changes from the DES book in this template are explained in `docs/hsma_changes.md`. The book includes additional advanced features that can be used to extend the model in this template, including:
44
+
🚀 **Extendable:** This template adapts from and complements material from Sammi Rosser and Dan Chalk (2024) ["HSMA - the little book of DES"](https://github.com/hsma-programme/hsma6_des_book). The book includes additional advanced features that can be used to extend the model in this template, including:
45
45
46
46
* Multiple activities
47
47
* Branching paths
@@ -50,6 +50,8 @@ This repository provides a template for building discrete-event simulation (DES)
50
50
* Variable arrival rates
51
51
* Appointment booking
52
52
53
+
For clarity, changes from the DES book in this template are explained in `docs/hsma_changes.md`.
54
+
53
55
✨ **Style:** Coding style based on the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html). Used `flake8` and `pylint` to lint `.py` files, and `pycodestyle` for `.ipynb` files.
54
56
55
57
<!--TODO: Add links to STARS, relevant publication, and https://github.com/pythonhealthdatascience/rap_des/ -->
@@ -121,23 +123,33 @@ As an alternative, a `requirements.txt` file is provided which can be used to se
121
123
122
124
### Step 3: Explore and modify
123
125
124
-
Review the example DES implementation in `scripts`. Modify and extend the code as needed for your specific use case.
126
+
🔎 Review the example DES implementation in `scripts`. Modify and extend the code as needed for your specific use case.
127
+
128
+
🔎 Check you still fulfil the criteria in `docs/nhs_rap.md` and `docs/heather_2025.md`.
129
+
130
+
🔎 Adapt the template `README` provided at the end of this file.
125
131
126
-
Check you still fulfil the criteria in `docs/nhs_rap.md` and `docs/heather_2025.md`.
132
+
🔎 Create your own `CITATION.cff` file using [cff-init](https://citation-file-format.github.io/cff-initializer-javascript/#/).
127
133
128
-
A template `README` is provided at the end of this file.
134
+
🔎 Replace entries in the current `CHANGELOG` with your own, and create GitHub releases.
129
135
130
-
Replace entries in the current `CHANGELOG` with your own, alongside creating **GitHub releases**.
136
+
🔎 Archive your repository (e.g. [Zenodo](https://zenodo.org/)).
131
137
132
-
Create your own `CITATION.cff` file using [cff-init](https://citation-file-format.github.io/cff-initializer-javascript/#/).
138
+
🔎 Complete the Strengthening The Reporting of Empirical Simulation Studies (STRESS) checklist (`stress_des.md`) and use this to support writing publication/report, and attach as an appendice to report.
139
+
140
+
🔎 **Tests**
133
141
134
142
To run tests, ensure environment is active and located in main directory (i.e. parent of `tests/`) and then run the following command. The tests may take around one minute to run. As they run, you will see '.' if the test passes and 'F' if it fails (e.g. `tests/test_model.py ..F..`). When it finishes, you will see the final result (e.g. `==== 1 failed, 4 passed in 51s ====`)
135
143
136
144
```
137
145
pytest
138
146
```
139
147
140
-
The repository contains a GitHub action `tests.yaml` which will automatically run tests with new commits to GitHub. This is continuous integration, helping to catch bugs early and keep the code stable.
148
+
The repository contains a GitHub action `tests.yaml` which will automatically run tests with new commits to GitHub. This is continuous integration, helping to catch bugs early and keep the code stable. It will run the tests on three operating systems: Ubuntu, Windows and Mac.
149
+
150
+
If you have changed the model behaviour, you may wish to amend, remove or write new tests.
151
+
152
+
🔎 **Linting**
141
153
142
154
You can lint the `.py` files by running either of this commands from the terminal:
0 commit comments