Skip to content

Latest commit

 

History

History
73 lines (41 loc) · 3.11 KB

CONTRIBUTING.md

File metadata and controls

73 lines (41 loc) · 3.11 KB

Contributing to the CanFlood project

CanFlood is an open source project with numerous contributors

Branches

dev

the dev branch is where new features and fixes are collected and tested before release.

master

the deployed project version

CanFlood Plugin update

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.

Step 1: Pull Request

  • 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.

Step 2: Release update on github

  • 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.

Step 3: Publish the plugin on the QGIS plugin repo

  • 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.

Setting up your development environment

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

PYTHONPATH

only the source directory should be included (./CanFlood not ./CanFlood/canflood)

definitions.py

#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'