Skip to content

Commit

Permalink
Merge pull request #184 from automaticanalysis/resync
Browse files Browse the repository at this point in the history
Resync
  • Loading branch information
tiborauer committed Nov 13, 2021
2 parents 6fef5f9 + 2254c89 commit fcf01fc
Show file tree
Hide file tree
Showing 39 changed files with 792 additions and 455 deletions.
189 changes: 189 additions & 0 deletions .github/workflows/aa_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,83 @@ defaults:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
aatest_ds000114_AROMA:
name: Testing AROMA on fMRI

# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 51200
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'

- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '2.7'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
# MATLAB release to set up R2020a
release: R2020a

- name: Install tools under $HOME/tools (SPM, FaceMasking, FSL)
run: |
source $GITHUB_WORKSPACE/.github/workflows/tools_install.sh
env:
LOAD_FSL: 1
LOAD_FREESURFER: 0

- name: Retrive test data under $HOME/data/aa_demo
run: |
mkdir -p $HOME/data/aa_demo
aws s3 cp s3://openneuro.org/ds000114 $HOME/data/aa_demo/ds000114 --quiet --recursive --exclude "*" --include "task-*" --no-sign-request
aws s3 cp s3://openneuro.org/ds000114 $HOME/data/aa_demo/ds000114 --quiet --recursive --exclude "*" --include "dwi*" --no-sign-request
aws s3 cp s3://openneuro.org/ds000114/sub-01 $HOME/data/aa_demo/ds000114/sub-01 --quiet --recursive --no-sign-request
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true

- name: Configure aa
run: |
echo "Free space:"
df -h
mkdir $HOME/.aa
cp $GITHUB_WORKSPACE/.github/workflows/aap_parameters_defaults_GitHub.xml $HOME/.aa/aap_parameters_user.xml
mkdir $HOME/projects
- name: Run script
uses: matlab-actions/run-command@v1
with:
command: addpath(getenv('GITHUB_WORKSPACE')); aa_ver5; SPM = spmClass(fullfile(getenv('HOME'),'tools','spm12')); SPM.load; aa_test('glob','aatest_ds000114_AROMA','haltonerror',true)

- name: Archive results
uses: actions/upload-artifact@v2
with:
name: aatest_ds000114_AROMA
path: |
~/projects/
aatest_ds000114_dartel:
name: Testing SPM DARTEL

Expand All @@ -45,6 +122,14 @@ jobs:
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '2.7'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
Expand Down Expand Up @@ -114,6 +199,14 @@ jobs:
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '2.7'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
Expand Down Expand Up @@ -183,6 +276,14 @@ jobs:
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '2.7'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
Expand Down Expand Up @@ -229,6 +330,86 @@ jobs:
path: |
~/projects/
aatest_ds000114_scrubbing:
name: Testing fMRI frame censoring

# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 51200
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'

- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '2.7'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
# MATLAB release to set up R2020a
release: R2020a

- name: Install tools under $HOME/tools (SPM, FaceMasking, FSL standards)
run: |
source $GITHUB_WORKSPACE/.github/workflows/tools_install.sh
env:
LOAD_FSL: 0
LOAD_FREESURFER: 0

- name: Retrive test data under $HOME/data/aa_demo
run: |
mkdir -p $HOME/data/aa_demo
aws s3 cp s3://openneuro.org/ds000114 $HOME/data/aa_demo/ds000114 --quiet --recursive --exclude "*" --include "task-*" --no-sign-request
aws s3 cp s3://openneuro.org/ds000114 $HOME/data/aa_demo/ds000114 --quiet --recursive --exclude "*" --include "dwi*" --no-sign-request
aws s3 cp s3://openneuro.org/ds000114/sub-01 $HOME/data/aa_demo/ds000114/sub-01 --quiet --recursive --no-sign-request
aws s3 cp s3://openneuro.org/ds000114/sub-02 $HOME/data/aa_demo/ds000114/sub-02 --quiet --recursive --no-sign-request
aws s3 cp s3://openneuro.org/ds000114/sub-03 $HOME/data/aa_demo/ds000114/sub-03 --quiet --recursive --no-sign-request
aws s3 cp s3://openneuro.org/ds000114/sub-04 $HOME/data/aa_demo/ds000114/sub-04 --quiet --recursive --no-sign-request
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true

