This project uses qgis_plugin_tools submodule, so when cloning
use --recurse-submodules like so:
git clone --recurse-submodules https://github.com/cividi/spatial-data-package-export.git
The code for the plugin is in the SpatialDataPackageExport folder. Make sure you have required tools, such as Qt with Qt Editor and Qt Linquist installed by following this tutorial.
For building the plugin use platform independent build.py script.
If you create or edit source files make sure that:
- they contain relative imports
from ..utils.exceptions import TestException # Good from SpatialDataPackageExport.utils.exceptions import TestException # Bad
- they will be found by build.py script (
py_filesandui_filesvalues) - you consider adding test files for the new functionality
Edit build.py to contain working values for profile, lrelease and pyrcc. If you are running on Windows, make sure the value QGIS_INSTALLATION_DIR points to right folder
Run the deployment with:
python build.py deployAfter deploying and restarting QGIS you should see the plugin in the QGIS installed plugins where you have to activate it.
Install Docker, docker-compose and python packages listed in requirements.txt to run tests with:
python build.py testThe translation files are in i18n folder.
Translatable content in python files is code such as tr(u"Hello World").
To update language .ts files to contain newest lines to translate, run
python build.py transupYou can then open the .ts files you wish to translate with Qt Linguist and make the changes.
Compile the translations to .qm files with:
python build.py transcompileFollow these steps to create a release
- Add changelog information to CHANGELOG.md using this format
- Make a new commit. (
git add -A && git commit -m "Release 0.1.0") - Create new tag for it (
git tag -a 0.1.0 -m "Version 0.1.0") - Push tag to Github using
git push --follow-tags - Create Github release
- qgis-plugin-ci adds release zip automatically as an asset