CanFlood is an open source project with numerous contributors
the dev branch is where new features and fixes are collected and tested before release.
the deployed project version
Whether fixing a bug or introducing a new feature to CanFlood, contributors should adhere to the following in order to make their work accessible to users via the QGIS plugin repository. Execute the below steps to prepare and release an update.
-
merge feature branches into dev branch. test and fix.
-
create a PR (dev > master) named " release candidate" (e.g., v1.2.0 release candidate). Copy this checklist into the description.
-
pull changes from master into dev branch (should just be small changes to .md files)
-
update the documentation if necessary.
-
ensure the documentation builds are passing on ReadTheDocs
-
update the QGIS and CanFlood version tag in
./canflood/__init__.py
and the project README.md. -
update the Updates section of the project README.md.
-
similarly update plugin metadata file
-
update the plugin requirements file to capture the exact dependencies (
pip freeze
) -
execute all pytests. investigate warnings. fix errors. (ctrl+f in console for 'error' and 'warning' as a workaround)
-
create the plugin zip (
canflood.zip
) installable version of the release candidate (.gitignored) -
perform a person test by having a non-developer follow relevant tutorials. investigate warnings and fix errors.
-
merge and close the above PR (do not delete the dev branch)
-
in git-hub, create a new release tag matching the plugin version tag (e.g., v1.2.0) from the recently updated master branch, summarize new features for developers. upload the plugin zip.
-
login to plugins.qgis.org using the CanFlood credentials (ask Nicky). Navigate to Upload a plugin and select the plugin zip file.
-
In QGIS, refresh the repository and ensure that the new version is available (may take ~10mins for the version to be available). From a clean profile, upgrade and check that it works.
For development, we generally use a virtual pyqgis environment pinned to the QGIS target version (see .\README.md) with the additional dependencies installed from ./requirements.txt
.
Generally, we launch this with batch scripts in the .\env folder (.gitignored)
Requires a ./definitions.py
file for running tests with machine specific paths matching the below
only the source directory should be included (./CanFlood
not ./CanFlood/canflood
)
#user's test data location
test_data_dir = r'l:\09_REPOS\04_TOOLS\CanFlood\tests2\data'
tutorial_data_dir = r'l:\09_REPOS\04_TOOLS\CanFlood\tutorials'