Skip to content

Commit 87ecfdb

Browse files
committed
Merge branch 'dev' into ndefries/flusurv-new-endpoint
2 parents 8be1074 + f4e92ef commit 87ecfdb

File tree

142 files changed

+5301
-2228
lines changed

Some content is hidden

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

142 files changed

+5301
-2228
lines changed

.bumpversion.cfg

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

@@ -11,8 +11,4 @@ tag = False
1111

1212
[bumpversion:file:src/client/packaging/npm/package.json]
1313

14-
[bumpversion:file:src/client/packaging/pypi/setup.py]
15-
16-
[bumpversion:file:src/client/packaging/pypi/delphi_epidata/__init__.py]
17-
1814
[bumpversion:file:dev/local/setup.cfg]

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ b9ceb400d9248c8271e8342275664ac5524e335d
2020
07ed83e5768f717ab0f9a62a9209e4e2cffa058d
2121
# style(black): format wiki acquisition
2222
923852eafa86b8f8b182d499489249ba8f815843
23+
# lint: trailing whitespace changes
24+
81179c5f144b8f25421e799e823e18cde43c84f9

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
closes|addresses <!--list issues closed or partially-addressed by this PR -->
1+
addresses issue(s) #ISSUE <!--list issue(s) associated with this PR -->
22

33
### Summary:
44

.github/workflows/create-release.yml

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
versionName:
7-
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)'
7+
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major)'
88
required: true
99
default: patch
1010

