Skip to content

Commit 16fed09

Browse files
authored
Merge branch 'develop' into dependabot/pip/bleach-3.1.4
2 parents 096edeb + b0fa0e6 commit 16fed09

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/pythonapp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ jobs:
4444
uses: cypress-io/[email protected]
4545
with:
4646
working-directory: e2e
47+
wait-on: 'http://localhost:8000'
48+
wait-on-timeout: 300
4749

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ context('Actions', () => {
1010

1111
// This gets the "first" input from the sidebar. From clicking step up,
1212
// the Regional Population should increase from default 4119405 to 4219405.
13+
// Updated to 3600000
1314
cy.get('input.st-al').eq(0)
14-
.should('has.value', '4119406')
15+
.should('has.value', '3600000')
1516
})
1617
});

src/penn_chime/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ def get_loss(self) -> float:
182182

183183

184184
def get_argmin_ds(census_df: pd.DataFrame, current_hospitalized: float) -> float:
185-
losses_df = (census_df.hospitalized - current_hospitalized) ** 2.0
185+
# By design, this forbids choosing a day after the peak
186+
# If that's a problem, see #381
187+
peak_day = census_df.hospitalized.argmax()
188+
losses_df = (census_df.hospitalized[:peak_day] - current_hospitalized) ** 2.0
186189
return losses_df.argmin()
187190

188191

0 commit comments

Comments
 (0)