Skip to content

Commit ea185f0

Browse files
Merge branch 'develop' into docs-limited-kubeconfigs
2 parents d30c840 + 16c17a8 commit ea185f0

File tree

122 files changed

+56844
-719
lines changed

Some content is hidden

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

122 files changed

+56844
-719
lines changed

.cache/v/cache/lastfailed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"test_app.py": true
3+
}

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ venv
2525
ENV
2626
env.bak
2727
venv.bak
28+
cypress
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: General bug report
3+
about: Create an report to help us improve.
4+
title: [bug]
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Before you begin, please help us manage volume by checking if this could be submitted another way:
12+
- Usage questions? Ask in Slack [#chime-help](https://codeforphilly.org/chat?channel=chime-help).
13+
- Feature ideas? Propose in Slack for discussion.
14+
- Is this something you can debug and fix? Pull requests are very welcome.
15+
-->
16+
17+
### Description:
18+
19+
### Steps to reproduce:
20+
1.
21+
2.
22+
3.
23+
24+
### Expected behavior:
25+
26+
### What I got instead:
27+
(screenshots if applicable)

.github/ISSUE_TEMPLATE/model.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report for model
3+
about: Feedback or bug report for the epidemiological model and analysis.
4+
title: [model]
5+
labels: 'models'
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Please note: Any changes to the model have a huge impact on rapidly evolving hospital system & public health decisions. The current model has been in use for a while now, and it has been validated against other similar models, so any changes to the model must meet a very high bar.
12+
13+
However, these 2 types of issue reports are very welcome:
14+
- Bugs causing this model to produce invalid results. In this case, please include details and a suggested fix.
15+
- If this model is producing a significantly different result than another well-known epidemiological model. In this case, please include proof of this difference and a suggested fix to our approach.
16+
17+
For questions or early discussion, please join us in [#chime-analysis](https://codeforphilly.org/chat?channel=chime-analysis) in Slack instead.
18+
-->
19+
20+
### Summary
21+
22+
23+
### Additional details
24+
25+
26+
### Suggested fix

.github/workflows/dockerpublish.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Docker
2+
3+
on:
4+
push:
5+
# Publish `v1.2.3` tags as releases.
6+
tags:
7+
- v*
8+
9+
# Run tests for any PRs.
10+
pull_request:
11+
12+
env:
13+
IMAGE_NAME: penn-chime
14+
15+
jobs:
16+
# Run tests.
17+
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
18+
test:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Run tests
25+
run: |
26+
if [ -f docker-compose.test.yml ]; then
27+
docker-compose --file docker-compose.test.yml build
28+
docker-compose --file docker-compose.test.yml run sut
29+
else
30+
docker build . --file Dockerfile
31+
fi
32+
33+
# Push image to GitHub Packages.
34+
# See also https://docs.docker.com/docker-hub/builds/
35+
push:
36+
# Ensure test job passes before pushing image.
37+
needs: test
38+
39+
runs-on: ubuntu-latest
40+
if: github.event_name == 'push'
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
45+
- name: Build image
46+
run: docker build . --file Dockerfile --tag image
47+
48+
- name: Log into registry
49+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
50+
51+
- name: Push image
52+
run: |
53+
IMAGE_ID="docker.pkg.github.com/${GITHUB_REPOSITORY,,}/${IMAGE_NAME}"
54+
55+
# Strip git ref prefix from version
56+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
57+
58+
# Strip "v" prefix from tag name
59+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
60+
61+
# Use Docker `latest` tag convention
62+
[ "$VERSION" == "master" ] && VERSION=latest
63+
64+
echo IMAGE_ID=$IMAGE_ID
65+
echo VERSION=$VERSION
66+
67+
docker tag image $IMAGE_ID:$VERSION
68+
docker push $IMAGE_ID:$VERSION

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish GitBook to GH Pages
33
on:
44
push:
55
branches:
6-
- 'master'
6+
- 'develop'
77

88

99
jobs:
@@ -25,6 +25,6 @@ jobs:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
HAB_LICENSE: accept
2727
with:
28-
ref: master
28+
ref: develop
2929
holobranch: gh-pages
3030
commit-to: gh-pages

.github/workflows/heroku.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy working development app to Heroku staging project
2+
3+
on:
4+
push:
5+
branches:
6+
- 'develop'
7+
8+
env:
9+
HEROKU_USER: 32dd7c8d-eb68-4420-bfe2-9ed047ef8fb0
10+
HEROKU_SECRET: ${{ secrets.heroku_secret_key }}
11+
HEROKU_APP: cfp-ci-chime
12+
HEROKU_EMAIL: [email protected]
13+
14+
jobs:
15+
deploy-heroku-stg:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Deploy app
20+
id: deploy_stg_job
21+
uses: akhileshns/[email protected]
22+
with:
23+
heroku_api_key: ${HEROKU_SECRET}
24+
heroku_app_name: ${HEROKU_APP}
25+
heroku_email: ${HEROKU_EMAIL}
26+
- name: Return app URL
27+
run: |
28+
echo "Deployed to: https://${HEROKU_APP}.herokuapp.com/"

.github/workflows/pythonapp.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Chime Lint and Test
5+
6+
on:
7+
push:
8+
branches:
9+
- '**'
10+
pull_request:
11+
branches:
12+
- develop
13+
- 'releases/**'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python 3.8
22+
uses: actions/setup-python@v1
23+
with:
24+
python-version: 3.8
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -r requirements.txt
29+
- name: Lint with flake8
30+
run: |
31+
pip install flake8
32+
# stop the build if there are Python syntax errors or undefined names
33+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
- name: Test with pytest
37+
run: |
38+
pip install pytest
39+
python -m pytest
40+
- name: Run App
41+
run: |
42+
streamlit run src/app.py &
43+
- name: Cypress
44+
uses: cypress-io/[email protected]
45+
with:
46+
working-directory: e2e
47+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ venv.bak/
1515

1616
# mypy
1717
.mypy_cache/
18+
__pycache__/

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ RUN pip install -q -r requirements.txt
1010

1111
COPY . ./
1212

13-
CMD ["streamlit", "run", "app.py"]
13+
CMD ["streamlit", "run", "src/app.py"]

0 commit comments

Comments
 (0)