Skip to content

Commit fe4f10b

Browse files
authored
Merge pull request #34 from pythonhealthdatascience/dev
Dev
2 parents 1ad99aa + 2e141f0 commit fe4f10b

16 files changed

Lines changed: 71 additions & 63 deletions

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates formatted as YYYY-MM-DD as per [ISO standard](https://www.iso.org/iso-8601-date-and-time-format.html).
77

8+
## v1.0.0 - 2026-02-11
9+
10+
Stable release, with minor changes from 0.2.0 including quality assurance documentation, bash script simplification, and a security fix.
11+
12+
### Added
13+
14+
* Add `docs/quality_assurance.md`.
15+
16+
### Changed
17+
18+
* Simplified `run_notebooks.sh`.
19+
20+
### Fixed
21+
22+
* Upgraded `nbconvert` (security issue with 7.16.6 - upgraded to 7.17.0).
23+
824
## v0.2.0 - 2025-11-06
925

1026
This release has some small additions (e.g., data dictionary, coverage), alongside lots of refactoring and changes (e.g., parameters in JSON, using `DistributionRegistry`, renaming repository, using updated version of `sim-tools`).

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ abstract: >-
2525
Reproducible analytical pipeline (RAP) for python discrete-event simulation
2626
(DES) implementing the Stroke Capacity Planning Model from Monks et al. 2016.
2727
license: MIT
28-
version: '0.2.0'
29-
date-released: '2025-11-06'
28+
version: '1.0.0'
29+
date-released: '2026-02-11'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ From this repository:
125125

126126
<details><summary><b>Run time and machine specification</b></summary>
127127

128-
The run time for this analysis (`notebooks/analysis.ipynb`) is 10 seconds. This was on an Intel Core i7-12700H, 32GB RAM, Ubuntu 24.04.1.
128+
The run time for this analysis (`notebooks/analysis.ipynb`) is 38 seconds. This was on an Intel Core i7-12700H, 32GB RAM, Ubuntu 24.04.1.
129129

130130
The other notebooks generate results for tests and illustrate other functionality (e.g. importing parameters from csv, running with logs), and these just take a second or two.
131131

docs/quality_assurance.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Quality Assurance (QA)
2+
3+
## Roles and responsibilities
4+
5+
**Analyst:** Amy Heather (developed the model and implemented the analysis).
6+
7+
**Assurer/Approver:** Tom Monks (provided independent review proportionate to a small teaching example).
8+
9+
## QA when scoping the project
10+
11+
Scoping was agreed verbally between analyst and assurer: replicate the stroke capacity model from [Monks et al. 2016](https://doi.org/10.1186/s12913-016-1789-4) using SimPy. No formal written scoping document was produced, which would be expected for larger or higher‑risk work, but was judged unnecessary here.
12+
13+
No explicit QA plan (who, what, how much) was written at the outset; this document provides a retrospective QA summary and lessons learned for future projects.
14+
15+
## QA when designing the analysis
16+
17+
The analytical approach was simply to replicate the model as described, without introducing any new structural design choices for the model itself. Any decisions were limited to code organisation, which was intentionally implemented as a modular package.
18+
19+
Verification and validation strategy was not agreed in advance but was developed iteratively during the analysis as issues and checks were identified.
20+
21+
Design decisions were not recorded in a separate design document; for future models, capturing key decisions in a short design or analysis‑plan file would be preferable.
22+
23+
## QA when performing the analysis
24+
25+
Verification and validation activities were carried out during development, and checked in a [summary GitHub issue](https://github.com/pythonhealthdatascience/pydesrap_stroke/issues/27) (serving as part of the QA log). Checks were proportionate to purpose of the model (replication, and as an example for training materials).
26+
27+
Assurance of code and workflows was ensured by following the [STARS Reproducibility Recommendations](https://doi.org/10.1080/17477778.2025.2552177) and the [NHS Levels of RAP Framework](https://nhsdigital.github.io/rap-community-of-practice/introduction_to_RAP/levels_of_RAP/).
28+
29+
Code is documented with docstrings and comments to aid understanding and reuse. User and technical documentation are currently provided via the [DES RAP Book](https://github.com/pythonhealthdatascience/des_rap_book). To avoid duplication of this material, the repository does not have it's own standalone user instructions or detailed technical description of the model structure, which would be expected for a model in practice.
30+
31+
GitHub issues act as an informal QA plan and log; for future projects, a more explicit QA project board and short summary of decisions and changes would strengthen the audit trail.

docs/heather_2025.md renamed to docs/stars_reproducibility_recommendations.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Reproducibility recommendations from Heather et al. 2025
1+
# STARS Reproducibility Recommendations
22

3-
As part of the project STARS (Sharing Tools and Artefacts for Reproducible Simulations), a series of computational reproducibility assessments were conducted by [Heather et al. 2025](https://doi.org/10.48550/arXiv.2501.13137). From these, several recommendations were shared to support reproducibility of healthcare discrete-event simulation (DES) models. These are copied below. Those marked with a star (⭐) were identified as having the greatest impact in Heather et al. 2025.
3+
As part of the project STARS (Sharing Tools and Artefacts for Reproducible Simulations), a series of computational reproducibility assessments were conducted and described in:
4+
5+
> Heather, A., Monks, T., Harper, A., Mustafee, N., & Mayne, A. (2025). On the reproducibility of discrete-event simulation studies in health research: an empirical study using open models. Journal of Simulation. https://doi.org/10.1080/17477778.2025.2552177.
6+
7+
From these, several recommendations were shared to support reproducibility of healthcare discrete-event simulation (DES) models. These are copied below. Those marked with a star (⭐) were identified as having the greatest impact in the paper.
48

59
## Recommendations to support reproduction
610

environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
- ipykernel=6.29.5
66
- jinja2=3.1.5
77
- joblib=1.4.2
8-
- nbconvert=7.16.6
8+
- nbconvert=7.17.0
99
- nbformat=5.10.4
1010
- nbqa=1.9.0
1111
- numpy=2.2.2

notebooks/analysis.ipynb

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5641,7 +5641,7 @@
56415641
"name": "stdout",
56425642
"output_type": "stream",
56435643
"text": [
5644-
"Notebook run time: 0m 14s\n"
5644+
"Notebook run time: 0m 38s\n"
56455645
]
56465646
}
56475647
],
@@ -5656,22 +5656,8 @@
56565656
}
56575657
],
56585658
"metadata": {
5659-
"kernelspec": {
5660-
"display_name": "pydesrapstroke",
5661-
"language": "python",
5662-
"name": "python3"
5663-
},
56645659
"language_info": {
5665-
"codemirror_mode": {
5666-
"name": "ipython",
5667-
"version": 3
5668-
},
5669-
"file_extension": ".py",
5670-
"mimetype": "text/x-python",
5671-
"name": "python",
5672-
"nbconvert_exporter": "python",
5673-
"pygments_lexer": "ipython3",
5674-
"version": "3.13.1"
5660+
"name": "python"
56755661
}
56765662
},
56775663
"nbformat": 4,

notebooks/generate_exp_results.ipynb

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@
375375
"name": "stdout",
376376
"output_type": "stream",
377377
"text": [
378-
"Notebook run time: 0m 0s\n"
378+
"Notebook run time: 0m 1s\n"
379379
]
380380
}
381381
],
@@ -390,22 +390,8 @@
390390
}
391391
],
392392
"metadata": {
393-
"kernelspec": {
394-
"display_name": "pydesrapstroke",
395-
"language": "python",
396-
"name": "python3"
397-
},
398393
"language_info": {
399-
"codemirror_mode": {
400-
"name": "ipython",
401-
"version": 3
402-
},
403-
"file_extension": ".py",
404-
"mimetype": "text/x-python",
405-
"name": "python",
406-
"nbconvert_exporter": "python",
407-
"pygments_lexer": "ipython3",
408-
"version": "3.13.1"
394+
"name": "python"
409395
}
410396
},
411397
"nbformat": 4,

