Skip to content

Commit

Permalink
[INFRA] use code cov token (#125)
Browse files Browse the repository at this point in the history
* use code cov token

* update circle ci

* unlock data before running

* add git config

* do not unlock

* check version

* same but more

* bump up python things

* retry
  • Loading branch information
Remi-Gau authored Jan 20, 2023
1 parent c0b3c78 commit a02df1d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 10 deletions.
19 changes: 12 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,31 @@ jobs:
name: Install dependencies
command: |
sudo apt-get update
sudo apt-get install -y git-annex
python -m pip install --upgrade pip setuptools
pip install datalad
sudo apt-get install -y python3 git-annex
python3 -m pip install --upgrade pip setuptools
pip3 install datalad
datalad wtf
- restore_cache:
keys:
- my_cache
- run:
name: Get ds002799
command: |
# Git set up: to keep datalad warnings away
git config --global --add user.name "Ford Escort"
git config --global --add user.email 42@H2G2.com
mkdir -p ${HOME}/data/
datalad install -s ///openneuro/ds002799 ${HOME}/data/ds002799
cd ${HOME}/data/ds002799/derivatives/fmriprep
datalad get sub-30[27]/ses-*/func/*run-*preproc*bold*
datalad get sub-30[27]/ses-*/func/*run-*MNI152NLin2009cAsym*preproc*bold*
datalad unlock sub-30[27]/ses-*/func/*run-*MNI152NLin2009cAsym*preproc*bold*
- save_cache:
key: my_cache
paths:

- ~/data
- persist_to_workspace:
root: /home/circleci
paths:

- data/ds002799


Expand All @@ -76,8 +79,10 @@ jobs:
-v ${HOME}/outputs:/outputs \
cpp-lln-lab/bidsmreye \
/bids_dataset \
/outputs participant \
/outputs \
participant \
--participant_label 302 307 \
--space MNI152NLin2009cAsym \
--action all
no_output_timeout: 6h
- store_artifacts:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_and_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
matrix:
os: [ubuntu-latest, macOS-latest] # windows-latest: does not work because antspyx is not available for windows
python-version: ['3.8', '3.9', '3.10'] # '3.11' : some dependencies are not yet available for python 3.11
fail-fast: false

steps:

Expand All @@ -45,3 +46,4 @@ jobs:
flags: tests
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ docker_demo: docker_build clean-demo

docker_prepare_data:
docker run --rm -it \
--user "$$(id -u):$$(id -g)" \
-v $$PWD/tests/data/moae_fmriprep:/home/neuro/data \
-v $$PWD/outputs/moae_fmriprep/derivatives:/home/neuro/outputs/ \
cpplab/bidsmreye:unstable \
Expand All @@ -230,11 +229,26 @@ docker_prepare_data:

docker_generalize:
docker run --rm -it \
--user "$$(id -u):$$(id -g)" \
-v $$PWD/tests/data/moae_fmriprep:/home/neuro/data \
-v $$PWD/outputs/moae_fmriprep/derivatives:/home/neuro/outputs/ \
cpplab/bidsmreye:unstable \
/home/neuro/data/ \
/home/neuro/outputs/ \
participant \
--action generalize

docker_ds002799: get_ds002799
datalad unlock $$PWD/tests/data/ds002799/derivatives/fmriprep/sub-30[27]/ses-*/func/*run-*preproc*bold*
docker run --rm -it \
-v $$PWD/tests/data/ds002799/derivatives/fmriprep:/home/neuro/data \
-v $$PWD/outputs/ds002799/derivatives:/home/neuro/outputs/ \
cpplab/bidsmreye:unstable \
/home/neuro/data/ \
/home/neuro/outputs/ \
participant \
--action all \
--debug \
--participant_label 302 307 \
--space MNI152NLin2009cAsym \
--run 1 2 \
-vv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ eyes from the fMRI images.
If your data is not in MNI space, bidsmreye will also register the data to MNI.

```bash
bidsmreye --action prepapre \
bidsmreye --action prepare \
bids_dir \
output_dir
```
Expand Down
1 change: 1 addition & 0 deletions tests/data/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
moae_fmriprep
ds000201-der/derivatives
ds002799

0 comments on commit a02df1d

Please sign in to comment.