GispoCoding / arho-feature-template

GNU General Public License v2.0
0 stars 0 forks source link

ARHO feature template

tests codecov.io release

GPLv2 license Ruff pre-commit

Development

Create a virtual environment activate it and install needed dependencies with the following commands:

python create_qgis_venv.py
.venv\Scripts\activate # On Linux and macOS run `source .venv\bin\activate`
pip install -r requirements-dev.txt -r requirements-test.txt

For more detailed development instructions see development.

Testing the plugin on QGIS

A symbolic link / directory junction should be created to the directory containing the installed plugins pointing to the dev plugin package.

It is recomennded also to use a specifig QGIS profile for development.

On Windows Command promt

set QGIS_PROFILE=arho-dev
mkdir -p %AppData%\QGIS\QGIS3\profiles\%QGIS_PROFILE%\python\plugins
mklink /J %AppData%\QGIS\QGIS3\profiles\%QGIS_PROFILE%\python\plugins\arho_feature_template .\arho_feature_template
C:\OSGeo4W\bin\qgis-ltr.bat --profile %QGIS_PROFILE%

On Windows PowerShell

$env:QGIS_PROFILE = "arho-dev"
New-Item -ItemType Directory -Force ${env:APPDATA}\QGIS\QGIS3\profiles\${env:QGIS_PROFILE}\python\plugins
New-Item -ItemType Junction -Path ${env:APPDATA}\QGIS\QGIS3\profiles\${env:QGIS_PROFILE}\python\plugins\arho_feature_template -Value ${pwd}\arho_feature_template
C:\OSGeo4W\bin\qgis-ltr.bat --profile $env:QGIS_PROFILE

On Linux

export QGIS_PROFILE=arho-dev
ln -s arho_feature_template/ ~/.local/share/QGIS/QGIS3/profiles/$QGIS_PROFILE/python/plugins/arho_feature_template
qgis --profile $QGIS_PROFILE

After that you should be able to enable the plugin in the QGIS Plugin Manager.

VsCode setup

On VS Code use the workspace arho-feature-template.code-workspace. The workspace contains all the settings and extensions needed for development.

Select the Python interpreter with Command Palette (Ctrl+Shift+P). Select Python: Select Interpreter and choose the one with the path .venv\Scripts\python.exe.

License

This plugin is distributed under the terms of the GNU General Public License, version 2 license.

See LICENSE for more information.

Attributations

Open icons created by Smashicons - Flaticon Land use icons created by Fusion5085 - Flaticon