Skip to content

Commit c163c49

Browse files
authored
Merge branch 'develop' into chime-bus-preprod
2 parents c48e521 + 4e1cb9f commit c163c49

File tree

7 files changed

+130
-34
lines changed

7 files changed

+130
-34
lines changed

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7+
pytest = "*"
78

89
[packages]
910
streamlit = "*"

Pipfile.lock

Lines changed: 116 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ As of March 19, help is especially wanted in these areas:
2525

2626
## Making and Submitting Changes
2727

28-
- Base your work on the `develop` branch in [Code for Philly's fork of the `chime` repository](https://github.com/CodeForPhilly/chime).
29-
- Submit a pull request, also against the `develop` branch.
28+
- [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [CodeforPhilly/chime](https://github.com/CodeForPhilly/chime) repo.
29+
- Base your work on the `develop` branch.
30+
- Submit pull requests from your fork, also against the `develop` branch of the `CodeforPhilly/chime` repo.
3031
- Check your pull request periodically to see if any changes have been requested or any merge conflicts have arisen.
3132
- 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+
- Note: Frequent contributors with write access can submit pull requests from a new branch in the `CodeforPhilly/chime` repository.
3234

3335
## Review & Release
3436

docs/operations/chime-live-cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
## Deploying a New CHIME Version
3434

35-
1. [MaCreateke a new release](release-process.md)
35+
1. [Create a new release](release-process.md)
3636
2. Wait for the `Docker` GitHub Actions workflow to complete
3737
3. Verify the new version shows up at the top as "Latest version" here: https://github.com/CodeForPhilly/chime/packages/155340
3838
4. Run:

penn_chime/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from typing import Tuple
22

33
import numpy as np
4+
import streamlit as st
45

56

67
# The SIR model, one time step
8+
@st.cache
79
def sir(y, beta, gamma, N):
810
S, I, R = y
911
Sn = (-beta * S * I) + S
@@ -21,6 +23,7 @@ def sir(y, beta, gamma, N):
2123

2224

2325
# Run the SIR model forward in time
26+
@st.cache
2427
def sim_sir(
2528
S, I, R, beta, gamma, n_days, beta_decay=0
2629
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
@@ -37,7 +40,7 @@ def sim_sir(
3740
s, i, r = np.array(s), np.array(i), np.array(r)
3841
return s, i, r
3942

40-
43+
@st.cache
4144
def get_hospitalizations(
4245
infected: np.ndarray, rates: Tuple[float, float, float], market_share: float
4346
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:

penn_chime/presentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def display_header(
4646
st.markdown(
4747
"""*This tool was developed by the [Predictive Healthcare team](http://predictivehealthcare.pennmedicine.org/) at
4848
Penn Medicine. For questions and comments please see our
49-
[contact page](http://predictivehealthcare.pennmedicine.org/contact/). Code can be found on [Github](https://github.com/pennsignals/chime).
49+
[contact page](http://predictivehealthcare.pennmedicine.org/contact/). Code can be found on [Github](https://github.com/CodeForPhilly/chime).
5050
Join our [Slack channel](https://codeforphilly.org/chat?channel=covid19-chime-penn) if you would like to get involved!*"""
5151
)
5252

penn_chime/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import numpy as np
22
import pandas as pd
3+
import streamlit as st
34

4-
5+
@st.cache
56
def build_admissions_df(n_days, hosp, icu, vent) -> pd.DataFrame:
67
days = np.array(range(0, n_days + 1))
78
data_dict = dict(zip(["day", "hosp", "icu", "vent"], [days, hosp, icu, vent]))
@@ -12,7 +13,7 @@ def build_admissions_df(n_days, hosp, icu, vent) -> pd.DataFrame:
1213
projection_admits["day"] = range(projection_admits.shape[0])
1314
return projection_admits
1415

15-
16+
@st.cache
1617
def build_census_df(projection_admits, hosp_los, icu_los, vent_los) -> pd.DataFrame:
1718
"""ALOS for each category of COVID-19 case (total guesses)"""
1819
n_days = np.shape(projection_admits)[0]

0 commit comments

Comments
 (0)