Skip to content

Commit d610478

Browse files
authored
Merge pull request #3172 from effigies/enh/move_examples
ENH: Remove examples from repository
2 parents f77a5bd + 22cbbb8 commit d610478

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+50
-14284
lines changed

.circleci/config.yml

-121
Original file line numberDiff line numberDiff line change
@@ -172,103 +172,6 @@ jobs:
172172
paths:
173173
- docker
174174

175-
test_fmri_fsl_spm:
176-
machine: *machine_kwds
177-
working_directory: /home/circleci/nipype
178-
steps:
179-
- checkout:
180-
path: /home/circleci/nipype
181-
- attach_workspace:
182-
at: /tmp
183-
- run: *set_pr_number
184-
- run: *generate_dockerfiles
185-
- run: *modify_nipype_version
186-
- run: *get_base_image
187-
- run: *build_main_image_py36
188-
- run: *_get_codecov
189-
- run: *_download_test_data
190-
- run: *prepare_working_directory
191-
- run:
192-
name: Run FSL reuse pipeline
193-
no_output_timeout: 40m
194-
environment: *test_environment
195-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_fsl_reuse_linear_l1.sh
196-
- run:
197-
name: Run SPM test workflow - 3D inputs
198-
no_output_timeout: 40m
199-
environment: *test_environment
200-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_linear_3d.sh
201-
- run:
202-
name: Run SPM test workflow - 4D inputs
203-
no_output_timeout: 40m
204-
environment: *test_environment
205-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_linear_4d.sh
206-
- run: *_run_codecov_smoke
207-
- store_artifacts: *store_artifacts_kwds
208-
209-
test_fmri_spm_dartel_multiproc:
210-
machine: *machine_kwds
211-
working_directory: /home/circleci/nipype
212-
steps:
213-
- checkout:
214-
path: /home/circleci/nipype
215-
- attach_workspace:
216-
at: /tmp
217-
- run: *set_pr_number
218-
- run: *generate_dockerfiles
219-
- run: *modify_nipype_version
220-
- run: *get_base_image
221-
- run: *build_main_image_py36
222-
- run: *_get_codecov
223-
- run: *_download_test_data
224-
- run: *prepare_working_directory
225-
- run:
226-
name: Run SPM DARTEL Level 1 pipeline
227-
no_output_timeout: 1h
228-
environment: *test_environment
229-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_dartel_multiproc_l1.sh
230-
- run:
231-
name: Run SPM DARTEL Level 2 pipeline
232-
no_output_timeout: 30m
233-
environment: *test_environment
234-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_dartel_multiproc_l2.sh
235-
- run: *_run_codecov_smoke
236-
- store_artifacts: *store_artifacts_kwds
237-
238-
test_fmri_spm_nested_fsl_feeds:
239-
machine: *machine_kwds
240-
working_directory: /home/circleci/nipype
241-
steps:
242-
- checkout:
243-
path: /home/circleci/nipype
244-
- attach_workspace:
245-
at: /tmp
246-
- run: *set_pr_number
247-
- run: *generate_dockerfiles
248-
- run: *modify_nipype_version
249-
- run: *get_base_image
250-
- run: *build_main_image_py36
251-
- run: *_get_codecov
252-
- run: *_download_test_data
253-
- run: *prepare_working_directory
254-
- run:
255-
name: Run SPM Nested Level 1 pipeline
256-
no_output_timeout: 1h
257-
environment: *test_environment
258-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_nested_multiproc_l1.sh
259-
- run:
260-
name: Run SPM Nested Level 2 pipeline
261-
no_output_timeout: 30m
262-
environment: *test_environment
263-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_spm_nested_multiproc_l2.sh
264-
- run:
265-
name: Run FSL FEEDS pipeline
266-
no_output_timeout: 40m
267-
environment: *test_environment
268-
command: bash -ux /home/circleci/nipype/.circleci/test_fmri_fsl_feeds_linear_l1.sh
269-
- run: *_run_codecov_smoke
270-
- store_artifacts: *store_artifacts_kwds
271-
272175
deploy_dockerhub:
273176
docker:
274177
- image: docker:17.10.0-ce-git
@@ -446,36 +349,12 @@ workflows:
446349
only: /.*/
447350
requires:
448351
- compare_base_dockerfiles
449-
- test_fmri_fsl_spm:
450-
filters:
451-
branches:
452-
ignore:
453-
- /docs?\/.*/
454-
requires:
455-
- compare_base_dockerfiles
456-
- test_fmri_spm_dartel_multiproc:
457-
filters:
458-
branches:
459-
ignore:
460-
- /docs?\/.*/
461-
requires:
462-
- compare_base_dockerfiles
463-
- test_fmri_spm_nested_fsl_feeds:
464-
filters:
465-
branches:
466-
ignore:
467-
- /docs?\/.*/
468-
requires:
469-
- compare_base_dockerfiles
470352
- deploy_dockerhub:
471353
filters:
472354
branches:
473355
only: master
474356
requires:
475357
- test_pytest
476-
- test_fmri_spm_nested_fsl_feeds
477-
- test_fmri_fsl_spm
478-
- test_fmri_spm_dartel_multiproc
479358
- deploy_pypi:
480359
filters:
481360
branches:

