This repository has been archived by the owner on Feb 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13b4e26
commit d6ada6a
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Task1 QC | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
process_raw: | ||
runs-on: self-hosted | ||
steps: | ||
- name: checkout code and return recently uploaded file in /data | ||
uses: actions/checkout@v2 | ||
run: | | ||
git pull origin main | ||
#!/bin/bash | ||
data=$(ls -t /data/*.txt | head -n 1) | ||
- name: set up python | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: parse raw | ||
run: | | ||
// add bash to parse raw data filename, split by '_', and save as local variable | ||
#!/bin/bash | ||
filename=$(basename $data) | ||
IFS='_' read -r sub task version <<< "$filename" | ||
echo "sub=$sub" >> $GITHUB_ENV | ||
echo "task=$task" >> $GITHUB_ENV | ||
echo "version=$version" >> $GITHUB_ENV | ||
echo "Subject: $sub" | ||
echo "Task: $task" | ||
echo "Version: $version" | ||
- name: convert raw | ||
run: | | ||
mkdir data/${sub}/processed | ||
python code/ConvertBeh.py -submission ${data} -out data/${sub}/processed -sub ${sub} -task ${task} -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 |