This repository has been archived by the owner on Feb 24, 2025. It is now read-only.
auto commit -> added subject task data #17
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
name: Task1 QC | |
on: [push] | |
jobs: | |
process_raw: | |
runs-on: self-hosted | |
steps: | |
- name: checkout code and return recently uploaded file in data | |
uses: actions/checkout@v2 | |
- name: get most recent file | |
run: | | |
git config pull.rebase false | |
data=$(ls -t /data/*.txt | head -n 1) >> $GITHUB_ENV | |
echo "Most recent file: $data" | |
- name: set up python | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: parse raw | |
run: | | |
IFS='_' read -r sub task version <<< "$data" | |
echo "sub=$sub" >> $GITHUB_ENV | |
echo "version=$version" >> $GITHUB_ENV | |
echo "Subject: $sub" | |
echo "Version: $version" | |
- name: convert raw | |
run: | | |
mkdir data/${sub}/processed \ | |
python code/ConvertBeh.py -submission $data -out data/$sub/processed -sub $sub -task AF -taskvers $version | |
run_qc: | |
runs-on: self-hosted | |
needs: process_raw | |
steps: | |
- name: run quality control | |
run: python AFqC.py -s data/${sub}/processed/${sub}*.csv -o data/${sub}/ -sub ${sub} | tee data/${sub}/qc.log | |
push: | |
runs-on: self-hosted | |
needs: run_qc | |
steps: | |
- name: push results | |
run: | | |
git config user.email [email protected] | |
git config user.name "Zak Gilliam" | |
git add -A | |
git commit -m "QC results for ${sub}" | |
git push origin main |