Skip to content

Commit 517d50b

Browse files
authored
Merge pull request #1606 from effigies/doc/independent_doc_build
CI: Build docs outside of container
2 parents 3ac659d + ceb5f2d commit 517d50b

File tree

8 files changed

+42
-50
lines changed

8 files changed

+42
-50
lines changed

.circleci/config.yml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -294,47 +294,36 @@ jobs:
294294

295295

296296
build_docs:
297-
machine:
298-
image: circleci/classic:201711-01
299-
working_directory: /home/circleci/out/docs
297+
docker:
298+
- image: python:latest
299+
working_directory: /tmp/src/fmriprep
300300
steps:
301-
- checkout:
302-
path: /home/circleci/src/fmriprep
301+
- checkout
303302
- run:
304303
name: Check whether build should be skipped
305304
command: |
306-
cd /home/circleci/src/fmriprep
307305
if [[ "$( git log --format=oneline -n 1 $CIRCLE_SHA1 | grep -i -E '\[skip[ _]?docs\]' )" != "" ]]; then
308306
echo "Skipping doc building job"
309307
circleci step halt
310308
fi
311-
312-
- attach_workspace:
313-
at: /tmp
314309
- run:
315-
name: Load Docker image layer cache
316-
no_output_timeout: 30m
310+
name: Check Python version and upgrade pip
317311
command: |
318-
docker info
319-
set +o pipefail
320-
if [ -f /tmp/cache/docker.tar.gz ]; then
321-
sudo apt update && sudo apt -y install pigz
322-
pigz -d --stdout /tmp/cache/docker.tar.gz | docker load
323-
docker images
324-
fi
312+
python --version
313+
python -m pip install -U pip
325314
- run:
326-
name: Build fMRIPrep documentation
327-
no_output_timeout: 2h
315+
name: Install graphviz
328316
command: |
329-
docker run -ti --rm=false -v $PWD:/_build_html \
330-
--entrypoint=sphinx-build poldracklab/fmriprep:latest \
331-
-T -E -b html -d _build/doctrees-readthedocs -W -D \
332-
language=en /src/fmriprep/docs/ /_build_html 2>&1 \
333-
| tee $PWD/builddocs.log
334-
cat $PWD/builddocs.log
335-
grep -qv "ERROR" $PWD/builddocs.log
317+
apt-get update
318+
apt-get install -y graphviz
319+
- run:
320+
name: Install fMRIPrep
321+
command: python -m pip install ".[doc]"
322+
- run:
323+
name: Build documentation
324+
command: make SPHINXOPTS="-W" -C docs html
336325
- store_artifacts:
337-
path: /home/circleci/out/docs
326+
path: /tmp/src/fmriprep/docs/_build/html
338327

339328
ds005:
340329
machine:
@@ -801,6 +790,9 @@ workflows:
801790
jobs:
802791
- build:
803792
filters:
793+
branches:
794+
ignore:
795+
- /docs?\/.*/
804796
tags:
805797
only: /.*/
806798

@@ -827,8 +819,6 @@ workflows:
827819
only: /.*/
828820

829821
- build_docs:
830-
requires:
831-
- build
832822
filters:
833823
branches:
834824
ignore:

docs/environment.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
- svgutils
2929
- nitime
3030
- nilearn!=0.5.0,!=0.5.1
31-
- niworkflows<0.9.0a0,>=0.8.1
32-
- smriprep
3331
- tedana>=0.0.5
32+
- git+https://github.com/effigies/niworkflows.git@e6a277ee5e47be5f8148b136b7201c9beb8e70a3#egg=niworkflows
33+
- smriprep<0.3.0a0,>=0.2.0
34+
- templateflow<0.2.0a0,>=0.1.3

docs/workflows.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ is presented below:
2020

