Skip to content

Commit ba3e61a

Browse files
authored
Merge branch 'develop' into google-api-sheets
2 parents 2995d23 + f884ba9 commit ba3e61a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1023
-594
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

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
python -m pytest
4444
- name: Run App
4545
run: |
46-
streamlit run src/app.py &
46+
PARAMETERS=./defaults/cypress.cfg streamlit run src/app.py &
4747
- name: Cypress
4848
uses: cypress-io/github-action@v1
4949
with:

Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
FROM python:3.7.7-slim-buster
2-
RUN mkdir /app
2+
ENV PARAMETERS=./defaults/webapp.cfg
33
WORKDIR /app
44
COPY README.md .
55
COPY setup.cfg .
66
COPY setup.py .
7-
COPY requirements.txt .
8-
# Creating an empty src dir is a (hopefully) temporary hack to improve layer caching and speed up image builds
9-
# todo fix once the Pipfile, setup.py, requirements.txt, pyprojec.toml build/dist story is figured out
10-
RUN mkdir src && pip install -q .
117
COPY .streamlit .streamlit
12-
COPY settings.cfg .
8+
COPY defaults defaults
139
COPY src src
10+
RUN pip install -q .
1411

1512
CMD ["streamlit", "run", "src/app.py"]
1613

Dockerfile.dash

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ WORKDIR /code
44

55
ARG PORT
66
ENV PORT $PORT
7+
ENV PARAMETERS=./defaults/webapp.cfg
78

8-
COPY requirements.txt requirements.txt
9-
RUN pip install -r requirements.txt
10-
9+
COPY README.md .
10+
COPY setup.py .
11+
COPY setup.cfg .
1112
COPY src src
13+
COPY defaults ./src/defaults
14+
RUN pip install -q .
1215

1316
# EXPOSE $PORT
1417

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: STREAMLIT_SERVER_PORT=$PORT streamlit run src/app.py
1+
web: PARAMETERS=defaults/webapp.cfg STREAMLIT_SERVER_PORT=$PORT streamlit run src/app.py

defaults/cli.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--current-hospitalized 69
2+
--doubling-time 5.0
3+
--hospitalized-days 7
4+
--hospitalized-rate 0.025
5+
--icu-days 9
6+
--icu-rate 0.0075
7+
--infectious-days 10
8+
--market-share 0.15
9+
--n-days 100
10+
--population 3600000
11+
--recovered 0
12+
--relative-contact-rate 0.45
13+
--ventilated-days 10
14+
--ventilated-rate 0.005
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
--current-hospitalized 14
1+
--current-hospitalized 69
2+
--date-first-hospitalized 2020-03-07
23
--doubling-time 4.0
34
--hospitalized-days 7
45
--hospitalized-rate 0.025
56
--icu-days 9
67
--icu-rate 0.0075
78
--infectious-days 14
8-
--market_share 0.15
9-
--n-days 60
10-
--population 4119405
9+
--market-share 0.15
10+
--n-days 100
11+
--population 3600000
12+
--recovered 0
1113
--relative-contact-rate 0.3
1214
--ventilated-days 10
1315
--ventilated-rate 0.005

defaults/readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Webapps need default values for both date_first_hosptalized and doubling_time. The ui overrides one of them.
2+
3+
CLI needs either date_first_hospitalized xor doubling_time.

defaults/webapp.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--current-hospitalized 69
2+
--date-first-hospitalized 2020-03-07
3+
--doubling-time 5.0
4+
--hospitalized-days 7
5+
--hospitalized-rate 0.025
6+
--icu-days 9
7+
--icu-rate 0.0075
8+
--infectious-days 10
9+
--market-share 0.15
10+
--n-days 100
11+
--population 3600000
12+
--recovered 0
13+
--relative-contact-rate 0.45
14+
--ventilated-days 10
15+
--ventilated-rate 0.005

docs/CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ As of March 21, help is especially wanted from contributors with experience in K
2626

2727
- [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [CodeforPhilly/chime](https://github.com/CodeForPhilly/chime) repo.
2828
- Base your work on the `develop` branch.
29+
- 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).
2930
- 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
3035
- Request review from the relevant maintainer(s).
3136
- Check your pull request periodically to see if any changes have been requested or any merge conflicts have arisen.
3237
- 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-
- If your change affects the results calculated or presented, update `change_date` in `src/penn_chime/parameters.py` when the pull request is ready for merge, so users can see when results have last changed
38+
- If your change affects the results calculated or presented, update `change_date` in `src/penn_chime/constants.py` when the pull request is ready for merge, so users can see when results have last changed
3439
- Note: Frequent contributors with write access can submit pull requests from a new branch in the `CodeforPhilly/chime` repository.
3540

3641
## Review & Release

0 commit comments

Comments
 (0)