@@ -27,11 +27,43 @@ jobs:
2727
python-version: 3.8
2828
- name: Change version number
2929
id: version
30+
# See this issue for explanation and testing:
31+
# https://github.com/cmu-delphi/delphi-epidata/pull/1473
3032
run: |
3133
python -m pip install bump2version
32-
echo -n "::set-output name=next_tag::"
33-
bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",,
34-
- name: Create pull request into prod
34+
if [[ ${{ github.event.inputs.versionName }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35+
# use given version number
36+
NEXT_TAG="${{ github.event.inputs.versionName }}"
37+
elif [[ ${{ github.event.inputs.versionName }} =~ ^(major|minor|patch)$ ]]; then
38+
# calculate new version number based on given tag
39+
NEXT_TAG=$(bump2version --dry-run --list ${{ github.event.inputs.versionName }} | grep ^new_version | sed -r s,"^.*=",,)
40+
else
41+
echo "\nInvalid version name: ${{ github.event.inputs.versionName }}"
42+
exit 1
43+
fi
44+
# apply given or calculated version number
45+
bump2version --new-version $NEXT_TAG _ignored_arg_
46+
# save version number for later
47+
echo "next_tag=$NEXT_TAG" >> $GITHUB_OUTPUT
48+
- name: Get Python client file changes
49+
id: changed-py
50+
uses: dorny/paths-filter@v3
51+
with:
52+
base: "main"
53+
ref: "dev"
54+
filters: |
55+
python_client_changed:
56+
- src/client/delphi_epidata.py
57+
- src/client/packaging/pypi/**
58+
- name: Bump Python versions if client files changed
59+
if: steps.changed-py.outputs.python_client_changed == 'true'
60+
# _ignored_arg_ below is required because of tool quirk
61+
# https://github.com/c4urself/bump2version/issues/22
62+
run: |
63+
cd src/client/packaging/pypi
64+
# this is using the new literal version number (steps.version.outputs.next_tag) output from the bump2version step above, not the workflow input (github.event.inputs.versionName) which can be relative
65+
bump2version --allow-dirty --new-version ${{ steps.version.outputs.next_tag }} _ignored_arg_
66+
- name: Create pull request into main
3567
uses: peter-evans/create-pull-request@v3
3668
with:
3769
branch: release/delphi-epidata-${{ steps.version.outputs.next_tag }}

.github/workflows/missing_signals.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: python scripts/report_missing_covidcast_meta.py
2222
- name: Upload Missing Artifact
2323
if: failure()
24-
uses: actions/upload-artifact@v2
24+
uses: actions/upload-artifact@v4
2525
with:
2626
name: missing_db_signals.csv
2727
path: missing_db_signals.csv

.github/workflows/performance-tests-one-time.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ jobs:
2323
max_time: ${{ steps.output.outputs.max_time }}
2424
requests_per_sec: ${{ steps.output.outputs.requests_per_sec }}
2525
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 }}'
3426
- name: Clean files from previous runs
3527
uses: AutoModality/action-clean@v1
3628
- name: Check out repository
@@ -101,7 +93,7 @@ jobs:
10193
write_float('requests_per_sec', final_line[9])
10294
10395
- name: Archive results as artifacts
104-
uses: actions/upload-artifact@v3
96+
uses: actions/upload-artifact@v4
10597
with:
10698
name: locust-output
10799
path: |

.github/workflows/performance-tests.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ jobs:
2525
max_time: ${{ steps.output.outputs.max_time }}
2626
requests_per_sec: ${{ steps.output.outputs.requests_per_sec }}
2727
steps:
28-
- name: Set up WireGuard
29-
uses: egor-tensin/setup-wireguard@v1.2.0
30-
with:
31-
endpoint: '${{ secrets.WG_PERF_ENDPOINT }}'
32-
endpoint_public_key: '${{ secrets.WG_PERF_ENDPOINT_PUBLIC_KEY }}'
33-
ips: '${{ secrets.WG_PERF_IPS }}'
34-
allowed_ips: '${{ secrets.WG_PERF_ALLOWED_IPS }}'
35-
private_key: '${{ secrets.WG_PERF_PRIVATE_KEY }}'
3628
- name: Clean files from previous runs
3729
uses: AutoModality/action-clean@v1
3830
- name: Check out repository
@@ -109,7 +101,7 @@ jobs:
109101
write_float('requests_per_sec', final_line[9])
110102
111103
- name: Archive results as artifacts
112-
uses: actions/upload-artifact@v3
104+
uses: actions/upload-artifact@v4
113105
with:
114106
name: locust-output
115107
path: |

.github/workflows/release-helper.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,29 @@ jobs:
1313
if: github.repository_owner != 'cmu-delphi'
1414
run: exit 1
1515

16+
client_changed:
17+
needs: correct_repository
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@v2
22+
with:
23+
fetch-depth: 2
24+
- name: Get Python client file changes
25+
id: changed-py
26+
uses: dorny/paths-filter@v3
27+
with:
28+
# when base and ref are the same, changes are detected against the most recent commit before the push.
29+
# see https://github.com/dorny/paths-filter#usage for details.
30+
base: 'main'
31+
ref: 'main'
32+
filters: |
33+
python_client_changed:
34+
- src/client/delphi_epidata.py
35+
- src/client/packaging/pypi/**
36+
outputs:
37+
python_client_changed: ${{ steps.changed-py.outputs.python_client_changed }}
38+
1639
create_release:
1740
needs: correct_repository
1841
runs-on: ubuntu-latest
@@ -29,8 +52,8 @@ jobs:
2952
id: extract_version
3053
run: |
3154
python -m pip install bump2version
32-
echo -n "::set-output name=version::"
33-
bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",,
55+
VERSION=$(bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",,)
56+
echo "version=$VERSION" >> $GITHUB_OUTPUT
3457
- name: Create Release
3558
id: create_release
3659
uses: release-drafter/release-drafter@v5
@@ -45,7 +68,8 @@ jobs:
4568
tag_name: ${{ steps.create_release.outputs.tag_name }}
4669

4770
release_python_client:
48-
needs: create_release
71+
needs: [client_changed, create_release]
72+
if: needs.client_changed.outputs.python_client_changed == 'true'
4973
runs-on: ubuntu-latest
5074
steps:
5175
- name: Check out code
@@ -57,15 +81,15 @@ jobs:
5781
- name: Install build dependencies
5882
run: |
5983
python -m pip install --upgrade pip
60-
pip install wheel twine
84+
pip install build wheel twine
6185
- name: Prepare package
6286
run: |
6387
cp src/client/*.py src/client/packaging/pypi/delphi_epidata/
6488
- name: Create release
6589
working-directory: src/client/packaging/pypi
6690
run: |
67-
python setup.py sdist bdist_wheel
68-
- uses: actions/upload-artifact@v2
91+
python -m build --sdist --wheel
92+
- uses: actions/upload-artifact@v4
6993
with:
7094
name: delphi_epidata_py
7195
path: src/client/packaging/pypi/dist/*.tar.gz
@@ -80,8 +104,8 @@ jobs:
80104
with:
81105
user: __token__
82106
password: ${{ secrets.DELPHI_PYPI_PROD_TOKEN }}
83-
packages_dir: src/client/packaging/pypi/dist/
84-
skip_existing: true
107+
packages-dir: src/client/packaging/pypi/dist/
108+
skip-existing: true
85109
# repository_url: https://test.pypi.org/legacy/
86110

87111
release_js_client:
@@ -95,7 +119,7 @@ jobs:
95119
uses: actions/checkout@v2
96120
- uses: actions/setup-node@v2
97121
with:
98-
node-version: '16.x'
122+
node-version: "16.x"
99123
- name: Cache Node.js modules
100124
uses: actions/cache@v2
101125
with:
@@ -108,7 +132,7 @@ jobs:
108132
- run: npm pack
109133
- name: Rename to a different name
110134
run: for f in *.tgz; do mv "$f" "$(echo "$f" | sed s/delphi_epidata-/delphi_epidata_js-/)"; done
111-
- uses: actions/upload-artifact@v2
135+
- uses: actions/upload-artifact@v4
112136
with:
113137
name: delphi_epidata_js
114138
path: src/client/packaging/npm/*.tgz

.github/workflows/update_gdocs_data.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ jobs:
2121
restore-keys: |
2222
${{ runner.os }}-pipd-
2323
- name: Install Dependencies
24-
run: pip install -r requirements.dev.txt
24+
run: |
25+
pip -V
26+
python -m pip install pip==22.0.2
27+
pip install -r requirements.dev.txt
2528
- name: Update Docs
2629
run: inv update-gdoc
2730
- name: Create pull request into dev

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,35 @@ __pycache__/
1111
/node_modules
1212
.mypy_cache
1313
/missing_db_signals.csv
14+
15+
16+
17+
##Added by Tina to avoid tracking R studio config files
18+
# History files
19+
.Rhistory
20+
.Rapp.history
21+
22+
# Session Data files
23+
.RData
24+
.RDataTmp
25+
26+
# User-specific files
27+
.Ruserdata
28+
29+
# RStudio files
30+
.Rproj.user/
31+
32+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
33+
.httr-oauth
34+
35+
# knitr and R markdown default cache directories
36+
*_cache/
37+
/cache/
38+
39+
# R Environment Variables
40+
.Renviron
41+
42+
# RStudio Connect folder
43+
rsconnect/
44+
45+
*.Rproj

0 commit comments

Comments
 (0)