2121
from fmriprep.workflows.base import init_single_subject_wf
2222
from collections import namedtuple
23-
BIDSLayout = namedtuple('BIDSLayout', ['root'], defaults='.')
23+
BIDSLayout = namedtuple('BIDSLayout', ['root'])
2424
wf = init_single_subject_wf(
25-
layout=BIDSLayout(),
25+
layout=BIDSLayout('.'),
2626
subject_id='test',
2727
name='single_subject_wf',
2828
task_id='',
@@ -273,7 +273,7 @@ BOLD preprocessing
273273
:simple_form: yes
274274

275275
from collections import namedtuple
276-
BIDSLayout = namedtuple('BIDSLayout', ['root'], defaults='.')
276+
BIDSLayout = namedtuple('BIDSLayout', ['root'])
277277
from fmriprep.workflows.bold import init_func_preproc_wf
278278
wf = init_func_preproc_wf(
279279
'/completely/made/up/path/sub-01_task-nback_bold.nii.gz',
@@ -287,7 +287,7 @@ BOLD preprocessing
287287
force_syn=True,
288288
freesurfer=True,
289289
ignore=[],
290-
layout=BIDSLayout(),
290+
layout=BIDSLayout('.'),
291291
low_mem=False,
292292
medial_surface_nan=False,
293293
omp_nthreads=1,

fmriprep/__about__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,24 @@
8989
'nilearn!=0.5.0,!=0.5.1',
9090
'nipype>=1.1.6',
9191
'nitime',
92-
'niworkflows',
92+
'niworkflows @ '
93+
'git+https://github.com/effigies/niworkflows.git@5e9daf0b08fcad2b17350a71ecaf71fa9ce4eff7',
9394
'numpy',
9495
'pandas',
9596
'psutil>=5.4',
9697
'pybids<0.8.0a0,>=0.7.1',
9798
'pyyaml',
9899
'scikit-image',
99-
'smriprep',
100+
'smriprep<0.3.0a0,>=0.2.0',
100101
'statsmodels',
101102
'tedana>=0.0.5',
102103
'templateflow<0.2.0a0,>=0.1.3',
103104
]
104105

105106

106107
LINKS_REQUIRES = [
107-
'git+https://github.com/poldracklab/niworkflows.git@'
108-
'076aed98962b10d107c83110c05e42466a89bbc4#egg=niworkflows',
109-
'git+https://github.com/poldracklab/smriprep.git@'
110-
'f1cfc37bcdc346549dbf1d037cdade3a3b32d5de#egg=smriprep-0.1.0',
108+
'git+https://github.com/effigies/niworkflows.git@'
109+
'5e9daf0b08fcad2b17350a71ecaf71fa9ce4eff7#egg=niworkflows',
111110
]
112111

113112
TESTS_REQUIRES = [

fmriprep/workflows/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def init_fmriprep_wf(layout, subject_list, task_id, echo_idx, run_uuid, work_dir
5252
5353
import os
5454
from collections import namedtuple
55-
BIDSLayout = namedtuple('BIDSLayout', ['root'], defaults='.')
55+
BIDSLayout = namedtuple('BIDSLayout', ['root'])
5656
from fmriprep.workflows.base import init_fmriprep_wf
5757
os.environ['FREESURFER_HOME'] = os.getcwd()
58-
wf = init_fmriprep_wf(layout=BIDSLayout(),
58+
wf = init_fmriprep_wf(layout=BIDSLayout('.'),
5959
subject_list=['fmripreptest'],
6060
task_id='',
6161
echo_idx=None,
@@ -255,8 +255,8 @@ def init_single_subject_wf(layout, subject_id, task_id, echo_idx, name, reportle
255255
256256
from fmriprep.workflows.base import init_single_subject_wf
257257
from collections import namedtuple
258-
BIDSLayout = namedtuple('BIDSLayout', ['root'], defaults='.')
259-
wf = init_single_subject_wf(layout=BIDSLayout(),
258+
BIDSLayout = namedtuple('BIDSLayout', ['root'])
259+
wf = init_single_subject_wf(layout=BIDSLayout('.'),
260260
subject_id='test',
261261
task_id='',
262262
echo_idx=None,

fmriprep/workflows/bold/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
6262
6363
from fmriprep.workflows.bold import init_func_preproc_wf
6464
from collections import namedtuple
65-
BIDSLayout = namedtuple('BIDSLayout', ['root'], defaults='.')
65+
BIDSLayout = namedtuple('BIDSLayout', ['root'])
6666
wf = init_func_preproc_wf('/completely/made/up/path/sub-01_task-nback_bold.nii.gz',
6767
omp_nthreads=1,
6868
ignore=[],
@@ -88,7 +88,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
8888
err_on_aroma_warn=False,
8989
aroma_melodic_dim=-200,
9090
num_bold=1,
91-
layout=BIDSLayout())
91+
layout=BIDSLayout('.'))
9292
9393
**Parameters**
9494

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["pip>=18.1", "setuptools>=40.8", "wheel", "numpy"]

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
nilearn!=0.5.0,!=0.5.1
2-
git+https://github.com/poldracklab/niworkflows.git@076aed98962b10d107c83110c05e42466a89bbc4#egg=niworkflows
3-
git+https://github.com/poldracklab/smriprep.git@f1cfc37bcdc346549dbf1d037cdade3a3b32d5de#egg=smriprep-0.1.0
2+
git+https://github.com/effigies/niworkflows.git@5e9daf0b08fcad2b17350a71ecaf71fa9ce4eff7#egg=niworkflows
3+
smriprep<0.3.0a0,>=0.2.0
44
templateflow<0.2.0a0,>=0.1.3

0 commit comments

Comments
 (0)