- name: Configure aa
run: |
echo "Free space:"
df -h
mkdir $HOME/.aa
cp $GITHUB_WORKSPACE/.github/workflows/aap_parameters_defaults_GitHub.xml $HOME/.aa/aap_parameters_user.xml
mkdir $HOME/projects
- name: Run script
uses: matlab-actions/run-command@v1
with:
command: addpath(getenv('GITHUB_WORKSPACE')); aa_ver5; SPM = spmClass(fullfile(getenv('HOME'),'tools','spm12')); SPM.load; aa_test('glob','aatest_ds000114_scrubbing','haltonerror',true)

- name: Archive results
uses: actions/upload-artifact@v2
with:
name: aatest_ds000114_scrubbing
path: |
~/projects/
aatest_ds002737_deface:
name: Testing (Freesurfer) Deface and FaceMasking

Expand All @@ -254,6 +435,14 @@ jobs:
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '2.7'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/aap_parameters_defaults_GitHub.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
<toolbox desc='Toolbox with implemented interface in extrafunctions/toolboxes' ui='custom'>
<name desc='Name corresponding to the name of the interface without the "Class" suffix' ui='text'>spm</name>
<dir ui='dir'>/home/runner/tools/spm12</dir>
</toolbox>
<toolbox desc='Toolbox with implemented interface in extrafunctions/toolboxes' ui='custom'>
<name desc='Name corresponding to the name of the interface without the "Class" suffix' ui='text'>wls</name>
<dir ui='dir'>/home/runner/tools/rwls</dir>
</toolbox>
<toolbox desc='Toolbox with implemented interface in extrafunctions/toolboxes' ui='custom'>
<name desc='Name corresponding to the name of the interface without the "Class" suffix' ui='text'>aroma</name>
<dir ui='dir'>/home/runner/tools/ICA-AROMA</dir>
</toolbox>
<linuxshell desc='Linux shell used to run linux commands' ui='text'>bash</linuxshell>
<fsldir desc='Path to fsl' ui='dir'>/home/runner/tools/fsl</fsldir>
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tools_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ TEMPLATEDIR=$TOOLDIR/templates

sudo apt-get update
sudo apt-get install libtinfo5 libtinfo6 dc libxml2-utils
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o $TOOLDIR/get-pip.py
python $TOOLDIR/get-pip.py --force-reinstall

# All MATLAB tools MUST be installed referred by the parameterset
source $GITHUB_WORKSPACE/.github/workflows/tools_urls.sh
source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_matlabtools.sh $GITHUB_WORKSPACE/.github/workflows/aap_parameters_defaults_GitHub.xml $TOOLDIR
source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_tools.sh $GITHUB_WORKSPACE/.github/workflows/aap_parameters_defaults_GitHub.xml $TOOLDIR

echo "FSL: ${LOAD_FSL}; FREESURFER: ${LOAD_FREESURFER}"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tools_urls.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Set of variables (URL_<tool name with lower case>) describing the source of tools

URL_spm=git+https://github.com/spm/spm12
URL_facemasking=git+https://github.com/mmilch01/mask_face
URL_facemasking=git+https://github.com/mmilch01/mask_face
URL_aroma=git+https://github.com/maartenmennes/ICA-AROMA
URL_wls=git+https://github.com/jdiedrichsen/rwls
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ for supporting research at the MRC Cognition and Brain Science Unit. It
is made available to the academic community in the hope that it may
prove useful.

![CI](https://github.com/automaticanalysis/automaticanalysis/actions/workflows/aa_test.yml/badge.svg?event=push)
[![Docker image available!](https://img.shields.io/badge/docker-bids%2Faa-brightgreen.svg?logo=docker&style=flat)](https://hub.docker.com/r/bids/aa/)
[![manuscript](https://img.shields.io/badge/doi-10.3389%2Ffninf.2014.00090-blue.svg?style=flat)](http://doi.org/10.3389/fninf.2014.00090)
[![resource](https://img.shields.io/badge/RRID-SCR__003560-blue?style=flat)](https://scicrunch.org/scicrunch/Resources/record/nlx_144509-1/SCR_003560/resolver)
Expand Down

0 comments on commit fcf01fc

Please sign in to comment.