Skip to content

Commit

Permalink
Merge branch 'master' into maint/nilearn_0_5
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies authored Jan 14, 2020
2 parents fd52a30 + 5d2fe1d commit 8c368c9
Show file tree
Hide file tree
Showing 1,395 changed files with 67,231 additions and 90,263 deletions.
159 changes: 86 additions & 73 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,6 @@ _build_main_image_py36: &build_main_image_py36
--build-arg VCS_REF="$(git rev-parse --short HEAD)" \
--build-arg VERSION="${CIRCLE_TAG}" /home/circleci/nipype
_build_main_image_py27: &build_main_image_py27
name: Build main image (py27)
no_output_timeout: 60m
command: |
tools/retry_cmd.sh -n 5 -s 15 \
docker build \
--rm=false \
--tag nipype/nipype:py27 \
--build-arg PYTHON_VERSION_MAJOR=2 \
--build-arg PYTHON_VERSION_MINOR=7 \
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--build-arg VCS_REF="$(git rev-parse --short HEAD)" \
--build-arg VERSION="${CIRCLE_TAG}-py27" /home/circleci/nipype
_download_test_data: &_download_test_data
name: Download test data
no_output_timeout: 20m
Expand Down Expand Up @@ -113,7 +99,6 @@ _run_codecov_smoke: &_run_codecov_smoke
version: 2
jobs:

compare_base_dockerfiles:
docker:
- image: docker:17.10.0-ce-git
Expand Down Expand Up @@ -161,47 +146,33 @@ jobs:
- run: *modify_nipype_version
- run: *get_base_image
- run: *build_main_image_py36
- run: *build_main_image_py27
- run: *_get_codecov
- run: *_download_test_data
- run: *prepare_working_directory
- run:
name: Run pytests (py36)
name: Run pytests
no_output_timeout: 30m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_pytest.sh
- run:
name: Run pytests (py27)
no_output_timeout: 30m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py2_pytest.sh
command: bash -ux /home/circleci/nipype/.circleci/test_pytest.sh
- run: *_run_codecov_coverage
- store_artifacts: *store_artifacts_kwds
- store_test_results: *store_artifacts_kwds
- run:
name: Build docs (py36)
no_output_timeout: 30m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_docs.sh
- store_artifacts:
path: /home/circleci/work/docs
- run:
name: Save Docker images to workspace if on master
no_output_timeout: 60m
command: |
if [ "$CIRCLE_BRANCH" = "master" -a -z "$CIRCLE_PULL_REQUEST" ]; then
docker save nipype/nipype:base \
nipype/nipype:latest \
nipype/nipype:py27 \
nipype/nipype:py36 | gzip -1 > /tmp/docker/nipype-base-latest-py36-py27.tar.gz \
&& du -h /tmp/docker/nipype-base-latest-py36-py27.tar.gz
nipype/nipype:py36 | gzip -1 > /tmp/docker/nipype-base-latest-py36.tar.gz \
&& du -h /tmp/docker/nipype-base-latest-py36.tar.gz
fi
- persist_to_workspace:
root: /tmp
paths:
- docker

test_py3_fmri_fsl_spm:
test_fmri_fsl_spm:
machine: *machine_kwds
working_directory: /home/circleci/nipype
steps:
Expand All @@ -218,24 +189,24 @@ jobs:
- run: *_download_test_data
- run: *prepare_working_directory
- run:
name: Run FSL reuse pipeline (py36)
name: Run FSL reuse pipeline
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_fmri_fsl_reuse_linear_l1.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_fsl_reuse_linear_l1.sh
- run:
name: Run SPM test workflow - 3D inputs (py36)
name: Run SPM test workflow - 3D inputs
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_fmri_spm_linear_3d.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_linear_3d.sh
- run:
name: Run SPM test workflow - 4D inputs (py36)
name: Run SPM test workflow - 4D inputs
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_fmri_spm_linear_4d.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_linear_4d.sh
- run: *_run_codecov_smoke
- store_artifacts: *store_artifacts_kwds

test_py3_fmri_spm_dartel_multiproc:
test_fmri_spm_dartel_multiproc:
machine: *machine_kwds
working_directory: /home/circleci/nipype
steps:
Expand All @@ -252,15 +223,15 @@ jobs:
- run: *_download_test_data
- run: *prepare_working_directory
- run:
name: Run SPM DARTEL Level 1 pipeline (py36)
name: Run SPM DARTEL Level 1 pipeline
no_output_timeout: 1h
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_fmri_spm_dartel_multiproc_l1.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_dartel_multiproc_l1.sh
- run:
name: Run SPM DARTEL Level 2 pipeline (py36)
name: Run SPM DARTEL Level 2 pipeline
no_output_timeout: 30m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_fmri_spm_dartel_multiproc_l2.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_dartel_multiproc_l2.sh
- run: *_run_codecov_smoke
- store_artifacts: *store_artifacts_kwds

Expand All @@ -277,25 +248,24 @@ jobs:
- run: *modify_nipype_version
- run: *get_base_image
- run: *build_main_image_py36
- run: *build_main_image_py27
- run: *_get_codecov
- run: *_download_test_data
- run: *prepare_working_directory
- run:
name: Run SPM Nested Level 1 pipeline (py36)
name: Run SPM Nested Level 1 pipeline
no_output_timeout: 1h
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_fmri_spm_nested_multiproc_l1.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_nested_multiproc_l1.sh
- run:
name: Run SPM Nested Level 2 pipeline (py27)
name: Run SPM Nested Level 2 pipeline
no_output_timeout: 30m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py2_fmri_spm_nested_multiproc_l2.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_nested_multiproc_l2.sh
- run:
name: Run FSL FEEDS pipeline (py36)
name: Run FSL FEEDS pipeline
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_py3_fmri_fsl_feeds_linear_l1.sh
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_fsl_feeds_linear_l1.sh
- run: *_run_codecov_smoke
- store_artifacts: *store_artifacts_kwds

