Skip to content

Commit b2fb357

Browse files
authored
Merge branch 'dev' into krivard/covid_hosp-older_than
2 parents eecc6b8 + 08de322 commit b2fb357

File tree

115 files changed

+4127
-5038
lines changed

Some content is hidden

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

115 files changed

+4127
-5038
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.1.4
2+
current_version = 4.1.13
33
commit = False
44
tag = False
55

.git-blame-ignore-revs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# style(black): format cdc acquisition
22
980b0b7e80c7923b79e14fee620645e680785703
3-
# style(black): format covidcast_nowcast acquisition
4-
9e6ff16f599e8feec34a08dd1bddbc5eae347b55
53
# style(black): format ecdc acquisition
64
d1141d904da4e62992b97c92d5caebd8fadffd42
75
# style(black): format flusurv acquisition

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
7676
- name: Start delphi_web_epidata
7777
run: |
78-
docker run --rm -d -p 10080:80 --env "MODULE_NAME=delphi.epidata.server.main" --env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" --env "FLASK_PREFIX=/epidata" --env "REDIS_HOST=delphi_redis" --env "REDIS_PASSWORD=1234" --env "API_KEY_REGISTER_WEBHOOK_TOKEN=abc" --env "API_KEY_ADMIN_PASSWORD=test_admin_password" --network delphi-net --name delphi_web_epidata delphi_web_epidata
78+
docker run --rm -d -p 10080:80 --env "MODULE_NAME=delphi.epidata.server.main" --env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" --env "FLASK_PREFIX=/epidata" --env "REDIS_HOST=delphi_redis" --env "REDIS_PASSWORD=1234" --env "API_KEY_REGISTER_WEBHOOK_TOKEN=abc" --env "API_KEY_ADMIN_PASSWORD=test_admin_password" --env "TESTING_MODE=True" --network delphi-net --name delphi_web_epidata delphi_web_epidata
7979
docker ps
8080
8181
- name: Run Unit Tests
@@ -101,7 +101,7 @@ jobs:
101101
uses: actions/checkout@v2
102102
- uses: actions/setup-node@v2
103103
with:
104-
node-version: '14.x'
104+
node-version: '16.x'
105105
- name: Cache Node.js modules
106106
uses: actions/cache@v2
107107
with:

.github/workflows/create-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
base: main
4040
title: Release Delphi Epidata ${{ steps.version.outputs.next_tag }}
4141
labels: chore
42-
reviewers: krivard
43-
assignees: krivard
42+
reviewers: melange396
43+
assignees: melange396
4444
body: |
4545
Releasing Delphi Epidata ${{ steps.version.outputs.next_tag }}.

