-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.55 KB
/
normalize.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
# .github/workflows/normalize-data.yml
name: Normalize Data
on:
pull_request:
branches:
- main
paths:
- DETECTION_RESULTS.tsv
- normalize.yml
jobs:
normalize-data:
name: Normalize Data
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependencies
run: |
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
- name: Normalize Data
run: |
source .venv/bin/activate
python3 scripts/__main__.py \
--input_table DETECTION_RESULTS.tsv \
--assets_dir assets/
- name: Overwrite Pre-normalized Data
run: |
rm DETECTION_RESULTS.tsv
mv normalized_table.tsv DETECTION_RESULTS.tsv
- name: Commit Normalized Data
if: success()
run: |
git config --global user.name 'GitHub Actions Bot'
git config --global user.email '[email protected]'
git add DETECTION_RESULTS.tsv
git fetch origin proposals
git commit -m "Normalize data files"
git push origin HEAD:proposals