Data integration #12
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
# This workflow will install pytest, and test validity of data in repo. | |
name: Data integration | |
on: | |
push: | |
branches: [ "main" ] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.NICD_TOKEN }} | |
- name: Checkout private tools | |
uses: actions/checkout@v3 | |
with: | |
repository: NICD-Wastewater-Genomics/NICD-Freyja-outputs- | |
token: ${{ secrets.NICD_TOKEN }} | |
path: NICD-Freyja-outputs- | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Clone | |
shell: bash -l {0} | |
run: | | |
pip install pandas | |
pip install pyarrow | |
git config --global user.name "joshuailevy" | |
git config --global user.email "joshua.levy16@gmail.com" | |
cp NICD-Freyja-outputs-/scripts/NICD_daily_smoothed.csv . | |
cp NICD-Freyja-outputs-/scripts/NICD_monthly.csv . | |
cp NICD-Freyja-outputs-/scripts/merged_data.tsv . | |
python convert_data_format.py | |
- name: Push | |
run: | | |
if [[($(git status merged_data.tsv --porcelain | wc -c) -ne 0)]]; then | |
git add --all | |
git commit -m "automated core data update" | |
git push origin main | |
else | |
echo "no new samples, nothing to do" | |
fi |