-
Notifications
You must be signed in to change notification settings - Fork 16
158 lines (147 loc) · 4.34 KB
/
epidata_main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Epidata-CI
on:
schedule:
- cron: "40 1 * * *"
push:
branches:
- 'main'
tags:
- version-*
paths:
- '**/memilio-epidata/**'
- '.github/**'
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- '**/memilio-epidata/**'
- '.github/**'
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: pre-commit/[email protected]
build-py-epidata:
runs-on: ubuntu-22.04
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-py
with:
package: epidata
build-py-plot:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-py
with:
package: plot
test-py-epidata:
needs: build-py-epidata
strategy:
matrix:
version: ["3.8", "3.11"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-py
with:
version: ${{ matrix.version }}
package: epidata
coverage: ON
test-py-plot:
if: github.event.pull_request.draft == false
needs: [build-py-plot, build-py-epidata]
strategy:
matrix:
version: ["3.8", "3.11"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-py
with:
version: ${{ matrix.version }}
package: plot
coverage: ON
merge-artifacts:
runs-on: ubuntu-22.04
strategy:
matrix:
packages: [epidata, plot]
needs: [test-py-plot, test-py-epidata]
steps:
- name: merge epidata reports
uses: actions/upload-artifact/merge@v4
with:
name: test-py-coverage-reports-${{ matrix.packages }}
pattern: test-py-coverage-reports-${{ matrix.packages }}-*
test-pylint-epidata:
needs: build-py-epidata
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-pylint
with:
package: epidata
test-pylint-plot:
needs: build-py-plot
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-pylint
with:
package: plot
download-data:
needs: build-py-epidata
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq -y install python3-pip gnupg
python -m pip install --upgrade pip
- name: Download Python Wheels
uses: actions/download-artifact@v4
with:
name: python-wheels-epidata
path: pycode/wheelhouse
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Python Wheels
run: |
for pkg in `ls pycode/wheelhouse/*cp311*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
- name: Download Data
run: |
mkdir -p data_dl
getcasedata -o data_dl --no-progress-indicators
getpopuldata -o data_dl --no-progress-indicators
getjhdata -o data_dl --no-progress-indicators
getdividata -o data_dl --no-progress-indicators
getcommutermobility -o data_dl --no-progress-indicators
getvaccinationdata -o data_dl --no-progress-indicators
gethospitalizationdata -o data_dl --no-progress-indicators
- name: Upload Data
uses: actions/upload-artifact@v4
with:
name: data
path: |
data_dl/*.json
data_dl/Germany/*.json
data_dl/Spain/*.json
data_dl/France/*.json
data_dl/Italy*.json
data_dl/SouthKorea/*.json
data_dl/US/*.json
data_dl/China/*.json
retention-days: 1