File tree Expand file tree Collapse file tree 5 files changed +77
-3
lines changed Expand file tree Collapse file tree 5 files changed +77
-3
lines changed Original file line number Diff line number Diff line change 7070 with :
7171 path : /home/runner/nifreeze-tests/
7272 key : data-v0
73+ - name : Install TeX Live
74+ run : |
75+ sudo apt-get update
76+ sudo apt install texlive texlive-latex-extra texlive-fonts-recommended cm-super dvipng
7377 - name : Install tox
7478 run : |
7579 python -m pip install --upgrade pip
Original file line number Diff line number Diff line change 3434 " WORKDIR = Path.home() / \" tmp\" / \" nifreezedev\" / \" ismrm25\"\n " ,
3535 " WORKDIR.mkdir(parents=True, exist_ok=True)\n " ,
3636 " \n " ,
37- " OUTPUT_DIR = Path( \" /data/derivatives \" ) / \" nifreeze-ismrm25-exp2\"\n " ,
37+ " OUTPUT_DIR = Path.home() / \" tmp \" / \" nifreezedev \" / \" ismrm25 \" / \" nifreeze-ismrm25-exp2\"\n " ,
3838 " OUTPUT_DIR.mkdir(exist_ok=True, parents=True)"
3939 ]
4040 },
Original file line number Diff line number Diff line change @@ -76,6 +76,14 @@ test = [
7676 " pytest-xdist >= 1.28"
7777]
7878
79+ notebooks = [
80+ " jupyter" ,
81+ " nbclient" ,
82+ " nbmake" ,
83+ " mriqc_learn" ,
84+ " nipreps-synthstrip" ,
85+ ]
86+
7987antsopt = [
8088 " ConfigSpace" ,
8189 " nipreps" ,
Original file line number Diff line number Diff line change 1+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
2+ # vi: set ft=python sts=4 ts=4 sw=4 et:
3+ #
4+ # Copyright The NiPreps Developers <[email protected] > 5+ #
6+ # Licensed under the Apache License, Version 2.0 (the "License");
7+ # you may not use this file except in compliance with the License.
8+ # You may obtain a copy of the License at
9+ #
10+ # http://www.apache.org/licenses/LICENSE-2.0
11+ #
12+ # Unless required by applicable law or agreed to in writing, software
13+ # distributed under the License is distributed on an "AS IS" BASIS,
14+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ # See the License for the specific language governing permissions and
16+ # limitations under the License.
17+ #
18+ # We support and encourage derived works from this project, please read
19+ # about our expectations at
20+ #
21+ # https://www.nipreps.org/community/licensing/
22+ #
23+
24+ import glob
25+ import subprocess
26+ import sys
27+
28+ notebooks = glob .glob ("docs/notebooks/*.ipynb" )
29+ # Make bold_realignment.ipynb Jupyter notebook an exception as it involves running a realignment
30+ # process for several DataLad datasets, which requires long running times.
31+ notebooks .remove ("docs/notebooks/bold_realignment.ipynb" )
32+
33+ sys .exit (subprocess .call (["pytest" , "--nbmake" ] + notebooks ))
Original file line number Diff line number Diff line change 22requires =
33 tox>=4
44envlist =
5- py312
5+ py312, notebooks
66skip_missing_interpreters = true
77
88# Configuration that allows us to split tests across GitHub runners effectively
99[gh-actions]
1010python =
11- 3.12: py312
11+ 3.12: py312, notebooks
1212
1313[testenv]
1414description = Pytest with coverage
@@ -39,6 +39,35 @@ commands =
3939 pytest --doctest-modules --cov nifreeze -n auto --cov-report xml \
4040 --junitxml =test-results.xml -v src test {posargs}
4141
42+ [testenv:notebooks]
43+ description = Run notebooks
44+ labels = notebooks
45+ pass_env =
46+ # getpass.getuser() sources for Windows:
47+ LOGNAME
48+ USER
49+ LNAME
50+ USERNAME
51+ # Pass user color preferences through
52+ PY_COLORS
53+ FORCE_COLOR
54+ NO_COLOR
55+ CLICOLOR
56+ CLICOLOR_FORCE
57+ CURBRANCH
58+ GITHUB_ACTIONS
59+ TEST_DATA_HOME
60+ TEST_OUTPUT_DIR
61+ TEST_WORK_DIR
62+ PYTHONHASHSEED
63+ ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS
64+ PATH
65+ extras = notebooks
66+ commands =
67+ # pytest --nbmake docs/notebooks/*.ipynb
68+ # not working due to https://github.com/tox-dev/tox/issues/1571
69+ python {toxinidir}/tools/run_notebooks.py
70+
4271[testenv:docs]
4372description = Build documentation site
4473labels = docs
You can’t perform that action at this time.
0 commit comments