-
Notifications
You must be signed in to change notification settings - Fork 12
98 lines (78 loc) · 3.37 KB
/
update_epicovid.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
name: "UpdateEpidemiolocialCovid-19"
on:
workflow_dispatch:
jobs:
import_erviss_data_job:
if: github.repository_owner == 'european-modelling-hubs'
runs-on: ubuntu-latest
outputs:
changed_files: ${{ steps.import_erviss.outputs.imported_files }}
steps:
# Checkout the hub tools repo for python scripts
# -------------------------------------------------
- name: checkout hub tools repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: 'european-modelling-hubs/hub-tools'
ref: 'main'
path: './tools/'
# Checkout the data repository
# -------------------------------------------
- name: checkout data repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: 'european-modelling-hubs/RespiCompass'
ref: 'main'
path: './repo/'
# Setup Pyton env, version 3.10
# --------------------------------
- uses: actions/setup-python@v4
with:
python-version: '3.10'
# Install additional packages
# --------------------------------
- run: pip install pandas
# Run Python script to import erviss data
# -----------------------------------------
- name: Import Erviss data
id: import_erviss
run: |
echo ">>> Updating ICUadmissions..."
python ./tools/code/SH_get_erviss_data.py --indicator "ICUadmissions" --pathogen "SARS-CoV-2" \
--url "https://raw.githubusercontent.com/EU-ECDC/Respiratory_viruses_weekly_data/main/data/nonSentinelSeverity.csv" \
--path_to_save "./repo/auxiliary-data/covid-19/epidemiological"
echo ">>> Updating deaths..."
python ./tools/code/SH_get_erviss_data.py --indicator "deaths" --pathogen "SARS-CoV-2" \
--url "https://raw.githubusercontent.com/EU-ECDC/Respiratory_viruses_weekly_data/main/data/nonSentinelSeverity.csv" \
--path_to_save "./repo/auxiliary-data/covid-19/epidemiological"
echo ">>> Updating hospitaladmissions..."
python ./tools/code/SH_get_erviss_data.py --indicator "hospitaladmissions" --pathogen "SARS-CoV-2" \
--url "https://raw.githubusercontent.com/EU-ECDC/Respiratory_viruses_weekly_data/main/data/nonSentinelSeverity.csv" \
--path_to_save "./repo/auxiliary-data/covid-19/epidemiological"
echo ">>> Updates completed"
# Make a copy of targets
# -----------------------------------------------
- name: Copy Targets
id: copy_targets
run: |
echo ">>> Copying hospitaladmissions to targets"
cp -rf ./repo/auxiliary-data/covid-19/epidemiological/hospitaladmissions.csv ./repo/target-data/covid-19/hospitaladmissions.csv
echo ">>> hospitaladmissions copy completed"
# Commit changes to dt
# -----------------------------------------
- name: Commit data repo changes
uses: EndBug/add-and-commit@v7
with:
cwd: './repo'
message: "Updating Truth Data repo ..."
default_author: github_actions
push: true
# call-persisting-wf:
# needs: import_erviss_data_job
# uses: european-modelling-hubs/RespiCompass/.github/workflows/persist_changes.yml@main
# with:
# changes-list: ${{ needs.import_erviss_data_job.outputs.changed_files }}
# secrets:
# envPAT: ${{ secrets.GITHUB_TOKEN }}