Skip to content

Commit 048eac9

Browse files
authored
CI: Move PR doc build into main doc build, add texlive to build dependencies (#428)
* CI: Move PR doc build into main doc build * CI: Add texlive to GHA builds * CI: Pre-fetch template for building docs * FIX: Load version from package, not importlib metadata * DOC: Mock migas import for autodoc
1 parent 2cd1d45 commit 048eac9

File tree

4 files changed

+16
-62
lines changed

4 files changed

+16
-62
lines changed

.github/workflows/docs-build-pr.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/docs-build-update.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ on:
55
push:
66
branches: [ 'doc/*', 'docs/*', master, "maint/*" ]
77
tags: [ '*' ]
8+
pull_request:
9+
branches: [ master, 'maint/*' ]
810

911
concurrency:
1012
group: ${{ github.workflow }}-${{ github.ref }}
1113
cancel-in-progress: true
1214

1315
jobs:
1416
build:
17+
if: ${{ github.event_name != 'pull_request' || !contains(github.event.head_commit.message, '[skip ci]') }}
1518
runs-on: ubuntu-latest
1619

1720
steps:
@@ -39,10 +42,11 @@ jobs:
3942
# Pacify git if we were to commit something
4043
git config user.email "[email protected]"
4144
git config user.name "NiPreps Bot"
45+
4246
- name: Install GraphViz & pandoc
4347
run: |
4448
sudo apt-get update -y
45-
sudo apt-get install -y --no-install-recommends graphviz pandoc
49+
sudo apt-get install -y --no-install-recommends graphviz pandoc texlive
4650
4751
- name: Set up Python 3
4852
uses: actions/setup-python@v5
@@ -55,6 +59,15 @@ jobs:
5559
python -m pip install -r docs/requirements.txt
5660
python -m hatch version | tail -n1 | xargs
5761
62+
- name: Pre-install template
63+
shell: python
64+
run: |
65+
from templateflow.api import get
66+
get('MNI152NLin2009cAsym', desc='brain', resolution=1, suffix='T1w')
67+
get('MNI152NLin2009cAsym', desc='fMRIPrep', resolution=2, suffix='boldref')
68+
get('MNI152NLin2009cAsym', desc='brain', resolution=2, suffix='mask')
69+
get('MNI152NLin2009cAsym', label='brain', resolution=1, suffix='probseg')
70+
5871
- name: Build docs
5972
run: |
6073
make -C docs/ SPHINXOPTS="-W" BUILDDIR="$HOME/docs" OUTDIR="${CURBRANCH:-html}" html

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
autodoc_mock_imports = [
4646
"matplotlib",
47+
"migas",
4748
"nilearn",
4849
"nipy",
4950
"nitime",

sdcflows/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@
124124

125125
# Ignore annoying warnings
126126
from sdcflows._warnings import logging
127+
from sdcflows import __version__
127128

128-
__version__ = get_version("sdcflows")
129129
_pre_exec_env = dict(os.environ)
130130

131131
# Reduce numpy's vms by limiting OMP_NUM_THREADS

0 commit comments

Comments
 (0)