.github/workflows/dependabot-assignments.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ permissions:
77
jobs:
88
dependabot:
99
runs-on: ubuntu-latest
10-
env:
11-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
env:
11+
GH_TOKEN: ${{ secrets.CMU_DELPHI_AUTOMATION_MACHINE_DEPENDABOT_PAT }}
1212
if: ${{ github.actor == 'dependabot[bot]' }}
1313
steps:
1414
- name: Assign team to PR
1515
run: gh pr edit "$PR_URL" --add-reviewer "cmu-delphi/code-reviewers"
1616
env:
17-
PR_URL: ${{github.event.pull_request.html_url}}
17+
PR_URL: ${{github.event.pull_request.html_url}}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: One-time performance testing - 8th November 2023
2+
3+
# Run "At every 30th minute on day-of-month 8 in November"
4+
on:
5+
schedule:
6+
- cron: '*/30 * 8 11 *'
7+
8+
# Add some extra perms to comment on a PR
9+
permissions:
10+
pull-requests: write
11+
contents: read
12+
13+
jobs:
14+
run-perftests:
15+
# Run this on Delphi's self-hosted runner
16+
runs-on: self-hosted
17+
outputs:
18+
request_count: ${{ steps.output.outputs.request_count }}
19+
failure_count: ${{ steps.output.outputs.failure_count }}
20+
med_time: ${{ steps.output.outputs.med_time }}
21+
avg_time: ${{ steps.output.outputs.avg_time }}
22+
min_time: ${{ steps.output.outputs.min_time }}
23+
max_time: ${{ steps.output.outputs.max_time }}
24+
requests_per_sec: ${{ steps.output.outputs.requests_per_sec }}
25+
steps:
26+
- name: Set up WireGuard
27+
uses: egor-tensin/setup-wireguard@v1.2.0
28+
with:
29+
endpoint: '${{ secrets.WG_PERF_ENDPOINT }}'
30+
endpoint_public_key: '${{ secrets.WG_PERF_ENDPOINT_PUBLIC_KEY }}'
31+
ips: '${{ secrets.WG_PERF_IPS }}'
32+
allowed_ips: '${{ secrets.WG_PERF_ALLOWED_IPS }}'
33+
private_key: '${{ secrets.WG_PERF_PRIVATE_KEY }}'
34+
- name: Clean files from previous runs
35+
uses: AutoModality/action-clean@v1
36+
- name: Check out repository
37+
uses: actions/checkout@v3
38+
- name: Set up repository # mimics install.sh in the README except that delphi is cloned from the PR rather than main
39+
run: |
40+
cd ..
41+
rm -rf driver
42+
mkdir -p driver/repos/delphi
43+
cd driver/repos/delphi
44+
git clone https://github.com/cmu-delphi/operations
45+
git clone https://github.com/cmu-delphi/utils
46+
git clone https://github.com/cmu-delphi/flu-contest
47+
git clone https://github.com/cmu-delphi/nowcast
48+
cd ../../
49+
50+
cd ..
51+
cp -R delphi-epidata driver/repos/delphi/delphi-epidata
52+
cd -
53+
54+
ln -s repos/delphi/delphi-epidata/dev/local/Makefile
55+
- name: Build & run epidata
56+
run: |
57+
cd ../driver
58+
sudo make web sql="${{ secrets.DB_CONN_STRING }}" rate_limit="999999/second"
59+
sudo make redis
60+
- name: Check out delphi-admin
61+
uses: actions/checkout@v3
62+
with:
63+
repository: cmu-delphi/delphi-admin
64+
token: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_PAT }}
65+
path: delphi-admin
66+
- name: Build & run Locust
67+
continue-on-error: true # sometimes ~2-5 queries fail, we shouldn't end the run if that's the case
68+
env:
69+
PERFTEST_API_KEY: ${{secrets.PERFTEST_API_KEY}}
70+
run: |
71+
cd delphi-admin/load-testing/locust
72+
docker build -t locust .
73+
export CSV=v4-requests-small.csv
74+
touch output_stats.csv && chmod 666 output_stats.csv
75+
touch output_stats_history.csv && chmod 666 output_stats_history.csv
76+
touch output_failures.csv && chmod 666 output_failures.csv
77+
touch output_exceptions.csv && chmod 666 output_exceptions.csv
78+
docker run --net=host -v $PWD:/mnt/locust -e CSV="/mnt/locust/${CSV}" locust -f /mnt/locust/v4.py --host http://127.0.0.1:10080/ --users 10 --spawn-rate 1 --headless -i "$(cat ${CSV} | wc -l)" --csv=/mnt/locust/output
79+
- name: Produce output for summary
80+
id: output
81+
uses: jannekem/run-python-script-action@v1
82+
with:
83+
script: |
84+
import os
85+
86+
def write_string(name, value):
87+
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
88+
print(f'{name}={value}', file=fh)
89+
90+
def write_float(name, value):
91+
write_string(name, "{:.2f}".format(float(value)))
92+
93+
with open("delphi-admin/load-testing/locust/output_stats.csv", "r", encoding="utf-8", errors="ignore") as scraped:
94+
final_line = scraped.readlines()[-1].split(",")
95+
write_string('request_count', final_line[2])
96+
write_string('failure_count', final_line[3])
97+
write_float('med_time', final_line[4])
98+
write_float('avg_time', final_line[5])
99+
write_float('min_time', final_line[6])
100+
write_float('max_time', final_line[7])
101+
write_float('requests_per_sec', final_line[9])
102+
103+
- name: Archive results as artifacts
104+
uses: actions/upload-artifact@v3
105+
with:
106+
name: locust-output
107+
path: |
108+
delphi-admin/load-testing/locust/output_*.csv

