Skip to content

Commit 5c3ffe8

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop
2 parents a102764 + e5a33a1 commit 5c3ffe8

File tree

15 files changed

+71
-174
lines changed

15 files changed

+71
-174
lines changed

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- Please read the contributing guidelines before submitting: https://codeforphilly.github.io/chime/CONTRIBUTING.html -->
2+
3+
<!--
4+
- If this PR affects devops or model, start your PR title with `[DevOps]` or `[Model]`
5+
- Update the user or developer documentation, if affected.
6+
-->
7+
8+
### Link to issue
9+
- Fixes #(issue number)
10+
11+
### Changelog entry
12+
- Short description of problem & solution (1-3 sentences, depending on scope of change)
13+
14+
### Additional info
15+
- Anything else reviewers and future readers should know

defaults/cli.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
--current-hospitalized 69
2-
--doubling-time 4.0
2+
--doubling-time 5.0
33
--hospitalized-days 7
44
--hospitalized-rate 0.025
55
--icu-days 9
66
--icu-rate 0.0075
7-
--infectious-days 14
7+
--infectious-days 10
88
--market-share 0.15
99
--n-days 100
1010
--population 3600000
1111
--recovered 0
12-
--relative-contact-rate 0.3
12+
--relative-contact-rate 0.45
1313
--ventilated-days 10
1414
--ventilated-rate 0.005

defaults/webapp.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
--current-hospitalized 69
22
--date-first-hospitalized 2020-03-07
3-
--doubling-time 4.0
3+
--doubling-time 5.0
44
--hospitalized-days 7
55
--hospitalized-rate 0.025
66
--icu-days 9
77
--icu-rate 0.0075
8-
--infectious-days 14
8+
--infectious-days 10
99
--market-share 0.15
1010
--n-days 100
1111
--population 3600000
1212
--recovered 0
13-
--relative-contact-rate 0.3
13+
--relative-contact-rate 0.45
1414
--ventilated-days 10
1515
--ventilated-rate 0.005

