Skip to content

Commit bde3b76

Browse files
authored
Merge pull request #17 from GispoCoding/initial-feature-creation
Initial feature creation
2 parents 65b25bf + 55c7121 commit bde3b76

30 files changed

+905
-362
lines changed

.gitignore

+161-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,162 @@
1-
arho-feature-template/i18n
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110+
.pdm.toml
111+
.pdm-python
112+
.pdm-build/
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
2128
venv/
3-
.venv/
4-
start_ide.bat
5-
.vscode
6-
*/.pytest_cache
7-
__pycache__
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
# pytype static type analyzer
152+
.pytype/
153+
154+
# Cython debug symbols
155+
cython_debug/
156+
157+
# PyCharm
158+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160+
# and can be added to the global gitignore or merged into this file. For a more nuclear
161+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162+
#.idea/

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ repos:
1212
rev: v1.11.2
1313
hooks:
1414
- id: mypy
15+
additional_dependencies: ["types-PyYAML"]
1516
- repo: https://github.com/astral-sh/ruff-pre-commit
1617
rev: v0.6.5
1718
hooks:

.qgis-plugin-ci

-5
This file was deleted.

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,38 @@ Create a virtual environment activate it and install needed dependencies with th
1313
```console
1414
python create_qgis_venv.py
1515
.venv\Scripts\activate # On Linux and macOS run `source .venv\bin\activate`
16-
pip install -r requirements-dev.txt
16+
pip install -r requirements-dev.txt -r requirements-test.txt
1717
```
1818

1919
For more detailed development instructions see [development](docs/development.md).
2020

2121
### Testing the plugin on QGIS
2222

23-
A symbolic link / directory junction should be made to the directory containing the installed plugins pointing to the dev plugin package.
23+
A symbolic link / directory junction should be created to the directory containing the installed plugins pointing to the dev plugin package.
24+
25+
It is recomennded also to use a specifig QGIS profile for development.
2426

2527
On Windows Command promt
2628
```console
27-
mklink /J %AppData%\QGIS\QGIS3\profiles\default\python\plugins\arho_feature_template .\arho_feature_template
29+
set QGIS_PROFILE=arho-dev
30+
mkdir -p %AppData%\QGIS\QGIS3\profiles\%QGIS_PROFILE%\python\plugins
31+
mklink /J %AppData%\QGIS\QGIS3\profiles\%QGIS_PROFILE%\python\plugins\arho_feature_template .\arho_feature_template
32+
C:\OSGeo4W\bin\qgis-ltr.bat --profile %QGIS_PROFILE%
2833
```
2934

3035
On Windows PowerShell
3136
```console
32-
New-Item -ItemType SymbolicLink -Path ${env:APPDATA}\QGIS\QGIS3\profiles\default\python\plugins\arho_feature_template -Value ${pwd}\arho_feature_template
37+
$env:QGIS_PROFILE = "arho-dev"
38+
New-Item -ItemType Directory -Force ${env:APPDATA}\QGIS\QGIS3\profiles\${env:QGIS_PROFILE}\python\plugins
39+
New-Item -ItemType Junction -Path ${env:APPDATA}\QGIS\QGIS3\profiles\${env:QGIS_PROFILE}\python\plugins\arho_feature_template -Value ${pwd}\arho_feature_template
40+
C:\OSGeo4W\bin\qgis-ltr.bat --profile $env:QGIS_PROFILE
3341
```
3442

3543
On Linux
3644
```console
37-
ln -s arho_feature_template/ ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/arho_feature_template
45+
export QGIS_PROFILE=arho-dev
46+
ln -s arho_feature_template/ ~/.local/share/QGIS/QGIS3/profiles/$QGIS_PROFILE/python/plugins/arho_feature_template
47+
qgis --profile $QGIS_PROFILE
3848
```
3949

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

arho-feature-template.code-workspace

+16-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,29 @@
1717
"python.testing.pytestArgs": [
1818
"test"
1919
],
20-
"python.testing.unittestEnabled": false
20+
"python.testing.unittestEnabled": false,
21+
"json.schemas": [
22+
{
23+
"fileMatch": [
24+
"**/template_libraries/*.json"
25+
],
26+
"url": "./arho_feature_template/resources/template_libraries/schema/template_library.schema.json"
27+
}
28+
],
29+
"yaml.schemas": {
30+
"./arho_feature_template/resources/template_libraries/schema/template_library.schema.json": [
31+
"**/template_libraries/*.yaml"
32+
]
33+
}
2134
},
2235
"extensions": {
2336
"recommendations": [
2437
"ms-python.python",
2538
"ms-python.flake8",
2639
"ms-python.mypy-type-checker",
2740
"charliermarsh.ruff",
28-
"editorconfig.editorconfig"
41+
"editorconfig.editorconfig",
42+
"redhat.vscode-yaml"
2943
]
3044
},
3145
"launch": {

arho_feature_template/build.py

-30
This file was deleted.

arho_feature_template/core/feature_template.py

-31
This file was deleted.

0 commit comments

Comments
 (0)