Skip to content

Commit ccb7179

Browse files
committed
Initial commit
Project created with the Cookiecutter QGIS Plugin Template.
0 parents  commit ccb7179

38 files changed

+2408
-0
lines changed

.editorconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
9+
[*.py]
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.ui]
14+
indent_style = space
15+
indent_size = 2
16+
max_line_length = 100000
17+
18+
[*.md]
19+
trim_trailing_whitespace = false

.flake8

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
# Flake8 is used only for QGIS rules. Ruff is used for all other rules.
3+
select = QGS

.github/ISSUE_TEMPLATE/bug_report.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- Plugin: [e.g. 1.0]
28+
- QGIS [e.g. 3.14]
29+
- Python: [e.g. 3.8]
30+
- OS: [e.g. Windows 10, Fedora 32]
31+
32+
**Additional context**
33+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Expected behaviour**
11+
A clear and concise description of what you'd like to happen if you do x.
12+
13+
**Current behaviour**
14+
A clear and concise description of the current behaviour when you do x. If completely new feature, leave empty.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here. If relevant please also provide version of the plugin and information on the system you are running it on.

.github/workflows/code-style.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: code-style
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master, main]
7+
8+
jobs:
9+
code-style:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-python@v2
14+
- uses: pre-commit/[email protected]

.github/workflows/release.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: released
6+
7+
jobs:
8+
plugin_dst:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: true
15+
16+
- name: Set up Python 3.8
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.8
20+
21+
# Needed if the plugin is using Transifex, to have the lrelease command
22+
# - name: Install Qt lrelease
23+
# run: sudo apt-get update && sudo apt-get install qt5-default qttools5-dev-tools
24+
25+
- name: Install qgis-plugin-ci
26+
run: pip3 install qgis-plugin-ci
27+
28+
# When osgeo upload is wanted: --osgeo-username usrname --osgeo-password ${{ secrets.OSGEO_PASSWORD }}
29+
# When Transifex is wanted: --transifex-token ${{ secrets.TRANSIFEX_TOKEN }}
30+
- name: Deploy plugin
31+
run: qgis-plugin-ci release ${GITHUB_REF/refs\/tags\//} --github-token ${{ secrets.GITHUB_TOKEN }} --disable-submodule-update
+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# workflow name
2+
name: Tests
3+
4+
# Controls when the action will run. Triggers the workflow on push or pull request
5+
# events but only for the wanted branches
6+
on:
7+
pull_request:
8+
push:
9+
branches: [master, main]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
linux_tests:
14+
# The type of runner that the job will run on
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
# Remove unsupported versions and add more versions. Use LTR version in the cov_tests job
19+
docker_tags: [release-3_10, release-3_16, latest]
20+
fail-fast: false
21+
22+
# Steps represent a sequence of tasks that will be executed as part of the job
23+
steps:
24+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
25+
- uses: actions/checkout@v2
26+
with:
27+
submodules: true
28+
29+
- name: Pull qgis
30+
run: docker pull qgis/qgis:${{ matrix.docker_tags }}
31+
32+
# Runs all tests
33+
- name: Run tests
34+
run: >
35+
docker run --rm --net=host --volume `pwd`:/app -w=/app -e QGIS_PLUGIN_IN_CI=1 qgis/qgis:${{ matrix.docker_tags }} sh -c
36+
"pip3 install -qr requirements-dev.txt && xvfb-run -s '+extension GLX -screen 0 1024x768x24'
37+
pytest -v --cov=arho_feature_template --cov-report=xml"
38+
39+
# Upload coverage report. Will not work if the repo is private
40+
- name: Upload coverage to Codecov
41+
if: ${{ matrix.docker_tags == 'latest' && !github.event.repository.private }}
42+
uses: codecov/codecov-action@v1
43+
with:
44+
file: ./coverage.xml
45+
flags: unittests
46+
fail_ci_if_error: false # set to true when upload is working
47+
verbose: false
48+
49+
windows_tests:
50+
runs-on: windows-latest
51+
52+
steps:
53+
- uses: actions/checkout@v2
54+
with:
55+
submodules: true
56+
57+
- name: Choco install qgis
58+
uses: crazy-max/ghaction-chocolatey@v1
59+
with:
60+
args: install qgis-ltr -y
61+
62+
- name: Run tests
63+
shell: pwsh
64+
run: |
65+
$env:PATH="C:\Program Files\QGIS 3.16\bin;$env:PATH"
66+
$env:QGIS_PLUGIN_IN_CI=1
67+
python-qgis-ltr.bat -m pip install -qr requirements-dev.txt
68+
python-qgis-ltr.bat -m pytest -v
69+
70+
pre-release:
71+
name: "Pre Release"
72+
runs-on: "ubuntu-latest"
73+
needs: [linux_tests, windows_tests]
74+
75+
steps:
76+
- uses: hmarr/debug-action@v2
77+
78+
- uses: "marvinpinto/action-automatic-releases@latest"
79+
if: ${{ github.event.pull_request }}
80+
with:
81+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
82+
automatic_release_tag: "dev-pr"
83+
prerelease: true
84+
title: "Development Build made for PR #${{ github.event.number }}"
85+
86+
- uses: "marvinpinto/action-automatic-releases@latest"
87+
if: ${{ github.event.after != github.event.before }}
88+
with:
89+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
90+
automatic_release_tag: "dev"
91+
prerelease: true
92+
title: "Development Build made for master branch"
93+
94+
- uses: actions/checkout@v2
95+
with:
96+
submodules: true
97+
98+
- name: Set up Python 3.8
99+
uses: actions/setup-python@v1
100+
with:
101+
python-version: 3.8
102+
103+
# Needed if the plugin is using Transifex, to have the lrelease command
104+
# - name: Install Qt lrelease
105+
# run: sudo apt-get update && sudo apt-get install qt5-default qttools5-dev-tools
106+
107+
- name: Install qgis-plugin-ci
108+
run: pip3 install qgis-plugin-ci
109+
110+
# When Transifex is wanted: --transifex-token ${{ secrets.TRANSIFEX_TOKEN }}
111+
- name: Deploy plugin
112+
if: ${{ github.event.pull_request }}
113+
run: qgis-plugin-ci release dev-pr --github-token ${{ secrets.GITHUB_TOKEN }} --disable-submodule-update
114+
115+
# When Transifex is wanted: --transifex-token ${{ secrets.TRANSIFEX_TOKEN }}
116+
- name: Deploy plugin
117+
if: ${{ github.event.after != github.event.before }}
118+
run: qgis-plugin-ci release dev --github-token ${{ secrets.GITHUB_TOKEN }} --disable-submodule-update

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
arho-feature-template/i18n
2+
venv/
3+
.venv/
4+
start_ide.bat
5+
.vscode
6+
*/.pytest_cache
7+
__pycache__

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "arho_feature_template/qgis_plugin_tools"]
2+
path = arho_feature_template/qgis_plugin_tools
3+
url = https://github.com/GispoCoding/qgis_plugin_tools

.pre-commit-config.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.5.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/pre-commit/mirrors-mypy
12+
rev: v1.8.0
13+
hooks:
14+
- id: mypy
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.1.11
17+
hooks:
18+
# Run the linter.
19+
- id: ruff
20+
args: ["--extend-fixable=F841,F401"]
21+
# Run the formatter.
22+
- id: ruff-format

.qgis-plugin-ci

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
plugin_path: arho_feature_template
2+
github_organization_slug: GispoCoding
3+
project_slug: arho-feature-template
4+
transifex_coordinator: replace-me
5+
transifex_organization: replace-me

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
4+
5+
###

0 commit comments

Comments
 (0)