From 13adfac0ceefb84bc4278f9c0e2c0dc4974e794b Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 3 Dec 2026 16:21:56 +0100 Subject: [PATCH 1/2] ci: build the docs on Python 3.13 from the doc extra build_docs installed a 2022 conda lockfile (Python 3.9, Sphinx 4.5) on a machine executor. Once its cache expired, conda kept solving the environment until CircleCI killed the job, and Python 3.9 and Sphinx 4.5 can no longer build the package anyway (Sphinx 4.5 needs imghdr, gone in Python 3.13). The job now runs on the python/default 3.13 executor and installs the package with its doc extra. The doc extra drops the Sphinx 4 pin and adds IPython, whose lexer highlights the notebooks' ipython3 cells; conf.py sets language = 'en', which Sphinx now requires. docs/environment.yml had no other users. Co-Authored-By: Claude Opus 5.5 --- .circleci/config.yml | 45 ++------- docs/conf.py | 2 +- docs/environment.yml | 211 ------------------------------------------- pyproject.toml | 3 +- 4 files changed, 9 insertions(+), 252 deletions(-) delete mode 100644 docs/environment.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 25c6840c..72163e23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -160,53 +160,20 @@ jobs: path: ~/tests build_docs: - machine: - # https://discuss.circleci.com/t/linux-machine-executor-images-2021-april-q2-update/39928 - # upgrade Docker version - image: default - environment: - - FSLOUTPUTTYPE: NIFTI - - SUBJECTS_DIR: /tmp/subjects + executor: + name: python/default + tag: '3.13' steps: - checkout - - restore_cache: - keys: - - env-v7-{{ .Branch }} - - env-v7-master - - env-v7- - - run: - name: Install base packages - command: | - export PATH="$HOME/.conda/bin:$PATH" - if ! [ -x "$(command -v curl)" ]; then - sudo apt-get update - sudo apt-get install -y --no-install-recommends curl - fi - - if ! [ -x "$(command -v conda)" ]; then - curl -sSLO https://repo.anaconda.com/miniconda/Miniconda3-py39_4.11.0-Linux-x86_64.sh - bash Miniconda3-py39_4.11.0-Linux-x86_64.sh -b -p $HOME/.conda - fi - $HOME/.conda/bin/conda env update -f docs/environment.yml --prune - - - save_cache: - key: env-v7-{{ .Branch }} - paths: - - ~/.conda - - run: name: Check out git submodules command: git submodule update --init - run: - name: Create subjects folder - command: mkdir -p $SUBJECTS_DIR + name: Install the package and the documentation tools + command: python -m pip install -e '.[doc]' - run: name: Build only this commit - command: | - export PATH="$HOME/.conda/bin:$PATH" - python -m pip install -U build hatch hatchling - python -m hatch version - make -C docs SPHINXOPTS="-W" BUILDDIR="$HOME/html" CURBRANCH="${CIRCLE_TAG}" html + command: make -C docs SPHINXOPTS="-W" BUILDDIR="$HOME/html" CURBRANCH="${CIRCLE_TAG}" html - store_artifacts: path: ~/html diff --git a/docs/conf.py b/docs/conf.py index a9d8b88d..2567ea4a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -84,7 +84,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/docs/environment.yml b/docs/environment.yml deleted file mode 100644 index 89a46f85..00000000 --- a/docs/environment.yml +++ /dev/null @@ -1,211 +0,0 @@ -name: base -channels: - - conda-forge - - defaults -dependencies: - - _libgcc_mutex=0.1=conda_forge - - _openmp_mutex=4.5=2_gnu - - alabaster=0.7.12=py_0 - - astor=0.8.1=pyh9f0ad1d_0 - - asttokens=2.0.5=pyhd8ed1ab_0 - - atk-1.0=2.36.0=h3371d22_4 - - attrs=21.4.0=pyhd8ed1ab_0 - - babel=2.10.1=pyhd8ed1ab_0 - - backcall=0.2.0=pyh9f0ad1d_0 - - backports=1.0=py_2 - - backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0 - - beautifulsoup4=4.11.1=pyha770c72_0 - - bleach=5.0.0=pyhd8ed1ab_0 - - brotlipy=0.7.0=py39hb9d737c_1004 - - bzip2=1.0.8=h7f98852_4 - - c-ares=1.18.1=h7f98852_0 - - ca-certificates=2021.10.8=ha878542_0 - - cairo=1.16.0=ha61ee94_1011 - - certifi=2021.10.8=py39hf3d152e_2 - - cffi=1.15.0=py39h4bc2ebd_0 - - charset-normalizer=2.0.12=pyhd8ed1ab_0 - - click=8.1.3=py39hf3d152e_0 - - colorama=0.4.4=pyh9f0ad1d_0 - - commonmark=0.9.1=py_0 - - cryptography=36.0.2=py39hd97740a_1 - - curl=7.83.0=h7bff187_0 - - decorator=5.1.1=pyhd8ed1ab_0 - - defusedxml=0.7.1=pyhd8ed1ab_0 - - docutils=0.15.2=py39hf3d152e_3 - - entrypoints=0.4=pyhd8ed1ab_0 - - executing=0.8.3=pyhd8ed1ab_0 - - expat=2.4.8=h27087fc_0 - - font-ttf-dejavu-sans-mono=2.37=hab24e00_0 - - font-ttf-inconsolata=3.000=h77eed37_0 - - font-ttf-source-code-pro=2.038=h77eed37_0 - - font-ttf-ubuntu=0.83=hab24e00_0 - - fontconfig=2.14.0=h8e229c2_0 - - fonts-conda-ecosystem=1=0 - - fonts-conda-forge=1=0 - - freetype=2.10.4=h0708190_1 - - fribidi=1.0.10=h36c2ea0_0 - - future=0.18.2=py39hf3d152e_5 - - gdk-pixbuf=2.42.8=hff1cb4f_0 - - gettext=0.19.8.1=h73d1719_1008 - - giflib=5.2.1=h36c2ea0_2 - - graphite2=1.3.13=h58526e2_1001 - - graphviz=3.0.0=h5abf519_1 - - greenlet=1.1.2=py39h5a03fae_2 - - gtk2=2.24.33=h90689f9_2 - - gts=0.7.6=h64030ff_2 - - harfbuzz=4.2.1=hf9f4e7c_0 - - icu=70.1=h27087fc_0 - - idna=3.3=pyhd8ed1ab_0 - - imagesize=1.3.0=pyhd8ed1ab_0 - - importlib-metadata=4.11.3=py39hf3d152e_1 - - importlib_resources=5.7.1=pyhd8ed1ab_0 - - interface_meta=1.3.0=pyhd8ed1ab_0 - - ipython=8.3.0=py39hf3d152e_0 - - jbig=2.1=h7f98852_2003 - - jedi=0.18.1=py39hf3d152e_1 - - jinja2=3.1.2=pyhd8ed1ab_0 - - jpeg=9e=h166bdaf_1 - - jsonschema=4.5.1=pyhd8ed1ab_0 - - jupyter_client=7.3.0=pyhd8ed1ab_0 - - jupyter_core=4.9.2=py39hf3d152e_0 - - jupyterlab_pygments=0.2.2=pyhd8ed1ab_0 - - keyutils=1.6.1=h166bdaf_0 - - krb5=1.19.3=h3790be6_0 - - ld_impl_linux-64=2.36.1=hea4e1c9_2 - - lerc=3.0=h9c3ff4c_0 - - libblas=3.9.0=14_linux64_openblas - - libcblas=3.9.0=14_linux64_openblas - - libcurl=7.83.0=h7bff187_0 - - libdeflate=1.10=h7f98852_0 - - libedit=3.1.20191231=he28a2e2_2 - - libev=4.33=h516909a_1 - - libffi=3.4.2=h7f98852_5 - - libgcc-ng=11.2.0=h1d223b6_16 - - libgd=2.3.3=h18fbbfe_3 - - libgfortran-ng=11.2.0=h69a702a_16 - - libgfortran5=11.2.0=h5c6108e_16 - - libglib=2.70.2=h174f98d_4 - - libgomp=11.2.0=h1d223b6_16 - - libiconv=1.16=h516909a_0 - - liblapack=3.9.0=14_linux64_openblas - - libnghttp2=1.47.0=h727a467_0 - - libnsl=2.0.0=h7f98852_0 - - libopenblas=0.3.20=pthreads_h78a6416_0 - - libpng=1.6.37=h21135ba_2 - - librsvg=2.54.1=h7abd40a_0 - - libsodium=1.0.18=h36c2ea0_1 - - libssh2=1.10.0=ha56f1ee_2 - - libstdcxx-ng=11.2.0=he4da1e4_16 - - libtiff=4.3.0=h542a066_3 - - libtool=2.4.6=h9c3ff4c_1008 - - libuuid=2.32.1=h7f98852_1000 - - libwebp=1.2.2=h3452ae3_0 - - libwebp-base=1.2.2=h7f98852_1 - - libxcb=1.13=h7f98852_1004 - - libxml2=2.9.14=h22db469_0 - - libzlib=1.2.11=h166bdaf_1014 - - lz4-c=1.9.3=h9c3ff4c_1 - - markupsafe=2.1.1=py39hb9d737c_1 - - matplotlib-inline=0.1.3=pyhd8ed1ab_0 - - mistune=0.8.4=py39h3811e60_1005 - - nbclient=0.6.2=pyhd8ed1ab_0 - - nbconvert=6.5.0=pyhd8ed1ab_0 - - nbconvert-core=6.5.0=pyhd8ed1ab_0 - - nbconvert-pandoc=6.5.0=pyhd8ed1ab_0 - - nbformat=5.4.0=pyhd8ed1ab_0 - - nbsphinx=0.8.8=pyhd8ed1ab_0 - - ncurses=6.3=h27087fc_1 - - nest-asyncio=1.5.5=pyhd8ed1ab_0 - - num2words=0.5.10=pyhd8ed1ab_1 - - numpy=1.22.3=py39hc58783e_2 - - openssl=1.1.1o=h166bdaf_0 - - packaging=21.3=pyhd8ed1ab_0 - - pandoc=2.18=ha770c72_0 - - pandocfilters=1.5.0=pyhd8ed1ab_0 - - pango=1.50.7=hbd2fdc8_0 - - parso=0.8.3=pyhd8ed1ab_0 - - pbr=5.9.0=pyhd8ed1ab_0 - - pcre=8.45=h9c3ff4c_0 - - pexpect=4.8.0=pyh9f0ad1d_2 - - pickleshare=0.7.5=py_1003 - - pip=22.0.4=pyhd8ed1ab_0 - - pixman=0.40.0=h36c2ea0_0 - - prompt-toolkit=3.0.29=pyha770c72_0 - - pthread-stubs=0.4=h36c2ea0_1001 - - ptyprocess=0.7.0=pyhd3deb0d_0 - - pure_eval=0.2.2=pyhd8ed1ab_0 - - pycparser=2.21=pyhd8ed1ab_0 - - pydot=1.4.2=py39hf3d152e_1 - - pydotplus=2.0.2=py_2 - - pygments=2.12.0=pyhd8ed1ab_0 - - pyopenssl=22.0.0=pyhd8ed1ab_0 - - pyparsing=3.0.8=pyhd8ed1ab_0 - - pyrsistent=0.18.1=py39hb9d737c_1 - - pysocks=1.7.1=py39hf3d152e_5 - - python=3.9.12=h9a8a25e_1_cpython - - python-dateutil=2.8.2=pyhd8ed1ab_0 - - python-fastjsonschema=2.15.3=pyhd8ed1ab_0 - - python_abi=3.9=2_cp39 - - pytz=2022.1=pyhd8ed1ab_0 - - pyzmq=22.3.0=py39headdf64_2 - - readline=8.1=h46c0cb4_0 - - requests=2.27.1=pyhd8ed1ab_0 - - scipy=1.8.0=py39hee8e79c_1 - - six=1.16.0=pyh6c4a22f_0 - - snowballstemmer=2.2.0=pyhd8ed1ab_0 - - soupsieve=2.3.1=pyhd8ed1ab_0 - - sphinx=4.5.0=pyh6c4a22f_0 - - sphinx-argparse=0.3.1=pyhd8ed1ab_0 - - sphinx_rtd_theme=1.0.0=pyhd8ed1ab_0 - - sphinxcontrib-apidoc=0.3.0=py_1 - - sphinxcontrib-applehelp=1.0.2=py_0 - - sphinxcontrib-devhelp=1.0.2=py_0 - - sphinxcontrib-htmlhelp=2.0.0=pyhd8ed1ab_0 - - sphinxcontrib-jsmath=1.0.1=py_0 - - sphinxcontrib-qthelp=1.0.3=py_0 - - sphinxcontrib-serializinghtml=1.1.5=pyhd8ed1ab_2 - - sqlite=3.38.5=h4ff8645_0 - - stack_data=0.2.0=pyhd8ed1ab_0 - - tinycss2=1.1.1=pyhd8ed1ab_0 - - tk=8.6.12=h27826a3_0 - - tomli=2.0.1=pyhd8ed1ab_0 - - tornado=6.1=py39hb9d737c_3 - - tqdm=4.64.0=pyhd8ed1ab_0 - - traitlets=5.1.1=pyhd8ed1ab_0 - - tzdata=2022a=h191b570_0 - - urllib3=1.26.9=pyhd8ed1ab_0 - - wcwidth=0.2.5=pyh9f0ad1d_2 - - webencodings=0.5.1=py_1 - - wheel=0.37.1=pyhd8ed1ab_0 - - wrapt=1.14.1=py39hb9d737c_0 - - xorg-kbproto=1.0.7=h7f98852_1002 - - xorg-libice=1.0.10=h7f98852_0 - - xorg-libsm=1.2.3=hd9c2040_1000 - - xorg-libx11=1.7.2=h7f98852_0 - - xorg-libxau=1.0.9=h7f98852_0 - - xorg-libxdmcp=1.1.3=h7f98852_0 - - xorg-libxext=1.3.4=h7f98852_1 - - xorg-libxrender=0.9.10=h7f98852_1003 - - xorg-renderproto=0.11.1=h7f98852_1002 - - xorg-xextproto=7.3.0=h7f98852_1002 - - xorg-xproto=7.0.31=h7f98852_1007 - - xz=5.2.5=h516909a_1 - - zeromq=4.3.4=h9c3ff4c_1 - - zipp=3.8.0=pyhd8ed1ab_0 - - zlib=1.2.11=h166bdaf_1014 - - zstd=1.5.2=ha95c52a_0 - - pip: - - acres - - bids-validator==1.9.3 - - docopt==0.6.2 - - formulaic==0.3.4 - - nibabel==3.2.2 - - nipreps-versions==1.0.3 - - pandas==1.4.2 - - platformdirs - - pybids==0.15.2 - - sqlalchemy==1.3.24 - - hatchling - - hatch-vcs - - nipreps-versions - - sphinx-click diff --git a/pyproject.toml b/pyproject.toml index f637b000..117bae15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,12 +49,13 @@ datalad = [ "datalad >= 1.0.0" ] doc = [ + "ipython", "nbsphinx", "packaging", "pydot>=1.2.3", "pydotplus", "sphinx-click", - "sphinx ~= 4.0", + "sphinx", "sphinx_rtd_theme >= 0.4.3", "sphinxcontrib-apidoc", "sphinx_multiversion", From 601a95b7db6d6a57832d08cc02ec1c2e95701ae7 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 3 Dec 2026 16:23:58 +0100 Subject: [PATCH 2/2] ci: install pandoc for the notebooks in the docs build nbsphinx converts the notebooks' Markdown cells with pandoc, which the conda lockfile provided and the python/default image lacks. Co-Authored-By: Claude Opus 5.5 --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72163e23..edfda184 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -168,6 +168,12 @@ jobs: - run: name: Check out git submodules command: git submodule update --init + - run: + name: Install pandoc (nbsphinx converts the notebooks with it) + command: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends pandoc + pandoc --version | head -n 1 - run: name: Install the package and the documentation tools command: python -m pip install -e '.[doc]'