Skip to main content

QGIS Plugin CI

PyPi version badge PyPI - Downloads PyPI - Python Version

Ruff pre-commit pre-commit.ci status

Contains scripts to perform automated testing and deployment for QGIS plugins. These scripts are written for and tested on GitHub, Travis-CI, github workflows and Transifex.

  • Deploy plugin releases on QGIS official plugin repository
  • Publish plugin in Github releases, option to deploy a custom repository
  • Easily integrated in Travis-CI or github workflows
  • Completely handle translations with Transifex:
    • create the project and the languages
    • pull and push translations
    • all TS/QM files can be managed on the CI, the i18n folder can be omitted from the Git repository
  • changelog section in the metadata.txt can be populated if the CHANGELOG.md is present
  • set the experimental flag according to the tag if needed

📖 For further information, see the documentation.

QGIS-Plugin-CI is best served if you use these two conventions :

Command line

usage: qgis-plugin-ci [-h] [-v] [--version] [--no-validation] {package,changelog,release,pull-translation,push-translation} ...

Package and release QGIS plugins from the command line.

options:
  -h, --help            show this help message and exit
  -v, --verbose         Verbosity level: None = WARNING, -v = INFO, -vv = DEBUG (default: 1)
  --version             show program's version number and exit
  --no-validation       Turn off validation of the version to be released or packaged (default: False)

commands:
  qgis-plugin-ci command

  {package,changelog,release,pull-translation,push-translation}
    package             creates an archive of the plugin
    changelog           gets the changelog content
    release             release the plugin
    pull-translation    pull translations from Transifex
    push-translation    update strings and push translations

📜 See the full CLI reference in documentation.

Requirements

  • The code is under a git repository (git archive is used to bundle the plugin).
  • There is no uncommitted changes when doing a package/release (althought there is an option to bypass this requirement).
  • A configuration at the top directory either in .qgis-plugin-ci or in setup.cfg or pyproject.toml with a [qgis-plugin-ci] section (see docs/configuration/options.md for details).
  • The source files of the plugin are within a sub-directory with a metadata.txt file with the following fields:
    • description
    • qgisMinimumVersion
    • repository
    • tracker

See parameters.py for more parameters and details. Notice that the name of this directory will be used for the zip file.

QRC and UI files

  • Any .qrc file in the source top directory (plugin_path) will be compiled and output as filename_rc.py. You can then import it using import plugin_path.resources_rc
  • Currently, qgis-plugin-ci does not compile any .ui file.

Publishing plugins

When releasing, you can publish the plugin :

  1. In the official QGIS plugin repository. You need to provide user name and password for your Osgeo account.
  2. As a custom repository in Github releases and which can be added later in QGIS. The address will be: https://github.com/__ORG__/__REPO__/releases/latest/download/plugins.xml

Both can be achieved in the same process.

Pre-release and experimental

In the case of a pre-release (either from the tag name according to Semantic Versioning or from the GitHub release), the plugin will be flagged as experimental.

The tool will recognise any label use as a suffix to flag it as pre-release :

  • 10.1.0-beta1
  • 3.4.0-rc.2

Debug

In any Python module, you can have a global variable as DEBUG = True, which will be changed to False when packaging the plugin.

Other tools

QGIS-Plugin-Repo

QGIS-Plugin-CI can generate the plugins.xml file, per plugin. If you want to merge many XML files into one to have a single QGIS plugin repository providing many plugins, you should check QGIS-Plugin-Repo. It's designed to run on CI after QGIS-Plugin-CI.

Release files for qgis-plugin-ci 2.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qgis-plugin-ci 2.10.0
File Size Uploaded
qgis_plugin_ci-2.10.0.tar.gz 83.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qgis-plugin-ci 2.10.0
File Interpreter ABI Platform
qgis_plugin_ci-2.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 127.8 kB

Release files / qgis_plugin_ci-2.10.0.tar.gz

Download URL qgis_plugin_ci-2.10.0.tar.gz
Size 83.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1346a774d348757c8fb985ec71cc77a864afc3d4ae161450ef8fc9cd0a5eadbb
BLAKE2b-256 checksum
How to use checksums
51a48c6ec448f535b757880b3eb967eb4245fbed2af4223aff18faae40a66935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / qgis_plugin_ci-2.10.0-py3-none-any.whl

Download URL qgis_plugin_ci-2.10.0-py3-none-any.whl
Size 44.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8c34509f6866ffe60b9388d8906cfc9fc2efbf52b40252c6c4ecd2e6dd2a1ce
BLAKE2b-256 checksum
How to use checksums
c1a126805d1f9d9d6f04d58cd6ed367e2869c74e3bf885fb95fb9e78d248922d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

2.10.0 This release

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.8.9

2 release files

2.8.8

2 release files

2.8.7

2 release files

2.8.6

2 release files

2.8.5

2 release files

2.8.4

2 release files

2.8.3

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.2

2 release files

2.7.0

2 release files

2.5.4

2 release files

2.5.3

1 release file

2.5.2

1 release file

2.5.1

1 release file

2.5.0

1 release file

2.4.0

1 release file

2.3.0

1 release file

2.2.0

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.1

1 release file

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.3

2 release files

1.0.2

1 release file

1.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page