docs/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ As of March 21, help is especially wanted from contributors with experience in K
2828
- Base your work on the `develop` branch.
2929
- Take a few minutes to review this [resource](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Reviewer_Checklist) for contributors and reviewers, to accelerate the adoption of your contribution (thanks to the good folks at Mozilla for this).
3030
- Submit pull requests from your fork, also against the `develop` branch of the `CodeforPhilly/chime` repo.
31+
- As part of your pull request, please ensure you provide the following information
32+
- References to the issue/PR resolved with your contribution(s) (use key word e.g. Fixes #123, #321 See #213)
33+
- Explicitly identify the scope/area the change impacts (ex: Operations/Deployment/Model/Documentation)
34+
- Describe any necessary follow on work, ideally with links to any already open issues
3135
- Request review from the relevant maintainer(s).
3236
- Check your pull request periodically to see if any changes have been requested or any merge conflicts have arisen.
3337
- 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.

docs/operations/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Operations guide to resources
22

3-
This guide will show you where nodes, and k8s clusters are stored and their heirarchy.
3+
This guide will show you where nodes, and k8s clusters are stored and their hierarchy.
44

55
## Production
66

@@ -13,4 +13,4 @@ Production k8s cluster is available on linode datacenter.
1313

1414
Pre Production k8s cluster is available on linode datacenter.
1515

16-
`chime-bus`
16+
`chime-bus`

docs/operations/prepare-new-chime-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ At the end of following this process you will have deployed a new CHIME version
3737
the review of another DevOps admin whenever possible. Ensure to link
3838
to the PR in the deployment issue previously opened on GitHub.
3939

40-
6. One approved you will need to [create a release to auto deploy](release-process.md)
40+
6. Once approved, you will need to [create a release to auto deploy](release-process.md)

e2e/cypress/integration/tests/steppers.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ context('Increment steppers', () => {
66
});
77

88
it('Increment regional population', () => {
9-
cy.contains('Hospitalized Admissions peaks at 300');
9+
cy.contains('Regional population (3600000)');
1010

1111
cy.get('input[type=number]').eq(0)
1212
.should('has.value', '3600000');
@@ -16,11 +16,11 @@ context('Increment steppers', () => {
1616
cy.get('input[type=number]').eq(0)
1717
.should('has.value', '3600001');
1818

19-
cy.contains('Hospitalized Admissions peaks at 300');
19+
cy.contains('Regional population (3600001)');
2020
});
2121

2222
it('Increment hospital market share', () => {
23-
cy.contains('Hospitalized Admissions peaks at 300');
23+
cy.contains('The estimated number of currently infected individuals is 20128.');
2424

2525
cy.get('input[type=number]').eq(1)
2626
.should('has.value', '15');
@@ -30,11 +30,11 @@ context('Increment steppers', () => {
3030
cy.get('input[type=number]').eq(1)
3131
.should('has.value', '15.1');
3232

33-
cy.contains('Hospitalized Admissions peaks at 302');
33+
cy.contains('The estimated number of currently infected individuals is 19996.');
3434
});
3535

3636
it('Increment doubling time', () => {
37-
cy.contains('Hospitalized Admissions peaks at 300');
37+
cy.contains('An initial doubling time of 4.0 days');
3838

3939
cy.get('input[type=number]').eq(3)
4040
.should('has.value', '4');
@@ -44,6 +44,6 @@ context('Increment steppers', () => {
4444
cy.get('input[type=number]').eq(3)
4545
.should('has.value', '4.25');
4646

47-
cy.contains('Hospitalized Admissions peaks at 272');
47+
cy.contains('An initial doubling time of 4.25 days');
4848
});
4949
});

src/app.py

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
from penn_chime.charts import (
1818
build_admits_chart,
1919
build_census_chart,
20-
build_descriptions,
2120
build_sim_sir_w_date_chart,
22-
build_table,
2321
)
2422

2523
# This is somewhat dangerous:
@@ -35,49 +33,25 @@
3533
display_header(st, m, p)
3634

3735
st.subheader("New Admissions")
38-
st.markdown("Projected number of **daily** COVID-19 admissions. \n\n _NOTE: Now including estimates of prior admissions for comparison._")
36+
st.markdown("Projected number of **daily** COVID-19 admissions.")
3937
admits_chart = build_admits_chart(alt=alt, admits_floor_df=m.admits_floor_df, max_y_axis=p.max_y_axis)
4038
st.altair_chart(admits_chart, use_container_width=True)
41-
st.markdown(build_descriptions(chart=admits_chart, labels=p.labels, prefix="admits_", suffix=" Admissions"))
4239
display_download_link(
4340
st,
4441
filename=f"{p.current_date}_projected_admits.csv",
4542
df=m.admits_df,
4643
)
4744

48-
if st.checkbox("Show Projected Admissions in tabular form"):
49-
admits_modulo = 1
50-
if not st.checkbox("Show Daily Counts"):
51-
admits_modulo = 7
52-
table_df = build_table(
53-
df=m.admits_floor_df,
54-
labels=p.labels,
55-
modulo=admits_modulo)
56-
st.table(table_df)
57-
58-
5945
st.subheader("Admitted Patients (Census)")
60-
st.markdown("Projected **census** of COVID-19 patients, accounting for arrivals and discharges \n\n _NOTE: Now including estimates of prior census for comparison._")
46+
st.markdown("Projected **census** of COVID-19 patients, accounting for arrivals and discharges.")
6147
census_chart = build_census_chart(alt=alt, census_floor_df=m.census_floor_df, max_y_axis=p.max_y_axis)
6248
st.altair_chart(census_chart, use_container_width=True)
63-
st.markdown(build_descriptions(chart=census_chart, labels=p.labels, prefix="census_", suffix=" Census"))
6449
display_download_link(
6550
st,
6651
filename=f"{p.current_date}_projected_census.csv",
6752
df=m.census_df,
6853
)
6954

70-
if st.checkbox("Show Projected Census in tabular form"):
71-
census_modulo = 1
72-
if not st.checkbox("Show Daily Census Counts"):
73-
census_modulo = 7
74-
table_df = build_table(
75-
df=m.census_floor_df,
76-
labels=p.labels,
77-
modulo=census_modulo)
78-
st.table(table_df)
79-
80-
8155
st.subheader("Susceptible, Infected, and Recovered")
8256
st.markdown("The number of susceptible, infected, and recovered individuals in the hospital catchment region at any given moment")
8357
sim_sir_w_date_chart = build_sim_sir_w_date_chart(alt=alt, sim_sir_w_date_floor_df=m.sim_sir_w_date_floor_df)
@@ -88,10 +62,4 @@
8862
df=m.sim_sir_w_date_df,
8963
)
9064

91-
if st.checkbox("Show SIR Simulation in tabular form"):
92-
table_df = build_table(
93-
df=m.sim_sir_w_date_floor_df,
94-
labels=p.labels)
95-
st.table(table_df)
96-
9765
display_footer(st)

src/chime_dash/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Install the chime base module
119119
```
120120
and run
121121
```bash
122-
> python src/dash_app.py
122+
> PARAMETERS=defaults/webapp.cfg python src/dash_app.py
123123
```
124124
in the project root and visit the local url.
125125

src/chime_dash/app/components/intro.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class Intro(Component):
1616
"""
1717
"""
18-
localization_file = "intro.md"
18+
localization_file = "intro.yml"
1919

2020
def get_html(self) -> List[ComponentMeta]: # pylint: disable=W0613
2121
"""Initializes the header dash html
@@ -28,33 +28,31 @@ def build(self, model, pars):
2828
if model and pars:
2929
intro = self.content
3030
infected_population_warning_str = (
31-
"(Warning:"
32-
" The number of estimated infections is greater than"
33-
" the total regional population."
34-
" Please verify the values entered in the sidebar.)"
35-
""
31+
intro["infected-population-warning"]
3632
if model.infected > pars.population
3733
else ""
3834
)
39-
result = intro.format(
35+
mitigation_rt_str = (
36+
intro["mitigation-rt-less-than-1"]
37+
if model.r_t < 1
38+
else intro["mitigation-rt-more-than-equal-1"]
39+
)
40+
41+
result = intro["description-total-infection"].format(
4042
total_infections=model.infected,
4143
current_hosp=pars.current_hospitalized,
4244
hosp_rate=pars.hospitalized.rate,
4345
S=pars.population,
44-
market_share=pars.market_share,
46+
market_share=pars.market_share
47+
) + "\n\n" + infected_population_warning_str + "\n\n" + intro["description-doubling-time"].format(
48+
doubling_time=pars.doubling_time,
4549
recovery_days=pars.infectious_days,
4650
r_naught=model.r_naught,
47-
doubling_time=pars.doubling_time,
51+
daily_growth=model.daily_growth_rate * 100.0
52+
) + "\n\n" + mitigation_rt_str.format(
4853
relative_contact_rate=pars.relative_contact_rate,
49-
r_t=model.r_t,
5054
doubling_time_t=model.doubling_time_t,
51-
impact_statement=(
52-
"halves the infections every"
53-
if model.r_t < 1
54-
else "reduces the doubling time to"
55-
),
56-
daily_growth=model.daily_growth_rate * 100.0,
57-
daily_growth_t=model.daily_growth_rate_t * 100.0,
58-
infected_population_warning_str=infected_population_warning_str,
55+
r_t=model.r_t,
56+
daily_growth_t=model.daily_growth_rate_t * 100.0
5957
)
6058
return [result]

0 commit comments

Comments
 (0)