notebooks/logs.ipynb

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
" \u001b[32m'other'\u001b[0m: \u001b[1;35mDiscrete\u001b[0m\u001b[1m(\u001b[0m\u001b[33mvalues\u001b[0m=\u001b[1m[\u001b[0m\u001b[32m'esd'\u001b[0m, \u001b[32m'other'\u001b[0m\u001b[1m]\u001b[0m, \u001b[33mfreq\u001b[0m=\u001b[1m[\u001b[0m\u001b[1;36m0.13\u001b[0m, \u001b[1;36m0.88\u001b[0m\u001b[1m]\u001b[0m\u001b[1m)\u001b[0m, \n",
8989
" \u001b[32m'stroke'\u001b[0m: \u001b[1;35mDiscrete\u001b[0m\u001b[1m(\u001b[0m\u001b[33mvalues\u001b[0m=\u001b[1m[\u001b[0m\u001b[32m'esd'\u001b[0m, \u001b[32m'other'\u001b[0m\u001b[1m]\u001b[0m, \u001b[33mfreq\u001b[0m=\u001b[1m[\u001b[0m\u001b[1;36m0.4\u001b[0m, \u001b[1;36m0.6\u001b[0m\u001b[1m]\u001b[0m\u001b[1m)\u001b[0m, \n",
9090
" \u001b[32m'tia'\u001b[0m: \u001b[1;35mDiscrete\u001b[0m\u001b[1m(\u001b[0m\u001b[33mvalues\u001b[0m=\u001b[1m[\u001b[0m\u001b[32m'other'\u001b[0m\u001b[1m]\u001b[0m, \u001b[33mfreq\u001b[0m=\u001b[1m[\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1m]\u001b[0m\u001b[1m)\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m, \n",
91-
" \u001b[32m'env'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95msimpy.core.Environment\u001b[0m\u001b[39m object at \u001b[0m\u001b[1;36m0x73560a6756a0\u001b[0m\u001b[39m>,\u001b[0m \n",
92-
"\u001b[39m \u001b[0m\u001b[32m'param'\u001b[0m\u001b[39m: <simulation.parameters.Param object at \u001b[0m\u001b[1;36m0x7356cadaeba0\u001b[0m\u001b[1m>\u001b[0m, \n",
91+
" \u001b[32m'env'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95msimpy.core.Environment\u001b[0m\u001b[39m object at \u001b[0m\u001b[1;36m0x7e9e65329d30\u001b[0m\u001b[39m>,\u001b[0m \n",
92+
"\u001b[39m \u001b[0m\u001b[32m'param'\u001b[0m\u001b[39m: <simulation.parameters.Param object at \u001b[0m\u001b[1;36m0x7e9f3c29ef90\u001b[0m\u001b[1m>\u001b[0m, \n",
9393
" \u001b[32m'patients'\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m, \n",
9494
" \u001b[32m'rehab_occupancy'\u001b[0m: \u001b[1;36m0\u001b[0m, \n",
9595
" \u001b[32m'run_number'\u001b[0m: \u001b[1;36m0\u001b[0m\u001b[1m}\u001b[0m \n"
@@ -204,7 +204,7 @@
204204
" \u001b[32m'rehab_routing_tia'\u001b[0m: \u001b[1m{\u001b[0m \u001b[32m'class_name'\u001b[0m: \u001b[32m'DiscreteEmpirical'\u001b[0m, \n",
205205
" \u001b[32m'params'\u001b[0m: \u001b[1m{\u001b[0m \u001b[32m'freq'\u001b[0m: \u001b[1m[\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1m]\u001b[0m, \n",
206206
" \u001b[32m'values'\u001b[0m: \u001b[1m[\u001b[0m \u001b[32m'other'\u001b[0m\u001b[1m]\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m, \n",
207-
" \u001b[32m'logger'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95msimulation.logging.SimLogger\u001b[0m\u001b[39m object at \u001b[0m\u001b[1;36m0x73560a8eb0e0\u001b[0m\u001b[1m>\u001b[0m, \n",
207+
" \u001b[32m'logger'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95msimulation.logging.SimLogger\u001b[0m\u001b[39m object at \u001b[0m\u001b[1;36m0x7e9e65587770\u001b[0m\u001b[1m>\u001b[0m, \n",
208208
" \u001b[32m'number_of_runs'\u001b[0m: \u001b[1;36m150\u001b[0m, \n",
209209
" \u001b[32m'warm_up_period'\u001b[0m: \u001b[1;36m15\u001b[0m\u001b[1m}\u001b[0m \n"
210210
]
@@ -1932,7 +1932,7 @@
19321932
"name": "stdout",
19331933
"output_type": "stream",
19341934
"text": [
1935-
"Notebook run time: 0m 0s\n"
1935+
"Notebook run time: 0m 1s\n"
19361936
]
19371937
}
19381938
],
@@ -1947,22 +1947,8 @@
19471947
}
19481948
],
19491949
"metadata": {
1950-
"kernelspec": {
1951-
"display_name": "pydesrapstroke",
1952-
"language": "python",
1953-
"name": "python3"
1954-
},
19551950
"language_info": {
1956-
"codemirror_mode": {
1957-
"name": "ipython",
1958-
"version": 3
1959-
},
1960-
"file_extension": ".py",
1961-
"mimetype": "text/x-python",
1962-
"name": "python",
1963-
"nbconvert_exporter": "python",
1964-
"pygments_lexer": "ipython3",
1965-
"version": "3.13.1"
1951+
"name": "python"
19661952
}
19671953
},
19681954
"nbformat": 4,

outputs/figure1_asu.png

-2.19 KB
Loading

0 commit comments

Comments
 (0)