Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3b59949
feat(theme): Add gp-sphinx Furo child theme and linkcode factory
tony Mar 28, 2026
a313344
feat(ext): Bundle argparse CLI doc extensions, add missing defaults
tony Mar 28, 2026
8d5de83
feat(config): Auto-compute issue_url_tpl/ogp, consolidate argparse tests
tony Mar 28, 2026
120d53b
feat(defaults): Add autodoc_typehints, napoleon, copybutton, HTML paths
tony Mar 29, 2026
4c0004f
fix(config): Fix spa-nav.js loading, add release, fix napoleon default
tony Mar 29, 2026
a8a5eff
refactor(workspace): Split into 4 UV workspace packages
tony Mar 29, 2026
819af46
fix(exemplar): Fix module import path and clean up dead code
tony Mar 29, 2026
ce545e5
fix(config): Add html_static_path and templates_path defaults
tony Mar 29, 2026
9655681
fix(smoke): Create _static/_templates dirs and print captured output …
tony Mar 29, 2026
b5e77e6
fix(theme): Move mask-icon outside show_meta_app_icon_tags guard
tony Mar 29, 2026
a9573db
typing(feat[py.typed]): Add PEP 561 markers and enforce strict typing…
tony Mar 29, 2026
219b63e
typing(fix[py.typed]): Actually commit py.typed marker files (missed …
tony Mar 29, 2026
3bda200
typing(feat[typeddict]): Replace dict[str, Any] with TypedDicts, obje…
tony Mar 29, 2026
769a2ff
typing(feat[typeddict]): Replace dict[str, Any] with TypedDicts, obje…
tony Mar 29, 2026
005dad1
fix(logging): Add NullHandler to sphinx_fonts logger
tony Mar 30, 2026
1780b74
fix(exemplar): Use __version__ in setup() return value
tony Mar 30, 2026
dc8775f
fix(config): Use os.path namespace import for relpath
tony Mar 30, 2026
485a5c4
fix(package_tools): Handle missing src subdir in workspace_packages
tony Mar 30, 2026
dcca15d
fix(exemplar): Replace commented-out doctest with working example
tony Mar 30, 2026
89faf49
fix(ruff): Remove blanket D suppression for sphinx-argparse-neo
tony Mar 30, 2026
7151c0a
refactor(defaults): Remove unused DEFAULT_SIDEBARS constant
tony Mar 30, 2026
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
64 changes: 29 additions & 35 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
build:
runs-on: ubuntu-latest
environment: docs
strategy:
matrix:
python-version: ['3.14']
steps:
- uses: actions/checkout@v6

Expand All @@ -25,47 +22,45 @@ jobs:
id: changes
with:
filters: |
root_docs:
- CHANGES
- README.*
docs:
publishable:
- 'README.*'
- 'CHANGES'
- 'docs/**'
- 'examples/**'
python_files:
- 'src/gp_sphinx/**/*.py'
- pyproject.toml
- uv.lock

- name: Should publish
# if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
- 'packages/**'
- 'scripts/ci/**'
- '.github/workflows/docs.yml'
- '.github/workflows/tests.yml'
- 'pyproject.toml'
- 'uv.lock'

- name: Set up Python 3.14
if: steps.changes.outputs.publishable == 'true'
uses: actions/setup-python@v6
with:
python-version: "3.14"

- name: Install uv
if: steps.changes.outputs.publishable == 'true'
uses: astral-sh/setup-uv@v7
if: env.PUBLISH == 'true'
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
if: env.PUBLISH == 'true'
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
if: env.PUBLISH == 'true'
run: uv sync --all-extras --dev
- name: Install workspace dependencies
if: steps.changes.outputs.publishable == 'true'
run: uv sync --all-packages --all-extras --group dev

- name: Install just
if: env.PUBLISH == 'true'
if: steps.changes.outputs.publishable == 'true'
uses: extractions/setup-just@v3

- name: Print python versions
if: env.PUBLISH == 'true'
- name: Print Python versions
if: steps.changes.outputs.publishable == 'true'
run: |
python -V
uv run python -V

- name: Cache sphinx fonts
if: env.PUBLISH == 'true'
if: steps.changes.outputs.publishable == 'true'
uses: actions/cache@v5
with:
path: ~/.cache/sphinx-fonts
Expand All @@ -74,32 +69,31 @@ jobs:
sphinx-fonts-

- name: Build documentation
if: env.PUBLISH == 'true'
run: |
cd docs && just html
if: steps.changes.outputs.publishable == 'true'
run: uv run sphinx-build -W -b html docs docs/_build/html

- name: Configure AWS Credentials
if: env.PUBLISH == 'true'
if: steps.changes.outputs.publishable == 'true'
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.GP_SPHINX_DOCS_ROLE_ARN }}
aws-region: us-east-1

- name: Push documentation to S3
if: env.PUBLISH == 'true'
if: steps.changes.outputs.publishable == 'true'
run: |
aws s3 sync docs/_build/html "s3://${{ secrets.GP_SPHINX_DOCS_BUCKET }}" \
--delete --follow-symlinks

