Skip to content

Commit 8cdc429

Browse files
Merge pull request #197 from PhilMiller/develop
#196: Add centralized presentation of model last change date
2 parents 76a5a76 + 3462ba3 commit 8cdc429

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ As of March 21, help is especially wanted from contributors with experience in K
3030
- Request review from the relevant maintainer(s).
3131
- Check your pull request periodically to see if any changes have been requested or any merge conflicts have arisen.
3232
- If a merge conflict arises, rebase against the latest `develop` branch and force-push the new branch as early as you can. You may need to do this more than once before your changes get merged. Do your best to keep your branch in a mergeable state until it is finished being reviewed and accepted.
33+
- If your change affects the results calculated or presented, update `change_date` in `src/penn_chime/parameters.py` when the pull request is ready for merge, so users can see when results have last changed
3334
- Note: Frequent contributors with write access can submit pull requests from a new branch in the `CodeforPhilly/chime` repository.
3435

3536
## Review & Release

src/penn_chime/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
"""Models."""
1+
"""Models.
2+
3+
Changes affecting results or their presentation should also update
4+
parameters.py `change_date`, so users can see when results have last
5+
changed
6+
"""
27

38
from typing import Generator, Tuple
49

src/penn_chime/parameters.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
"""Parameters."""
1+
"""Parameters.
2+
3+
Changes affecting results or their presentation should also update
4+
`change_date`, so users can see when results have last changed
5+
"""
26

37
from numpy import log2 # type: ignore
48

@@ -128,3 +132,11 @@ def n_days(self, n_days: int):
128132
i_icu_v,
129133
i_ventilated_v,
130134
)
135+
136+
def change_date(self):
137+
"""
138+
This reflects a date from which previously-run reports will no
139+
longer match current results, indicating when users should
140+
re-run their reports
141+
"""
142+
return "March 23 2020"

src/penn_chime/presentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def display_header(st, p):
4545
unsafe_allow_html=True,
4646
)
4747
st.markdown(
48-
"""**IMPORTANT NOTICE**: Admissions and Census calculations were previously **undercounting**. Please update your reports. See more about this issue [here](https://github.com/CodeForPhilly/chime/pull/190)."""
48+
"""**IMPORTANT NOTICE**: Admissions and Census calculations were previously **undercounting**. Please update your reports generated before """ + p.change_date() + """. See more about changes [here](https://github.com/CodeForPhilly/chime/labels/models)."""
4949
)
5050
st.markdown(
5151
"""*This tool was developed by the [Predictive Healthcare team](http://predictivehealthcare.pennmedicine.org/) at

0 commit comments

Comments
 (0)