.circleci/test_fmri_fsl_feeds_linear_l1.sh

-3
This file was deleted.

.circleci/test_fmri_fsl_reuse_linear_l1.sh

-3
This file was deleted.

.circleci/test_fmri_spm_dartel_multiproc_l1.sh

-3
This file was deleted.

.circleci/test_fmri_spm_dartel_multiproc_l2.sh

-3
This file was deleted.

.circleci/test_fmri_spm_linear_3d.sh

-3
This file was deleted.

.circleci/test_fmri_spm_linear_4d.sh

-3
This file was deleted.

.circleci/test_fmri_spm_nested_multiproc_l1.sh

-3
This file was deleted.

.circleci/test_fmri_spm_nested_multiproc_l2.sh

-3
This file was deleted.

doc/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/documentation.zip
2+
_static/python

doc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ help:
2424
@echo " doctest run all doctests embedded in the documentation"
2525

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

2929
htmlonly:
3030
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html

doc/conf.py

+28-9
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,37 @@
1313
# serve to show the default.
1414

1515
import os
16+
from pathlib import Path
17+
from tempfile import TemporaryDirectory
18+
import shutil
1619
from packaging.version import Version
1720
import nipype
21+
import subprocess as sp
1822

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

22-
os.chdir(os.path.join(doc_path, 'users', 'examples'))
23-
os.system("""python ../../../tools/ex2rst -x ../../../examples/test_spm.py \
24-
--project Nipype --outdir . ../../../examples""")
25-
os.system("""python ../../../tools/ex2rst --project Nipype --outdir . \
26-
../../../examples/frontiers_paper""")
27-
os.chdir(doc_path)
24+
conf_py = Path(__file__)
25+
26+
example_dir = conf_py.parent / 'users' / 'examples'
27+
shutil.rmtree(example_dir, ignore_errors=True)
28+
example_dir.mkdir(parents=True)
29+
python_dir = conf_py.parent / "_static" / "python"
30+
shutil.rmtree(python_dir, ignore_errors=True)
31+
32+
ex2rst = str(conf_py.parent.parent / "tools" / "ex2rst")
33+
34+
with TemporaryDirectory() as tmpdir:
35+
sp.run(["git", "clone", "--depth", "1", "https://github.com/niflows/nipype1-examples.git",
36+
tmpdir], check=True)
37+
source_dir = Path(tmpdir) / "package" / "niflow" / "nipype1" / "examples"
38+
shutil.copytree(source_dir, python_dir)
39+
40+
sp.run(["python", ex2rst, "--outdir", str(example_dir), str(python_dir),
41+
"-x", str(python_dir / "test_spm.py"),
42+
"-x", str(python_dir / "__init__.py"),
43+
"-x", str(python_dir / "cli.py")],
44+
check=True)
45+
sp.run(["python", ex2rst, "--outdir", str(example_dir), str(python_dir / "frontiers_paper")],
46+
check=True)
2847

2948

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

99118
# General information about the project.
100119
project = u'nipype'
101-
copyright = u'2009-19, Neuroimaging in Python team'
120+
copyright = u'2009-20, Neuroimaging in Python team'
102121

103122
# The version info for the project you're documenting, acts as replacement for
104123
# |version| and |release|, also used in various other places throughout the

examples/README

-4
This file was deleted.

examples/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The examples directory previously held a set of
2+
[literate programming](https://en.wikipedia.org/wiki/Literate_programming) documents that
3+
demonstrated solutions to various problems using Nipype.
4+
5+
These examples have been moved to the
6+
[Nipype1 Examples Niflow](https://github.com/niflows/nipype1-examples). Please refer to
7+
that repository for more information, and report any issues with the examples there.

0 commit comments

Comments
 (0)