Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Remove examples from repository #3172

Merged
merged 7 commits into from
Feb 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 0 additions & 121 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,103 +172,6 @@ jobs:
paths:
- docker

test_fmri_fsl_spm:
machine: *machine_kwds
working_directory: /home/circleci/nipype
steps:
- checkout:
path: /home/circleci/nipype
- attach_workspace:
at: /tmp
- run: *set_pr_number
- run: *generate_dockerfiles
- run: *modify_nipype_version
- run: *get_base_image
- run: *build_main_image_py36
- run: *_get_codecov
- run: *_download_test_data
- run: *prepare_working_directory
- run:
name: Run FSL reuse pipeline
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_fsl_reuse_linear_l1.sh
- run:
name: Run SPM test workflow - 3D inputs
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_linear_3d.sh
- run:
name: Run SPM test workflow - 4D inputs
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_linear_4d.sh
- run: *_run_codecov_smoke
- store_artifacts: *store_artifacts_kwds

test_fmri_spm_dartel_multiproc:
machine: *machine_kwds
working_directory: /home/circleci/nipype
steps:
- checkout:
path: /home/circleci/nipype
- attach_workspace:
at: /tmp
- run: *set_pr_number
- run: *generate_dockerfiles
- run: *modify_nipype_version
- run: *get_base_image
- run: *build_main_image_py36
- run: *_get_codecov
- run: *_download_test_data
- run: *prepare_working_directory
- run:
name: Run SPM DARTEL Level 1 pipeline
no_output_timeout: 1h
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_dartel_multiproc_l1.sh
- run:
name: Run SPM DARTEL Level 2 pipeline
no_output_timeout: 30m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_dartel_multiproc_l2.sh
- run: *_run_codecov_smoke
- store_artifacts: *store_artifacts_kwds

test_fmri_spm_nested_fsl_feeds:
machine: *machine_kwds
working_directory: /home/circleci/nipype
steps:
- checkout:
path: /home/circleci/nipype
- attach_workspace:
at: /tmp
- run: *set_pr_number
- run: *generate_dockerfiles
- run: *modify_nipype_version
- run: *get_base_image
- run: *build_main_image_py36
- run: *_get_codecov
- run: *_download_test_data
- run: *prepare_working_directory
- run:
name: Run SPM Nested Level 1 pipeline
no_output_timeout: 1h
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_nested_multiproc_l1.sh
- run:
name: Run SPM Nested Level 2 pipeline
no_output_timeout: 30m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_nested_multiproc_l2.sh
- run:
name: Run FSL FEEDS pipeline
no_output_timeout: 40m
environment: *test_environment
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_fsl_feeds_linear_l1.sh
- run: *_run_codecov_smoke
- store_artifacts: *store_artifacts_kwds

deploy_dockerhub:
docker:
- image: docker:17.10.0-ce-git
Expand Down Expand Up @@ -446,36 +349,12 @@ workflows:
only: /.*/
requires:
- compare_base_dockerfiles
- test_fmri_fsl_spm:
filters:
branches:
ignore:
- /docs?\/.*/
requires:
- compare_base_dockerfiles
- 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:
filters:
branches:
only: master
requires:
- test_pytest
- test_fmri_spm_nested_fsl_feeds
- test_fmri_fsl_spm
- test_fmri_spm_dartel_multiproc
- deploy_pypi:
filters:
branches:
Expand Down
3 changes: 0 additions & 3 deletions .circleci/test_fmri_fsl_feeds_linear_l1.sh

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/documentation.zip
_static/python
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ help:
@echo " doctest run all doctests embedded in the documentation"

clean:
-rm -rf _build/* *~ api/generated interfaces/generated users/examples documentation.zip
-rm -rf _build/* *~ api/generated interfaces/generated users/examples documentation.zip _static/python

htmlonly:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
Expand Down
37 changes: 28 additions & 9 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,37 @@
# serve to show the default.

import os
from pathlib import Path
from tempfile import TemporaryDirectory
import shutil
from packaging.version import Version
import nipype
import subprocess as sp

doc_path = os.path.abspath(os.path.dirname(__file__))
os.makedirs('users/examples', exist_ok=True)

os.chdir(os.path.join(doc_path, 'users', 'examples'))
os.system("""python ../../../tools/ex2rst -x ../../../examples/test_spm.py \
--project Nipype --outdir . ../../../examples""")
os.system("""python ../../../tools/ex2rst --project Nipype --outdir . \
../../../examples/frontiers_paper""")
os.chdir(doc_path)
conf_py = Path(__file__)

example_dir = conf_py.parent / 'users' / 'examples'
shutil.rmtree(example_dir, ignore_errors=True)
example_dir.mkdir(parents=True)
python_dir = conf_py.parent / "_static" / "python"
shutil.rmtree(python_dir, ignore_errors=True)

ex2rst = str(conf_py.parent.parent / "tools" / "ex2rst")

with TemporaryDirectory() as tmpdir:
sp.run(["git", "clone", "--depth", "1", "https://github.com/niflows/nipype1-examples.git",
tmpdir], check=True)
source_dir = Path(tmpdir) / "package" / "niflow" / "nipype1" / "examples"
shutil.copytree(source_dir, python_dir)

sp.run(["python", ex2rst, "--outdir", str(example_dir), str(python_dir),
"-x", str(python_dir / "test_spm.py"),
"-x", str(python_dir / "__init__.py"),
"-x", str(python_dir / "cli.py")],
check=True)
sp.run(["python", ex2rst, "--outdir", str(example_dir), str(python_dir / "frontiers_paper")],
check=True)


# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -98,7 +117,7 @@

# General information about the project.
project = u'nipype'
copyright = u'2009-19, Neuroimaging in Python team'
copyright = u'2009-20, Neuroimaging in Python team'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
4 changes: 0 additions & 4 deletions examples/README

This file was deleted.

7 changes: 7 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The examples directory previously held a set of
[literate programming](https://en.wikipedia.org/wiki/Literate_programming) documents that
demonstrated solutions to various problems using Nipype.

These examples have been moved to the
[Nipype1 Examples Niflow](https://github.com/niflows/nipype1-examples). Please refer to
that repository for more information, and report any issues with the examples there.
Loading