diff --git a/.github/workflows/docs-build-pr.yml b/.github/workflows/docs-build-pr.yml deleted file mode 100644 index b7f9599d31..0000000000 --- a/.github/workflows/docs-build-pr.yml +++ /dev/null @@ -1,60 +0,0 @@ - -name: Build docs - -on: - pull_request: - branches: [ master, 'maint/*' ] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - build: - if: "(github.repository_owner != 'nipreps') && !contains(github.event.head_commit.message, '[skip ci]')" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Determine current branch/tag name - run: | - if [[ "$GITHUB_REF" == refs/pull/* ]]; then - CURBRANCH=${GITHUB_REF%/*} - CURBRANCH=${CURBRANCH##*/} - elif [[ "$GITHUB_REF" == refs/heads/* ]]; then - CURBRANCH=${GITHUB_REF##*/} - elif [[ "$GITHUB_REF" == refs/tags/* ]]; then - echo "This build should not be picking up a tag, cancelling." - exit 1 - fi - - # Remove forward slashes - CURBRANCH=$( echo $CURBRANCH | sed 's+/+_+g' ) - echo "Building branch/tag ${CURBRANCH:-}, from git ref <$GITHUB_REF>" - echo "CURBRANCH=${CURBRANCH}" >> ${GITHUB_ENV} - - - name: Set up Python 3 - uses: actions/setup-python@v5 - with: - python-version: 3 - - - name: Install GraphViz & pandoc - run: | - sudo apt-get update -y - sudo apt-get install -y --no-install-recommends graphviz pandoc - - - name: Install dependencies - run: | - python -m pip install -U build hatch hatchling pip docutils - python -m pip install -r docs/requirements.txt - python -m hatch version | tail -n1 | xargs - - - name: Build docs - run: | - make -C docs/ SPHINXOPTS="-W" BUILDDIR="$HOME/docs" OUTDIR="${CURBRANCH:-html}" html diff --git a/.github/workflows/docs-build-update.yml b/.github/workflows/docs-build-update.yml index 0eda2636b3..6b05f0e947 100644 --- a/.github/workflows/docs-build-update.yml +++ b/.github/workflows/docs-build-update.yml @@ -5,6 +5,8 @@ on: push: branches: [ 'doc/*', 'docs/*', master, "maint/*" ] tags: [ '*' ] + pull_request: + branches: [ master, 'maint/*' ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -12,6 +14,7 @@ concurrency: jobs: build: + if: ${{ github.event_name != 'pull_request' || !contains(github.event.head_commit.message, '[skip ci]') }} runs-on: ubuntu-latest steps: @@ -39,10 +42,11 @@ jobs: # Pacify git if we were to commit something git config user.email "nipreps@gmail.com" 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 @@ -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 diff --git a/docs/conf.py b/docs/conf.py index a249a94531..a8fd913f1c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,6 +44,7 @@ autodoc_mock_imports = [ "matplotlib", + "migas", "nilearn", "nipy", "nitime", diff --git a/sdcflows/config.py b/sdcflows/config.py index 68987baa93..2bcaedd757 100644 --- a/sdcflows/config.py +++ b/sdcflows/config.py @@ -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