Development¶
This plugin uses poetry, typer and black.
- Fork the code repository
- Clone your fork locally
- Install poetry
- Install the plugin dependencies into a new virtual env with
cd qgis_dataset_qa_workbench
poetry install
- The plugin comes with a
pluginadmin.py
python module which provides a nice CLI with commands useful for development:
``` poetry run python pluginadmin.py --help
# install plugin into your local QGIS python plugins directory poetry run python pluginadmin.py install
poetry run python pluginadmin.py install-qgis-into-venv ```
- When manually trying out the plugin locally you just need to call
poetry run python pluginadmin.py install
. This command will copy all files into your local QGIS python plugins directory.
Alternatively, the plugin reloader QGIS plugin can be used as a means to install and reload the plugin.
Running tests¶
Tests are made with pytest and pytest-qt. They can be ran with:
# optionally create a QGIS_PREFIX_PATH env variable, if your QGIS is self-compiled
poetry run pytest
Contributing¶
We welcome contributions from everybody but ask that the following process be adhered to:
-
Find (or open) the issue that describes the problem that you want to help solving. Make a mention in the issue that you are working on a solution
-
Fork this repo and work on a solution to the problem. Remember to add passing automated tests to attest that the problem has been fixed
-
Run your code through the black formatter before submitting your PR. Otherwise the CI pipeline may fail, and we will request that you fix it before merging
Releasing new versions¶
This plugin uses an automated release process that is based upon github actions. New versions shall be released under the semantic versioning contract.
In order to have a new version of the plugin release:
-
[] Be sure to have updated the
CHANGELOG
-
[] Be sure to have updated the version on the
pyproject.toml
file. You can either manually modify thetool.poetry.version
key or you can run thepoetry version {version specifier}
command -
[ ] Create a new git annotated tag and push it to the repository. The tag name must follow the
v{major}.{minor}.{patch}
convention, for example:
git tag -a -m 'version 0.3.2' v0.3.2
git push origin v0.3.2
- Github actions will take it from there. The new release shall appear in the custom QGIS plugin repo shortly