validation is now working #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .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 commit -m "Normalize data files" | |
git push |