Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ orbs:
jobs:
build-docs:
docker:
- image: cimg/python:3.10.17
- image: cimg/python:3.12.11
environment:
XDG_CACHE_HOME: /home/circleci/.cache
parameters:
Expand Down Expand Up @@ -65,15 +65,15 @@ jobs:
. .venv/bin/activate
uv pip install -e "napari/[pyqt5,docs]"
environment:
PIP_CONSTRAINT: napari/resources/constraints/constraints_py3.10_docs.txt
PIP_CONSTRAINT: napari/resources/constraints/constraints_py3.12_docs.txt
- run:
name: Build docs
command: |
. .venv/bin/activate
cd docs
xvfb-run --auto-servernum make << parameters.make_target >>
environment:
PIP_CONSTRAINT: ../napari/resources/constraints/constraints_py3.10_docs.txt
PIP_CONSTRAINT: ../napari/resources/constraints/constraints_py3.12_docs.txt
- store_artifacts:
path: docs/docs/_build/html/
- save_cache:
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.10"
python-version: "3.12"
cache-dependency-path: |
napari/pyproject.toml

Expand All @@ -61,14 +61,18 @@ jobs:
${{ github.workspace }}/.cache/pooch
key: pooch

- uses: tlambert03/setup-qt-libs@19e4ef2d781d81f5f067182e228b54ec90d23b76 # v1.8
- name: Setup headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
with:
qt: true
wm: herbstluftwm

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "napari/[pyqt5, docs]"
env:
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt

- name: Testing
run: |
Expand All @@ -82,27 +86,27 @@ jobs:
make fallback-videos

- name: Build Docs
uses: aganders3/headless-gui@f85dd6316993505dfc5f21839d520ae440c84816 # v2.2
run: make -C docs html
env:
GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }}
GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
with:
# Runs in '/home/runner/work/docs/docs/docs'
# Built HTML pages in '/home/runner/work/docs/docs/docs/docs/_build/html'
run: make -C docs html
# skipping setup stops the action from running the default (tiling) window manager
# the window manager is not necessary for docs builds at this time and it was causing
# problems with screenshots (https://github.com/napari/docs/issues/285)
linux-setup: "echo 'skip setup'"
linux-teardown: "echo 'skip teardown'"
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt

- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: html
path: docs/docs/_build/html/

- name: Upload logs
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

with:
name: Upload Logs
path: |
/tmp/*.log

deploy:
name: Download & Deploy Artifact
needs: build-and-upload
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.10"
python-version: "3.12"
cache-dependency-path: |
napari/pyproject.toml

Expand All @@ -66,33 +66,30 @@ jobs:
${{ github.workspace }}/.cache/pooch
key: pooch

- uses: tlambert03/setup-qt-libs@19e4ef2d781d81f5f067182e228b54ec90d23b76 # v1.8
- name: Setup headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
with:
qt: true
wm: herbstluftwm

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "napari/[pyqt5, docs]"
env:
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt

- name: Check napari can be imported
run: |
python -c 'import napari; print(napari.__version__)'
python -c 'import napari.layers; print(napari.layers.__doc__)'

- name: Build Docs
uses: aganders3/headless-gui@f85dd6316993505dfc5f21839d520ae440c84816 # v2.2
run: make -C docs ${{ inputs.make_target || 'slimfast' }}
env:
GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }}
GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
with:
run: make -C docs ${{ inputs.make_target || 'slimfast' }}
# skipping setup stops the action from running the default (tiling) window manager
# the window manager is not necessary for docs builds at this time and it was causing
# problems with screenshots (https://github.com/napari/docs/issues/285)
linux-setup: "echo 'skip setup'"
linux-teardown: "echo 'skip teardown'"
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt

- name: Upload artifact
id: upload
Expand All @@ -101,3 +98,12 @@ jobs:
with:
name: docs
path: docs/docs/_build/html

- name: Upload logs
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

with:
name: Upload Logs
path: |
/tmp/*.log
Loading