Skip to content

Commit 8142235

Browse files
committed
Fix missing model parameter
1 parent af8db04 commit 8142235

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/penn_chime/presentation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def display_header(st, m, p):
7676
r_naught=m.r_naught,
7777
doubling_time=p.doubling_time,
7878
relative_contact_rate=p.relative_contact_rate,
79-
r_t=p.r_t,
80-
doubling_time_t=abs(p.doubling_time_t),
81-
impact_statement=("halves the infections every" if p.r_t < 1 else "reduces the doubling time to")
79+
r_t=m.r_t,
80+
doubling_time_t=abs(m.doubling_time_t),
81+
impact_statement=("halves the infections every" if m.r_t < 1 else "reduces the doubling time to")
8282
)
8383
)
8484

tests/test_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_the_rest_of_header_shows_up():
7676
def test_mitigation_statement():
7777
st.cleanup()
7878
expected_doubling = "outbreak **reduces the doubling time to 7.8** days"
79-
display_header(st, PARAM)
79+
display_header(st, MODEL, PARAM)
8080
assert len((list(filter(lambda s: expected_doubling in s, st.render_store))))
8181
st.cleanup()
8282
expected_halving = "outbreak **halves the infections every 51.9** days"
@@ -92,7 +92,7 @@ def test_mitigation_statement():
9292
ventilated=RateLos(0.01, 10),
9393
n_days=60,
9494
)
95-
display_header(st, halving_params)
95+
display_header(st, MODEL, halving_params)
9696
assert len((list(filter(lambda s: expected_halving in s, st.render_store))))
9797
st.cleanup()
9898

0 commit comments

Comments
 (0)