Skip to content

Commit 3b60d7e

Browse files
authored
Merge pull request #110 from pythonhealthdatascience/dev
Dev
2 parents c830778 + ede5919 commit 3b60d7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3019
-277
lines changed

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[flake8]
22
per-file-ignores =
33
docstrings*.py: F811
4+
length_warmup*.py: F401,F821
5+
logs*.py: F811
46
n_reps*.py: E0602,F401,F821,W0611
57
outputs*.py: F811
68
parallel*.py: F401,F821
@@ -9,5 +11,7 @@ per-file-ignores =
911
replications*.py: F401,F811,F821
1012
scenarios*.py: F401,F821
1113
tables_figures*.py: F401,F821
14+
tests*.py: F821
15+
tests_resources/*.py: E0401
1216
*/outputs_resources/*.py:E261,E262,F821
1317
*/replications_resources/*.py:E261,E262,F821

.lintr

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ exclusions: list(
88
"pages/inputs/parameters_validation.qmd" = list(
99
object_usage_linter = 771:772
1010
),
11+
"pages/output_analysis/length_warmup.qmd" = list(
12+
unused_import_linter = Inf
13+
),
1114
"pages/output_analysis/n_reps.qmd" = list(
1215
unused_import_linter = Inf,
1316
object_usage_linter = Inf
1417
),
1518
"pages/output_analysis/outputs.qmd" = list(
16-
one_call_pipe_linter = 898,
17-
line_length_linter = 2828
19+
one_call_pipe_linter = 904,
20+
line_length_linter = 2837
1821
),
1922
"pages/output_analysis/parallel.qmd" = list(
2023
object_usage_linter = Inf,
@@ -30,5 +33,14 @@ exclusions: list(
3033
object_usage_linter = Inf
3134
),
3235
"pages/style_docs/linting_resources/code.R",
36+
"pages/verification_validation/tests_resources/simulation.R" = list(
37+
one_call_pipe_linter = 228
38+
),
39+
"pages/verification_validation/tests_resources/test_back.R" = list(
40+
expect_identical_linter = Inf
41+
),
42+
"pages/verification_validation/tests.qmd" = list(
43+
library_call_linter = Inf
44+
),
3345
"renv"
3446
)

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,54 @@ 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+
## v0.2.0 - 2025-10-14
9+
10+
### Added
11+
12+
* Logging page
13+
* Output analysis section covering:
14+
* Initialisation bias
15+
* Performance measures
16+
* Replications
17+
* Parallel processing
18+
* Number of replications
19+
* Length of warm-up
20+
* Experimentation section covering:
21+
* Scenario and sensivity analysis
22+
* Tables and figures
23+
* Full run
24+
* Verification and validation section covering:
25+
* Verification and validation
26+
* Tests
27+
* Style and documentation section covering:
28+
* Linting
29+
* Docstrings
30+
* GitHub actions
31+
* Documentation
32+
* Collaboration and sharing section covering:
33+
* Code review
34+
* Licensing
35+
* Citation
36+
* Changelog
37+
* Sharing and archiving
38+
* Add citation to footer.
39+
* Add pre-commits.
40+
* Add `all-contributors`.
41+
* Add `CONTRIBUTING.md`.
42+
43+
### Changed
44+
45+
* Redid the introduction box for each page to be simpler/clearer.
46+
* Moved giscus `comments` settings to `_quarto.yml` so can have comments on index page.
47+
* Improvements to existing pages (citations, illustrations, links, `.lightbox`).
48+
* Switched to consistent modern execution options syntax.
49+
50+
### Fixed
51+
52+
* Parameters from file (don't generate PDF).
53+
* Input modelling (correct `python-content` to `r-content`).
54+
* Add padding to bottom of side bar so can see all pages (otherwise cuts off for some reason sometimes).
55+
856
## v0.1.0 - 2025-09-10
957

1058
🌱 Initial release of the website (work in progress). This version introduces the website structure and the first written sections (up to *Output Analysis*).

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ keywords:
4141
- simmer
4242
- rap
4343
license: MIT
44-
version: '0.1.0'
45-
date-released: '2025-09-10'
44+
version: '0.2.0'
45+
date-released: '2025-10-14'

DESCRIPTION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ Imports:
77
future,
88
future.apply,
99
ggplot2,
10+
gridExtra,
1011
jsonlite,
1112
kableExtra,
1213
lintr,
1314
lubridate,
15+
patrick,
1416
plotly,
1517
prettycode,
1618
readr,

_quarto.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ website:
5353
- pages/output_analysis/replications.qmd
5454
- pages/output_analysis/parallel.qmd
5555
- pages/output_analysis/n_reps.qmd
56+
- pages/output_analysis/length_warmup.qmd
5657
- section: "Experimentation"
5758
contents:
5859
- pages/experiments/scenarios.qmd
5960
- pages/experiments/tables_figures.qmd
6061
- pages/experiments/full_run.qmd
6162
- section: "Verification & validation"
6263
contents:
64+
- pages/verification_validation/verification_validation.qmd
6365
- pages/verification_validation/tests.qmd
64-
- pages/verification_validation/validation.qmd
6566
- section: "Style & documentation"
6667
contents:
6768
- pages/style_docs/linting.qmd

pages/inputs/input_data.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Example data dictionary:
126126

127127
#### Obtaining a DOI
128128

129-
If youre able to openly share the data, you can include it directly in your GitHub repository alongside your code and documentation for convenience and reproducibility. For longer-term access, public citation, or larger datasets, its often better to deposit the data in a separate and/or specialised repository, and then simply link from your code to the archive record.
129+
If you're able to openly share the data, you can include it directly in your GitHub repository alongside your code and documentation for convenience and reproducibility. For longer-term access, public citation, or larger datasets, it's often better to deposit the data in a separate and/or specialised repository, and then simply link from your code to the archive record.
130130

131131
As described in the ["The Research Data Management Workbook"](https://caltechlibrary.github.io/RDMworkbook/), when choosing where to store data, you should consider the available data repository types:
132132

pages/inputs/input_modelling.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ When selecting appropriate distributions, if you only have summary statistics (l
8585

8686
However, these standard choices may not always be appropriate. If the actual process differs from your assumptions or has unique features, the chosen distribution might not fit well.
8787

88-
Therefore, if you have enough data, its best to analyse it directly to select the most suitable distributions. This analysis generally involves two key steps:
88+
Therefore, if you have enough data, it's best to analyse it directly to select the most suitable distributions. This analysis generally involves two key steps:
8989

9090
1. **Identify possible distributions**. This is based on knowledge of the process being modelled, and by inspecting the data using time series plots and histograms.
9191
2. **Fit distributions to your data and compare goodness-of fit**. You can do this using a:

pages/inputs/parameters_validation.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ params = ParamClass()
102102
print(params.__dict__)
103103
```
104104

105-
Now lets introduce a typo:
105+
Now let's introduce a typo:
106106

107107
```{python}
108108
params.transfer_probs = 0.4

pages/model/distributions.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ When simulating real-world systems (e.g. patients arriving, prescriptions queuei
4646

4747
![](../inputs/input_data_resources/samples.png)
4848

49-
However, computers can't generate "true" randomness. Instead, they use **pseudorandom number generators (PRNGs)**: algorithms which produce a sequence of numbers that appear random, but are in fact completely determined by an initial starting point called a **seed**. If you use the same seed, youll get the same random sequence every time - a crucial feature for reproducibility in research and development.
49+
However, computers can't generate "true" randomness. Instead, they use **pseudorandom number generators (PRNGs)**: algorithms which produce a sequence of numbers that appear random, but are in fact completely determined by an initial starting point called a **seed**. If you use the same seed, you'll get the same random sequence every time - a crucial feature for reproducibility in research and development.
5050

5151
By default, most software PRNGs initialise the seed based on something that changes rapidly and unpredictably, such as the current system time. This ensures a unique sequence with every fresh run. But for **reproducible experiments**, you should manually set the seed yourself, allowing you and others to exactly recreate simulation results.
5252

@@ -317,7 +317,7 @@ We also acknowledge the work of B. Lawson and L. M. Leemis for the `simEd` packa
317317

318318
### Which package did we use?
319319

320-
We've used R's standard random sampling functions in the example models in this book. This is mainly because they're fast, even though all draws share a single global random stream. If you need independent streams, the `simEd` package allows for that, but it can slow things down—which is why we didnt use it here.
320+
We've used R's standard random sampling functions in the example models in this book. This is mainly because they're fast, even though all draws share a single global random stream. If you need independent streams, the `simEd` package allows for that, but it can slow things down—which is why we didn't use it here.
321321

322322
::::
323323

@@ -327,7 +327,7 @@ These quirks with random number streams are **worth understanding**, especially
327327

328328
::: {.python-content}
329329

330-
With Python, its easy to avoid pitfalls from shared random number streams - just use the new Generator API (`np.random.default_rng`) to create separate generators for each process in your simulation, rather than sharing a global one, or packages like `sim-tools`. That said, for most simulations, even if you use a single stream, the impact is usually minor - so its not something to stress over.
330+
With Python, it's easy to avoid pitfalls from shared random number streams - just use the new Generator API (`np.random.default_rng`) to create separate generators for each process in your simulation, rather than sharing a global one, or packages like `sim-tools`. That said, for most simulations, even if you use a single stream, the impact is usually minor - so it's not something to stress over.
331331

332332
:::
333333

0 commit comments

Comments
 (0)