From da92a08bfbc734ea3ca22d249a64ab9a1766ae2e Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 1 Sep 2022 15:36:31 -0400 Subject: [PATCH 1/4] ENH: Allow passing in specific nipype branch --- generate.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/generate.sh b/generate.sh index 3c2f44d..635192a 100644 --- a/generate.sh +++ b/generate.sh @@ -2,6 +2,16 @@ set -e +NIPYPE_BRANCH=${1:-"master"} +case $NIPYPE_BRANCH in + master) + NIPYPE_URL="https://github.com/nipy/nipype/tarball/master" + ;; + *) + NIPYPE_URL="git+https://github.com/nipy/nipype.git@${NIPYPE_BRANCH}" + ;; +esac + # Generate Dockerfile generate_docker() { docker run --rm kaczmarj/neurodocker:master generate docker \ @@ -17,7 +27,7 @@ generate_docker() { --miniconda \ conda_install="python=3.8 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \ - pip_install="https://github.com/nipy/nipype/tarball/master+%20%20%20%20%20%20%20%20%20%20%20%20%20pip_install="$NIPYPE_URL pybids==0.13.1 nilearn datalad[full] nipy duecredit nbval niflow-nipype1-workflows" \ create_env="neuro" \ @@ -56,7 +66,7 @@ generate_singularity() { --miniconda \ conda_install="python=3.7 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \ - pip_install="https://github.com/nipy/nipype/tarball/master+%20%20%20%20%20%20%20%20%20%20%20%20%20pip_install="$NIPYPE_URL pybids==0.13.1 nilearn datalad[full] nipy duecredit nbval niflow-nipype1-workflows" \ create_env="neuro" \ From 1836933d07a1cdb129ab8bcc4a7890114a3c5511 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 1 Sep 2022 15:37:02 -0400 Subject: [PATCH 2/4] MAINT: Bump singularity python version --- generate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate.sh b/generate.sh index 635192a..81ec0f1 100644 --- a/generate.sh +++ b/generate.sh @@ -64,7 +64,7 @@ generate_singularity() { --user=neuro \ --workdir /home/neuro \ --miniconda \ - conda_install="python=3.7 pytest jupyter jupyterlab jupyter_contrib_nbextensions + conda_install="python=3.8 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \ pip_install="$NIPYPE_URL pybids==0.13.1 From b574d85b8fa65e6e46b7bf0b9e6bb4c6f9755414 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 1 Sep 2022 15:44:33 -0400 Subject: [PATCH 3/4] TST: Add manual trigger option to GHA --- .github/workflows/testing.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ccdc31d..b265c03 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,6 +5,12 @@ on: branches: [ master ] pull_request: branches: [ master ] + workflow_dispatch: + inputs: + nipype_branch: + description: 'Build specific Nipype branch' + required: true + default: 'master' jobs: @@ -14,7 +20,10 @@ jobs: steps: - uses: actions/checkout@v2 - name: generate the Dockerfile from generate.sh - run: bash generate.sh + run: | + BRANCH=${{ github.event.inputs.nipype_branch }} + BRANCH=${BRANCH:-"master"} + bash generate.sh $BRANCH # In this step, this action saves a list of existing images, # the cache is created without them in the post run. # It also restores the cache if it exists. From 9cc50bdf8151cca19bdea0398b2b63336161094d Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 21 Sep 2022 10:39:40 -0400 Subject: [PATCH 4/4] CI: Reset docker layer caching --- .github/workflows/testing.yml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b265c03..5ac3bc4 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,4 +1,4 @@ -name: CI +name: Build & run notebooks on: push: @@ -27,7 +27,12 @@ jobs: # In this step, this action saves a list of existing images, # the cache is created without them in the post run. # It also restores the cache if it exists. - - uses: satackey/action-docker-layer-caching@v0.0.7 + - uses: satackey/action-docker-layer-caching@v0.0.11 + with: + key: tutorial-docker-cache-{hash} + restore-keys: | + tutorial-docker-cache- + layer-tutorial-docker-cache- - name: build the image run: docker build . --file Dockerfile -t nipype_tutorial:latest @@ -35,8 +40,12 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: satackey/action-docker-layer-caching@v0.0.7 + - uses: satackey/action-docker-layer-caching@v0.0.11 + with: + key: tutorial-docker-cache-{hash} + restore-keys: | + tutorial-docker-cache- + layer-tutorial-docker-cache- - name: run test 1 run: docker run --rm nipype_tutorial:latest python /home/neuro/nipype_tutorial/test_notebooks.py 1 @@ -44,8 +53,12 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: satackey/action-docker-layer-caching@v0.0.7 + - uses: satackey/action-docker-layer-caching@v0.0.11 + with: + key: tutorial-docker-cache-{hash} + restore-keys: | + tutorial-docker-cache- + layer-tutorial-docker-cache- - name: run test 2 run: docker run --rm nipype_tutorial:latest python /home/neuro/nipype_tutorial/test_notebooks.py 2 @@ -53,7 +66,11 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: satackey/action-docker-layer-caching@v0.0.7 + - uses: satackey/action-docker-layer-caching@v0.0.11 + with: + key: tutorial-docker-cache-{hash} + restore-keys: | + tutorial-docker-cache- + layer-tutorial-docker-cache- - name: run test 3 run: docker run --rm nipype_tutorial:latest python /home/neuro/nipype_tutorial/test_notebooks.py 3