- name: Invalidate CloudFront
if: env.PUBLISH == 'true'
if: steps.changes.outputs.publishable == 'true'
run: |
aws cloudfront create-invalidation \
--distribution-id "${{ secrets.GP_SPHINX_DOCS_DISTRIBUTION }}" \
--paths "/index.html" "/objects.inv" "/searchindex.js"

- name: Purge cache on Cloudflare
if: env.PUBLISH == 'true'
if: steps.changes.outputs.publishable == 'true'
uses: jakejarvis/cloudflare-purge-action@v0.3.0
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: release

on:
push:
tags:
- "v*"

permissions:
contents: read
id-token: write
attestations: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Resolve release metadata
id: release
run: |
python - <<'PY' "${GITHUB_REF_NAME}" >> "${GITHUB_OUTPUT}"
import json
import pathlib
import sys

sys.path.insert(0, str(pathlib.Path("scripts/ci").resolve()))
import package_tools

metadata = package_tools.release_metadata(sys.argv[1])
for key, value in metadata.items():
print(f"{key}={value}")
PY

- name: Install workspace dependencies
run: uv sync --all-packages --all-extras --group dev

- name: Validate lockstep versions
run: uv run python scripts/ci/package_tools.py check-versions

- name: Build publishable packages
run: |
rm -rf dist
mkdir -p dist
while IFS= read -r package; do
uv build --package "$package" --out-dir dist
done < <(uv run python scripts/ci/package_tools.py print-packages)

- name: Validate distributions with twine
run: uvx twine check dist/*

- name: Smoke test publishable packages
run: |
while IFS= read -r package; do
uv run python scripts/ci/package_tools.py smoke "$package" --dist-dir dist
done < <(uv run python scripts/ci/package_tools.py print-packages)

- name: Publish packages
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
packages-dir: dist/
skip-existing: true
142 changes: 107 additions & 35 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
name: tests
name: ci

on: [push, pull_request]
on:
push:
pull_request:

jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

qa:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-extras --dev
- name: Install workspace dependencies
run: uv sync --all-packages --all-extras --group dev

- name: Print python and pytest versions
- name: Print Python versions
run: |
python -V
uv run python -V
Expand All @@ -36,49 +39,118 @@ jobs:
- name: Format with ruff format
run: uv run ruff format . --check

- name: Lint with mypy
- name: Type check with mypy
run: uv run mypy .

- name: Validate package runtime versions
if: matrix.python-version == '3.14'
run: uv run python scripts/ci/package_tools.py check-versions

- name: Test with pytest
run: uv run py.test --cov=./ --cov-report=xml
if: matrix.python-version != '3.14'
run: uv run pytest

- name: Test with pytest and coverage
if: matrix.python-version == '3.14'
run: uv run pytest --cov=./ --cov-report=xml

- uses: codecov/codecov-action@v6
if: matrix.python-version == '3.14'
with:
token: ${{ secrets.CODECOV_TOKEN }}

release:
docs:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
permissions:
id-token: write
attestations: write
needs: qa
steps:
- uses: actions/checkout@v6

strategy:
matrix:
python-version: ['3.14']
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Install workspace dependencies
run: uv sync --all-packages --all-extras --group dev

- name: Build documentation with warnings as errors
run: uv run sphinx-build -W -b html docs docs/_build/html

packages:
runs-on: ubuntu-latest
needs: qa
steps:
- uses: actions/checkout@v6

- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install workspace dependencies
run: uv sync --all-packages --all-extras --group dev

- name: Install dependencies
run: uv sync --all-extras --dev
- name: Validate package runtime versions
run: uv run python scripts/ci/package_tools.py check-versions

- name: Build package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: uv build
- name: Build all workspace packages
run: uv build --all-packages --out-dir dist --clear

- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
- name: Validate distributions with twine
run: uvx twine check dist/*

- name: Upload package distributions
uses: actions/upload-artifact@v7
with:
attestations: true
skip-existing: true
name: dist
path: dist/

smoke:
runs-on: ubuntu-latest
needs: packages
strategy:
fail-fast: false
matrix:
target:
- root-install
- gp-sphinx
- sphinx-gptheme
- sphinx-fonts
- sphinx-argparse-neo
steps:
- uses: actions/checkout@v6

- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Download package distributions
if: matrix.target != 'root-install'
uses: actions/download-artifact@v8
with:
name: dist
path: dist

- name: Smoke test root bootstrap install
if: matrix.target == 'root-install'
run: python scripts/ci/package_tools.py smoke root-install

- name: Smoke test built package artifact
if: matrix.target != 'root-install'
run: python scripts/ci/package_tools.py smoke "${{ matrix.target }}" --dist-dir dist
5 changes: 2 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ This project uses:

```bash
# Install dependencies
uv pip install --editable .
uv pip sync
uv sync --all-packages

# Install with development dependencies
uv pip install --editable . -G dev
uv sync --all-packages --all-extras --group dev
```

### Running Tests
Expand Down
Loading