Skip to content

update python versions for release #18

update python versions for release

update python versions for release #18

Workflow file for this run

name: Docs
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
build-docs:
name: Build & execute docs
runs-on: ubuntu-latest
defaults:
run:
working-directory: ben-py
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: uv python install 3.12
# Builds the PyO3 extension (so autodoc reads live docstrings) and installs the
# render + execution doc dependencies.
- name: Install docs dependencies
run: uv sync --no-dev --extra docs --extra docs-exec
# NB_EXECUTION_MODE=cache executes every tutorial notebook end to end; -W turns
# any Sphinx warning (including a notebook cell error) into a build failure, so
# the docs cannot drift from the live API without CI catching it.
- name: Build docs (execute notebooks, warnings as errors)
env:
NB_EXECUTION_MODE: cache
run: uv run sphinx-build -W -b dirhtml docs docs/_build
# Run every Python code block in the Markdown docs against the live API.
- name: Test documentation code snippets
run: uv run --with pytest pytest tests/test_docs_snippets.py -q
- name: Check documentation links
run: uv run sphinx-build -b linkcheck docs docs/_build/linkcheck
- name: Upload built site
uses: actions/upload-artifact@v7
with:
name: docs-html
path: ben-py/docs/_build