Development¶
The plugin has two test suites.
tests/corecovers the STAC, registry, PMTiles, GeoParquet, and download logic inportolan_registry_qgis/core. That package imports neither QGIS nor GDAL, so the suite runs in the uv environment.tests/in_qgisneeds PyQGIS. It builds a small catalog with GDAL and DuckDB and serves it on loopback. The tests then exercise the network code, the layers, the downloads, and the dock.
uv sync
uv run pytest
For the QGIS suite, make a virtual environment on the Python that has PyQGIS:
uv venv --python /usr/bin/python3 --system-site-packages .venv-qgis
VIRTUAL_ENV=.venv-qgis uv pip install pytest pytest-timeout duckdb
QT_QPA_PLATFORM=offscreen .venv-qgis/bin/python -m pytest tests/in_qgis
Add -m network to run the live checks against the registry and two published catalogs.
CI runs tests/in_qgis in the official QGIS 3.44 and 4.2 Docker images, which cover Qt5 and Qt6.
Release¶
- Run
uv run cz bump. It updatespyproject.toml,metadata.txt, andCHANGELOG.md, then tags the commit. - Push the commit and the tag, then publish a GitHub release from the tag.
.github/workflows/release.ymlpackages the plugin withqgis-plugin-ci, attaches the zip to the release, and uploads it to the official QGIS plugin repository.