Skip to content

Commit ee4098b

Browse files
authored
Merge branch 'develop' into issue_86
2 parents 399b56c + ce50a79 commit ee4098b

File tree

10 files changed

+217
-47
lines changed

10 files changed

+217
-47
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
This file was deleted.

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.

__init__.py

Whitespace-only changes.

docs/CONTRIBUTING.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,46 @@
11
# Contributing
22

3-
When contributing to this repository, please first discuss the change you wish to make via [issue](https://github.com/codeforphilly/chime/issues), [Slack chat](https://codeforphilly.org/chat/covid19-chime-penn), or any other method with the owners of this repository before making a change.
3+
Welcome, grab a cup of coffee, and let's roll our sleeves up! By participating in this project, you agree to abide by our [code of conduct](CODE_OF_CONDUCT.md).
44

5-
Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.
5+
## What should I work on?
66

7-
## Active Needs
7+
As of March 19, help is especially wanted in these areas:
88

9-
We maintain a list of [issues in the Code for Philly repo](https://github.com/codeforphilly/chime/issues) that encompasses work requested by stakeholders and technologists. Each issue is designed to be small enough for one person to implement.
9+
- **Python wizards** for application development ([#chime-app](https://codeforphilly.org/chat?channel=chime-app))
10+
- Hardening the code
11+
- Making it more flexible
12+
- Unit tests!
13+
- **DevOps heroes** for application hosting ([#chime-ops](https://codeforphilly.org/chat?channel=chime-ops))
14+
- Maintaining Penn's instance
15+
- Ensuring easy redeploys
16+
- **Math and stats friends** for model improvements ([#chime-analysis](https://codeforphilly.org/chat?channel=chime-analysis))
17+
- **Consulting DevOps champs** to help other public agencies set up their own instances ([#chime-help](https://codeforphilly.org/chat?channel=chime-help)
1018

11-
**Developers** If you are new to the project, check out open issues to see if there is any pre-existing work needed that you can handle. We will need to add your git account to the repo to grant write access - contact us on [Slack](https://codeforphilly.org/chat) in the [covid19-chime-penn](https://codeforphilly.org/chat?channel=covid19-chime-penn) channel.
19+
## Before You Begin
1220

13-
## Change Management
21+
- Join the [#covid19-chime-penn](https://codeforphilly.org/chat?channel=covid19-chime-penn) channel, and [request write access](https://codeforphilly.slack.com/archives/CV4NGQYMP/p1584665484368300) to the `CodeforPhilly/chime` Github repository.
22+
- Our highest-priority work is organized in the [Github Project Management board](https://github.com/CodeForPhilly/chime/projects/2). Look for an issue matching your interests & skills in one of the "Ready" columns.
23+
- Assign yourself to the issue and add a comment to briefly describe your plan.
24+
- For new ideas, please first discuss the change(s) you wish to make via [issue](https://github.com/codeforphilly/chime/issues) or appropriate Slack channel (platform/app - #chime-app, devops - #chime-ops, modeling - #chime-analysis).
1425

15-
- Base all work on the latest `develop` branch available in [Code for Philly's fork of the `chime` repository](https://github.com/CodeForPhilly/chime).
16-
- Submit your work in the form of a pull request against that same branch.
17-
- Check in on your pull request periodically after you submit it to see if any changes have been requested or any merge conflicts have arisen from other work getting integrated.
18-
- If a merge conflict arises, please rebase your branch 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.
26+
## Making and Submitting Changes
27+
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.
31+
- Check your pull request periodically to see if any changes have been requested or any merge conflicts have arisen.
32+
- 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.
34+
35+
## Review & Release
36+
37+
<!-- Currently establishing & clarifying the release process, this is just a skeleton. -->
38+
39+
- Maintainers will review pull requests, asking for changes as needed.
40+
- Once a PR has 1 approval and passes automated tests, maintainers will merge to release branches.
41+
- Exception: Documentation or infrastructure support PRs can be merged directly to master.
42+
- Deploys to production must be signed off on by @beckerfluffle or @cchivers.
1943

2044
## Requesting Functionality
2145

22-
**Stakeholders/Users** Find us on [Slack](https://codeforphilly.org/chat) in the [#covid19-chime-penn](https://codeforphilly.org/chat/covid19-chime-penn) channel to see if your need is already being addressed.
46+
**Stakeholders/Users**: Check the [#covid19-chime-penn](https://codeforphilly.org/chat/covid19-chime-penn) channel on [Slack](https://codeforphilly.org/chat) to see if your need is already being addressed.

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)