Expand All @@ -310,7 +280,7 @@ jobs:
name: Load saved Docker images.
no_output_timeout: 60m
command: |
docker load < /tmp/docker/nipype-base-latest-py36-py27.tar.gz
docker load < /tmp/docker/nipype-base-latest-py36.tar.gz
- run:
name: Push to DockerHub
no_output_timeout: 120m
Expand All @@ -319,7 +289,6 @@ jobs:
docker push nipype/nipype:base
docker push nipype/nipype:latest
docker push nipype/nipype:py36
docker push nipype/nipype:py27
- run:
name: Move pruned Dockerfile to /tmp/docker/cache directory
command: |
Expand All @@ -339,33 +308,24 @@ jobs:
- run:
name: Check pypi preconditions
command: |
pyenv local 3.6.5
pip install --upgrade pip twine future wheel readme_renderer setuptools
python setup.py sdist bdist_wheel
twine check dist/*
- run:
name: Validate Python 2 installation
command: |
pyenv local 2.7.12
pip install --upgrade pip
pip install dist/nipype-*-py2.py3-none-any.whl
# Futures should install in Python 2
pip show futures 2>/dev/null | grep "Name: futures"
- run:
name: Validate Python 3 installation
command: |
pyenv local 3.5.2
pyenv local 3.6.5
pip install --upgrade pip
pip install dist/nipype-*-py2.py3-none-any.whl
# Futures should not install in Python 3
test $(pip show futures 2>/dev/null | wc -l) = "0"
pip install dist/nipype-*-py3-none-any.whl
- run:
name: Validate Python 3.7 installation
command: |
pyenv local 3.7.0
pip install --upgrade pip
# Pre-install a version of numpy that will not pass
pip install numpy==1.15.0
pip install dist/nipype-*-py2.py3-none-any.whl
pip install dist/nipype-*-py3-none-any.whl
# Numpy should be upgraded to >= 1.15.3
test "$(pip show numpy | grep Version)" \> "Version: 1.15.2"
- run:
Expand All @@ -388,7 +348,8 @@ jobs:
- run:
name: Deploy to PyPI
command: |
pip install --upgrade twine future wheel readme_renderer setuptools
pyenv local 3.6.5
pip install --upgrade twine wheel readme_renderer setuptools
python setup.py check -r -s
python setup.py sdist bdist_wheel
twine upload dist/*
Expand Down Expand Up @@ -425,33 +386,85 @@ jobs:
ssh-add ~/.ssh/id_ed25519
/home/circleci/nipype/tools/feedstock.sh
build_docs:
docker:
- image: python:3.7.4
working_directory: /tmp/src/nipype
environment:
- FSLOUTPUTTYPE: 'NIFTI'
steps:
- checkout
- run:
name: Check Python version and upgrade pip
command: |
python --version
python -m pip install -U pip
- run:
name: Install graphviz
command: |
apt-get update
apt-get install -y graphviz
- run:
name: Install Requirements (may contain pinned versions)
command: python -m pip install -r doc/requirements.txt
- run:
name: Install NiPype
command: python -m pip install ".[doc]"
- run:
name: Build documentation
command: make -C doc html
- store_artifacts:
path: /tmp/src/nipype/doc/_build/html

workflows:
version: 2
build_test_deploy:
jobs:
- build_docs:
filters:
tags:
only: /.*/
- pypi_precheck:
filters:
branches:
only: /rel\/.*/
only: /(rel|dev)\/.*/
tags:
only: /.*/
- compare_base_dockerfiles:
filters:
branches:
ignore:
- /docs?\/.*/
tags:
only: /.*/
- test_pytest:
filters:
branches:
ignore:
- /docs?\/.*/
tags:
only: /.*/
requires:
- compare_base_dockerfiles
- test_py3_fmri_fsl_spm:
- test_fmri_fsl_spm:
filters:
branches:
ignore:
- /docs?\/.*/
requires:
- compare_base_dockerfiles
- test_py3_fmri_spm_dartel_multiproc:
- test_fmri_spm_dartel_multiproc:
filters:
branches:
ignore:
- /docs?\/.*/
requires:
- compare_base_dockerfiles
- test_fmri_spm_nested_fsl_feeds:
filters:
branches:
ignore:
- /docs?\/.*/
requires:
- compare_base_dockerfiles
- deploy_dockerhub:
Expand All @@ -461,8 +474,8 @@ workflows:
requires:
- test_pytest
- test_fmri_spm_nested_fsl_feeds
- test_py3_fmri_fsl_spm
- test_py3_fmri_spm_dartel_multiproc
- test_fmri_fsl_spm
- test_fmri_spm_dartel_multiproc
- deploy_pypi:
filters:
branches:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 "${DOCKER_IMAGE}:py27" /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline
docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline
3 changes: 0 additions & 3 deletions .circleci/test_py2_pytest.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .circleci/test_py3_docs.sh

This file was deleted.

File renamed without changes.
5 changes: 2 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ src/
.git

# other
docs/**/*
docs/
doc/**/*
doc/
.cache/
.circle/**/*
.circle/
circle.yml
rtd_requirements.txt
Vagrantfile
.travis.yml
.mailmap
Expand Down
4 changes: 4 additions & 0 deletions .et
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ "bad_versions" : [ "1.2.1",
"1.2.3",
"1.3.0"]
}
Loading

0 comments on commit 8c368c9

Please sign in to comment.