.github/workflows/performance-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
run-perftests:
1515
# Make sure 1. this is a PR, not an issue 2. it contains "/run performance test" anywhere in the body
1616
if: github.event.issue.pull_request && contains(github.event.comment.body, '/run performance test')
17-
runs-on: ubuntu-latest
17+
# Run this on Delphi's self-hosted runner
18+
runs-on: self-hosted
1819
outputs:
1920
request_count: ${{ steps.output.outputs.request_count }}
2021
failure_count: ${{ steps.output.outputs.failure_count }}
@@ -32,6 +33,8 @@ jobs:
3233
ips: '${{ secrets.WG_PERF_IPS }}'
3334
allowed_ips: '${{ secrets.WG_PERF_ALLOWED_IPS }}'
3435
private_key: '${{ secrets.WG_PERF_PRIVATE_KEY }}'
36+
- name: Clean files from previous runs
37+
uses: AutoModality/action-clean@v1
3538
- name: Check out repository
3639
uses: actions/checkout@v3
3740
# Previous step checks out default branch, so we check out the pull request's branch
@@ -43,6 +46,7 @@ jobs:
4346
- name: Set up repository # mimics install.sh in the README except that delphi is cloned from the PR rather than main
4447
run: |
4548
cd ..
49+
rm -rf driver
4650
mkdir -p driver/repos/delphi
4751
cd driver/repos/delphi
4852
git clone https://github.com/cmu-delphi/operations
@@ -59,7 +63,7 @@ jobs:
5963
- name: Build & run epidata
6064
run: |
6165
cd ../driver
62-
sudo make web sql="${{ secrets.DB_CONN_STRING }}"
66+
sudo make web sql="${{ secrets.DB_CONN_STRING }}" rate_limit="999999/second"
6367
sudo make redis
6468
- name: Check out delphi-admin
6569
uses: actions/checkout@v3
@@ -69,6 +73,8 @@ jobs:
6973
path: delphi-admin
7074
- name: Build & run Locust
7175
continue-on-error: true # sometimes ~2-5 queries fail, we shouldn't end the run if that's the case
76+
env:
77+
PERFTEST_API_KEY: ${{secrets.PERFTEST_API_KEY}}
7278
run: |
7379
cd delphi-admin/load-testing/locust
7480
docker build -t locust .

.github/workflows/release-helper.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
uses: actions/checkout@v2
9696
- uses: actions/setup-node@v2
9797
with:
98-
node-version: '14.x'
98+
node-version: '16.x'
9999
- name: Cache Node.js modules
100100
uses: actions/cache@v2
101101
with:
@@ -147,7 +147,7 @@ jobs:
147147
base: dev
148148
title: "chore: sync main->dev"
149149
labels: chore
150-
reviewers: krivard
151-
assignees: krivard
150+
reviewers: melange396
151+
assignees: melange396
152152
body: |
153153
Syncing Main->Dev.

.github/workflows/update_gdocs_data.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
commit-message: 'chore: update docs'
3232
title: Update Google Docs Meta Data
3333
labels: chore
34-
reviewers: krivard
35-
assignees: krivard
34+
reviewers: melange396
35+
assignees: melange396
3636
body: |
3737
Updating Google Docs Meta Data

deploy.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,13 @@
208208
"add-header-comment": true
209209
},
210210

211-
"// acquisition - covidcast_nowcast",
211+
"// maintenance",
212212
{
213213
"type": "move",
214-
"src": "src/acquisition/covidcast_nowcast/",
215-
"dst": "[[package]]/acquisition/covidcast_nowcast/",
214+
"src": "src/maintenance/",
215+
"dst": "[[package]]/maintenance/",
216216
"match": "^.*\\.(py)$",
217+
"recursive": true,
217218
"add-header-comment": true
218219
},
219220

0 commit comments

Comments
 (0)