File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Tab correcting and sorting on manually maintained tsv files
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - clean-metadata
7
+ tags-ignore :
8
+ - ' **'
9
+ paths :
10
+ - source-data/location_hierarchy.tsv
11
+ - source-data/gisaid_annotations.tsv
12
+
13
+ jobs :
14
+ clean-metadata :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+ - name : Set up Python
19
+ uses : actions/setup-python@v2
20
+ with :
21
+ python-version : ' 3.x'
22
+ - name : Install dependencies
23
+ run : |
24
+ PATH="$HOME/.local/bin:$PATH"
25
+ python3 -m pip install --upgrade pip setuptools
26
+ python3 -m pip install pipenv
27
+ - name : clean location hierarchies
28
+ run : |
29
+ pipenv sync
30
+ pipenv run ./bin/clean-tsv-metadata --metadata source-data/location_hierarchy.tsv --header
31
+ - name : clean annotations
32
+ run : |
33
+ pipenv sync
34
+ grep -v "paper\|title" source-data/gisaid_annotations.tsv > nonpaper_annotations.tsv
35
+ pipenv run ./bin/clean-tsv-metadata --metadata nonpaper_annotations.tsv --n-cols 4
36
+ grep "paper\|title" source-data/gisaid_annotations.tsv > paper_annotations.tsv
37
+ pipenv run ./bin/clean-tsv-metadata --metadata paper_annotations.tsv --n-cols 4 --sort-col 1
38
+ cat nonpaper_annotations.tsv > source-data/gisaid_annotations.tsv
39
+ cat paper_annotations.tsv >> source-data/gisaid_annotations.tsv
40
+ - name : commit cleaned tsvs
41
+ run : |
42
+ git config --global user.name "${{ github.actor }}"
43
+ git config --global user.email "${{ github.actor }}@users.noreply.github.com"
44
+ git diff --quiet || git commit -am "Automated commit: clean manually maintained tsvs"
45
+ git push
You can’t perform that action at this time.
0 commit comments