Skip to content

ci(docs): build the documentation in the official GDAL image - #532

Merged
Guts merged 3 commits into
masterfrom
tooling/docs-build-in-gdal-image
Nov 6, 2026
Merged

Guts merged 3 commits into
masterfrom
tooling/docs-build-in-gdal-image

Conversation

@Guts

@Guts Guts commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Description

Build the documentation in the official GDAL image (ghcr.io/osgeo/gdal:ubuntu-small-3.11.0, the same as the root Dockerfile) instead of installing GDAL on the runner. libgdal and the osgeo bindings are already installed and version-matched, which removes the ubuntugis PPA, the apt GDAL packages, setup-python and the compilation of the GDAL wheel.

Python tooling and Tk are installed with apt, and a virtual environment created with --system-site-packages exposes the image's bindings to the project, as in the Dockerfile.

Points to check on the first run:

  • pipdeptree and pip-licenses now run in a venv that also sees system packages, so docs/misc/dependencies.md and docs/misc/licenses.md may list more packages than before.
  • Python is now the one from the image (3.12 on Ubuntu 24.04) instead of 3.11, still within requires-python.
  • The pip cache from setup-python is gone.

This has not been run yet: the workflow only triggers on docs/** or workflow changes in pull requests, so this PR's own run is the first test.

Related issue(s)

None.

Type of change

  • Bug fix (fix/… branch)
  • New feature or enhancement (feature/… branch)
  • Documentation (docs/… branch or *.md/docs/** changes)
  • Packaging / build (packaging/… branch or builder/** changes)
  • Tooling / CI-CD (tooling/… branch or .github/** changes)
  • Tests only (tests/** changes)

Checklist

  • I have read the Contributing Guidelines
  • pre-commit run --all-files passes locally
  • I have added or updated tests covering my changes
  • I have updated the documentation where relevant
  • pytest passes locally

AI/LLM disclosure


Generated by Claude Code

Run the docs job in ghcr.io/osgeo/gdal:ubuntu-small-3.11.0, the same image as the root Dockerfile, so libgdal and the osgeo Python bindings are already installed and version-matched. This removes the ubuntugis PPA, the apt GDAL packages, setup-python and the compilation of the GDAL wheel.

Python tooling and Tk are installed with apt, and a virtual environment created with --system-site-packages exposes the image's osgeo bindings to the project.

AI-Level: 7
AI-Model: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m
@github-actions github-actions Bot added ci-cd Everything related to continuous integration and deployment tooling labels Nov 6, 2026
# Install GDAL first
python -m pip install GDAL=="`gdal-config --version`.*"
- name: Upgrade packaging tools
run: python -m pip install -U pip setuptools wheel
# Install GDAL first
python -m pip install GDAL=="`gdal-config --version`.*"
- name: Upgrade packaging tools
run: python -m pip install -U pip setuptools wheel
…icogis.ui

The documentation build did not install PyQt6, so autodoc failed to import the 14 GUI and qt_compat modules and their API pages were empty. Install the gui extra and the system libraries PyQt6 needs to be imported in the GDAL image.

AI-Level: 7
AI-Model: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m
The API pages of dicogis.ui need PyQt6 to be importable, as in the CI workflow.

AI-Level: 7
AI-Model: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

- name: Install project as a package
run: python -m pip install .[doc]
# gui extra: PyQt6 must be importable so autodoc can document dicogis.ui
run: python -m pip install .[doc,gui]
- name: Install project as a package
run: python -m pip install .[doc]
# gui extra: PyQt6 must be importable so autodoc can document dicogis.ui
run: python -m pip install .[doc,gui]
@Guts
Guts merged commit 840e140 into master Nov 6, 2026
8 of 9 checks passed
@Guts
Guts deleted the tooling/docs-build-in-gdal-image branch November 6, 2026 19:31
Guts added a commit that referenced this pull request Nov 6, 2026
…als (#533)

## Description

Remove the Sphinx warnings that appeared on the API pages of
`dicogis.ui` now that PyQt6 is installed in the documentation build
(#532):

- six module docstrings raised "Unexpected indentation": the
`Name/Purpose/Author` headers of `wdg_tab_publish`, `workers`,
`progress` and `read_vector_flat_dataset` become a reStructuredText
field list, and the continuation lines of `ui/main` and `mw_dicogis` are
dedented;
- the unescaped `*.dbconf` of `read_db_conf` is put in a literal;
- PyQt gives every signal without a docstring of its own a generic one
containing `*types`, read as an unfinished emphasis: a small
`autodoc-process-docstring` hook in `docs/conf.py` drops it and leaves
the signals documented by hand untouched.

The six docstrings were checked with docutils and the hook on a minimal
Sphinx project; the full build has not been run locally (it needs GDAL),
so the CI run of this PR is the confirmation.

## Related issue(s)

Follows #532.

## Type of change

- [ ] Bug fix (`fix/…` branch)
- [ ] New feature or enhancement (`feature/…` branch)
- [x] Documentation (`docs/…` branch or `*.md`/`docs/**` changes)
- [ ] Packaging / build (`packaging/…` branch or `builder/**` changes)
- [ ] Tooling / CI-CD (`tooling/…` branch or `.github/**` changes)
- [ ] Tests only (`tests/**` changes)

## Checklist

- [ ] I have read the [Contributing Guidelines](/CONTRIBUTING.md)
- [ ] `pre-commit run --all-files` passes locally
- [ ] I have added or updated tests covering my changes
- [ ] I have updated the documentation where relevant
- [ ] `pytest` passes locally

## AI/LLM disclosure

- Level: 7 (human specced, bots coded)
- Model: Claude Sonnet 5.5
- Session: https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m

---
_Generated by [Claude
Code](https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m)_
Guts added a commit that referenced this pull request Nov 6, 2026
## Description

`docs/usage/cli.md` was empty: `sphinx-click` failed with `TypeError:
'module' object is not callable` when importing
`dicogis.cli.main:click_object`.

With Sphinx 9.1, `from sphinx.ext.autodoc import mock` returns the
`mock` module instead of the function once `sphinx_autodoc_typehints`
has been imported (sphinx-doc/sphinx#14333), and `sphinx_click` calls
it. Loading `sphinx_click` first in `extensions` keeps the function. The
order is no longer alphabetical, hence the comment in `docs/conf.py`.

Reproduced on a minimal Sphinx project with both extension orders: the
error occurs with `sphinx_autodoc_typehints` first and not with
`sphinx_click` first. The full build has not been run locally, so the CI
run of this PR is the confirmation.

## Related issue(s)

Follows #532.

## Type of change

- [ ] Bug fix (`fix/…` branch)
- [ ] New feature or enhancement (`feature/…` branch)
- [x] Documentation (`docs/…` branch or `*.md`/`docs/**` changes)
- [ ] Packaging / build (`packaging/…` branch or `builder/**` changes)
- [ ] Tooling / CI-CD (`tooling/…` branch or `.github/**` changes)
- [ ] Tests only (`tests/**` changes)

## Checklist

- [ ] I have read the [Contributing Guidelines](/CONTRIBUTING.md)
- [ ] `pre-commit run --all-files` passes locally
- [ ] I have added or updated tests covering my changes
- [ ] I have updated the documentation where relevant
- [ ] `pytest` passes locally

## AI/LLM disclosure

- Level: 7 (human specced, bots coded)
- Model: Claude Sonnet 5.5
- Session: https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m

---
_Generated by [Claude
Code](https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m)_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd Everything related to continuous integration and deployment documentation Improvements or additions to documentation tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants