Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
auto commit -> added subject task data
Browse files Browse the repository at this point in the history
  • Loading branch information
miloswrath committed Aug 29, 2024
1 parent f060f80 commit e4ee855
Show file tree
Hide file tree
Showing 6 changed files with 573 additions and 4 deletions.
57 changes: 57 additions & 0 deletions .github/AF.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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: python code/ConvertBeh.py -submission $data -out data/$sub/processed

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 remote set-url origin //insert PAT
git add -A
git commit -m "QC results for ${sub}"
git push origin main
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ jobs:
run: |
IFS='_' read -r sub task version <<< "$data"
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
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
Expand Down
Loading

0 comments on commit e4ee855

Please sign in to comment.