Skip to content

Commit

Permalink
CI: Move PR doc build into main doc build, add texlive to build depen…
Browse files Browse the repository at this point in the history
…dencies (#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
  • Loading branch information
effigies authored Jan 18, 2024
1 parent 2cd1d45 commit 048eac9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 62 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/docs-build-pr.yml

This file was deleted.

15 changes: 14 additions & 1 deletion .github/workflows/docs-build-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ on:
push:
branches: [ 'doc/*', 'docs/*', master, "maint/*" ]
tags: [ '*' ]
pull_request:
branches: [ master, 'maint/*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

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

steps:
Expand Down Expand Up @@ -39,10 +42,11 @@ jobs:
# Pacify git if we were to commit something
git config user.email "[email protected]"
git config user.name "NiPreps Bot"
- name: Install GraphViz & pandoc
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends graphviz pandoc
sudo apt-get install -y --no-install-recommends graphviz pandoc texlive
- name: Set up Python 3
uses: actions/setup-python@v5
Expand All @@ -55,6 +59,15 @@ jobs:
python -m pip install -r docs/requirements.txt
python -m hatch version | tail -n1 | xargs
- name: Pre-install template
shell: python
run: |
from templateflow.api import get
get('MNI152NLin2009cAsym', desc='brain', resolution=1, suffix='T1w')
get('MNI152NLin2009cAsym', desc='fMRIPrep', resolution=2, suffix='boldref')
get('MNI152NLin2009cAsym', desc='brain', resolution=2, suffix='mask')
get('MNI152NLin2009cAsym', label='brain', resolution=1, suffix='probseg')
- name: Build docs
run: |
make -C docs/ SPHINXOPTS="-W" BUILDDIR="$HOME/docs" OUTDIR="${CURBRANCH:-html}" html
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

autodoc_mock_imports = [
"matplotlib",
"migas",
"nilearn",
"nipy",
"nitime",
Expand Down
2 changes: 1 addition & 1 deletion sdcflows/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@

# Ignore annoying warnings
from sdcflows._warnings import logging
from sdcflows import __version__

__version__ = get_version("sdcflows")
_pre_exec_env = dict(os.environ)

# Reduce numpy's vms by limiting OMP_NUM_THREADS
Expand Down

0 comments on commit 048eac9

Please sign in to comment.