Skip to content

GispoCoding/arho-feature-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARHO feature template

tests codecov.io release

GPLv2 license Ruff pre-commit

This is a QGIS plugin for producing land use plans and is compatible with Ryhti, the Finnish national built environment information system.

The plugin is expected to be used with the arho-ryhti backend system, which provides the necessary database and backend services.

Development

Clone the project with the following command to include the qgis_plugin_tools submodule.

git clone --recurse-submodules https://github.com/GispoCoding/arho-feature-template.git

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

cd arho-feature-template
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

Backend setup

Use a local Arho-ryhti backend for development. The backend can be run in a Docker container.

git clone https://github.com/GispoCoding/arho-ryhti.git

Follow the instructions in the README of the arho-ryhti repository to set up the backend.

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages