Skip to content

Commit ebc532a

Browse files
Merge remote-tracking branch 'origin/dev-0.1.12' into data_converter_tool
2 parents 076a08c + 7f15d91 commit ebc532a

File tree

95 files changed

+8777
-766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+8777
-766
lines changed

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
__pycache__/
2+
*.pyc
3+
*.pyo
4+
*.dist-info
5+
*.egg-info
6+
.env
7+
.vscode/
8+
.idea/
9+
.tests/
10+
build/
11+
.dist/
12+
.cache/

.github/workflows/documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
steps:
4545
- name: Get source code
46-
uses: actions/checkout@v5
46+
uses: actions/checkout@v6
4747

4848
- name: Set up Python
4949
uses: actions/setup-python@v6
@@ -53,7 +53,7 @@ jobs:
5353
python-version: ${{ env.PYTHON_VERSION }}
5454

5555
- name: Cache Sphinx cache
56-
uses: actions/cache@v4
56+
uses: actions/cache@v5
5757
with:
5858
path: docs/_build/cache
5959
key: ${{ runner.os }}-sphinx-${{ hashFiles('docs/**/*') }}
@@ -69,7 +69,7 @@ jobs:
6969
run: sphinx-build -b html -j auto -d docs/_build/cache -q docs docs/_build/html
7070

7171
- name: Save build doc as artifact
72-
uses: actions/upload-artifact@v4
72+
uses: actions/upload-artifact@v6
7373
with:
7474
name: documentation
7575
path: docs/_build/html/*

.github/workflows/linter.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Get source code
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131

3232
- name: Set up Python
3333
uses: actions/setup-python@v6
@@ -48,4 +48,3 @@ jobs:
4848
# - uses: stefanzweifel/git-auto-commit-action@v6
4949
# with:
5050
# commit_message: "style: style fixes by ruff and autoformatting by black"
51-

.github/workflows/package_and_release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828

2929
steps:
3030
- name: Get source code
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3232

3333
- name: Setup Python
34-
uses: actions/setup-python@v5
34+
uses: actions/setup-python@v6
3535
with:
3636
python-version: ${{ env.PYTHON_VERSION }}
3737

@@ -49,7 +49,7 @@ jobs:
4949
- name: Compile translations
5050
run: lrelease ${{ env.PROJECT_FOLDER }}/resources/i18n/*.ts
5151

52-
- uses: actions/upload-artifact@v4
52+
- uses: actions/upload-artifact@v6
5353
with:
5454
name: translations-build
5555
path: ${{ env.PROJECT_FOLDER }}/**/*.qm
@@ -66,10 +66,10 @@ jobs:
6666

6767
steps:
6868
- name: Checkout
69-
uses: actions/checkout@v4
69+
uses: actions/checkout@v6
7070

7171
- name: Setup Python
72-
uses: actions/setup-python@v5
72+
uses: actions/setup-python@v6
7373
with:
7474
cache: "pip"
7575
cache-dependency-path: "requirements/packaging.txt"
@@ -81,7 +81,7 @@ jobs:
8181
python -m pip install -U -r requirements/packaging.txt
8282
8383
- name: Download translations
84-
uses: actions/download-artifact@v4
84+
uses: actions/download-artifact@v7
8585
with:
8686
name: translations-build
8787
path: ${{ env.PROJECT_FOLDER }}
@@ -102,7 +102,7 @@ jobs:
102102
--allow-uncommitted-changes \
103103
--plugin-repo-url $(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')
104104
105-
- uses: actions/upload-artifact@v4
105+
- uses: actions/upload-artifact@v6
106106
with:
107107
name: ${{ env.PROJECT_FOLDER }}-latest
108108
path: |
@@ -123,10 +123,10 @@ jobs:
123123

124124
steps:
125125
- name: Checkout
126-
uses: actions/checkout@v4
126+
uses: actions/checkout@v6
127127

128128
- name: Setup Python
129-
uses: actions/setup-python@v5
129+
uses: actions/setup-python@v6
130130
with:
131131
cache: "pip"
132132
cache-dependency-path: "requirements/packaging.txt"
@@ -138,7 +138,7 @@ jobs:
138138
python -m pip install -U -r requirements/packaging.txt
139139
140140
- name: Download translations
141-
uses: actions/download-artifact@v4
141+
uses: actions/download-artifact@v7
142142
with:
143143
name: translations-build
144144
path: ${{ env.PROJECT_FOLDER }}
@@ -165,4 +165,4 @@ jobs:
165165
--create-plugin-repo
166166
--github-token ${{ secrets.GITHUB_TOKEN }}
167167
--osgeo-username ${{ secrets.OSGEO_USER }}
168-
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}
168+
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}

.github/workflows/packager.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- name: Setup Python
2121
uses: actions/setup-python@v6
@@ -45,7 +45,7 @@ jobs:
4545
- name: Package the latest version
4646
run: qgis-plugin-ci package latest --allow-uncommitted-changes
4747

48-
- uses: actions/upload-artifact@v4
48+
- uses: actions/upload-artifact@v6
4949
with:
5050
name: ${{ env.PROJECT_FOLDER }}-latest
5151
path: ${{ env.PROJECT_FOLDER }}.*.zip

.github/workflows/releaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Get source code
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
2323

2424
- name: Set up Python
2525
uses: actions/setup-python@v6

.github/workflows/tester.yml

Lines changed: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- dev*
78
paths:
89
- '**.py'
910
- .github/workflows/tester.yml
@@ -28,7 +29,7 @@ jobs:
2829

2930
steps:
3031
- name: Get source code
31-
uses: actions/checkout@v5
32+
uses: actions/checkout@v6
3233

3334
- name: Set up Python
3435
uses: actions/setup-python@v6
@@ -45,38 +46,47 @@ jobs:
4546
- name: Run Unit tests
4647
run: pytest -p no:qgis tests/unit/
4748

48-
# test-qgis:
49-
# runs-on: ubuntu-latest
50-
51-
# container:
52-
# image: qgis/qgis:release-3_28
53-
# env:
54-
# CI: true
55-
# DISPLAY: ":1"
56-
# MUTE_LOGS: true
57-
# NO_MODALS: 1
58-
# PYTHONPATH: "/usr/share/qgis/python/plugins:/usr/share/qgis/python:."
59-
# QT_QPA_PLATFORM: "offscreen"
60-
# WITH_PYTHON_PEP: false
61-
# options: -v /tmp/.X11-unix:/tmp/.X11-unix -v ${{ github.workspace }}:/tests_directory
62-
63-
# steps:
64-
# - name: Get source code
65-
# uses: actions/checkout@v5
66-
67-
# - name: Print QGIS version
68-
# run: qgis --version
69-
70-
# - name: Setup plugin
71-
# run: qgis_setup.sh loopstructural
72-
73-
74-
# - name: Install Python requirements
75-
# run: |
76-
# python3 -m pip install -U pip setuptools wheel
77-
# python3 -m pip install -U -r requirements/testing.txt
78-
79-
# - name: Run Unit tests
80-
# run: |
81-
# Xvfb :1 &
82-
# python3 -m pytest tests/qgis/
49+
test-qgis:
50+
runs-on: ubuntu-latest
51+
52+
container:
53+
image: qgis/qgis:release-3_28
54+
env:
55+
CI: true
56+
DISPLAY: ":1"
57+
MUTE_LOGS: true
58+
NO_MODALS: "1"
59+
PYTHONPATH: "/usr/share/qgis/python/plugins:/usr/share/qgis/python:."
60+
QT_QPA_PLATFORM: "offscreen"
61+
WITH_PYTHON_PEP: "false"
62+
options: -v /tmp/.X11-unix:/tmp/.X11-unix -v ${{ github.workspace }}:/tests_directory
63+
64+
steps:
65+
- name: Get source code
66+
uses: actions/checkout@v6
67+
68+
- name: Print QGIS version
69+
run: qgis --version
70+
71+
- name: Install system packages (GDAL/PROJ/GEOS build deps)
72+
run: |
73+
set -e
74+
apt-get update
75+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
76+
build-essential gdal-bin libgdal-dev proj-bin libproj-dev libgeos-dev python3-dev xvfb
77+
rm -rf /var/lib/apt/lists/*
78+
79+
- name: Setup plugin
80+
run: bash /tests_directory/scripts/qgis_setup.sh loopstructural
81+
82+
83+
- name: Install Python requirements
84+
run: |
85+
python3 -m pip install -U pip setuptools wheel
86+
python3 -m pip install -U -r requirements/testing.txt
87+
python3 -m pip install -U -r /tests_directory/loopstructural/requirements.txt
88+
89+
- name: Run Unit tests
90+
run: |
91+
Xvfb :1 &
92+
python3 -m pytest tests/qgis/

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ repos:
2727
- --target-version=py39
2828

2929

30+
# Local hook to forbid print statements in Python files (excluding tests)
31+
- repo: local
32+
hooks:
33+
- id: forbid-print-statements
34+
name: Forbid print statements
35+
entry: grep -nH -E '\bprint\s*\('
36+
language: system
37+
types: [python]
38+
exclude: 'tests/'
39+
pass_filenames: true
40+
description: 'Fail if print statements are found in Python files.'
41+
42+
3043

3144
ci:
3245
autoupdate_schedule: quarterly

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
".": "0.0.1",
33
"loopstructural": "0.1.11"
4-
}
4+
}

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: '3.8'
2+
3+
services:
4+
qgis_test:
5+
image: qgis/qgis:release-3_28
6+
environment:
7+
- CI=true
8+
- DISPLAY=:99
9+
- MUTE_LOGS=true
10+
- NO_MODALS=1
11+
- PYTHONPATH=/usr/share/qgis/python/plugins:/usr/share/qgis/python:.
12+
- QT_QPA_PLATFORM=offscreen
13+
- WITH_PYTHON_PEP=false
14+
volumes:
15+
- ./:/tests_directory
16+
- /tmp/.X11-unix:/tmp/.X11-unix
17+
tty: true
18+
entrypoint: ["tail", "-f", "/dev/null"]

0 commit comments

Comments
 (0)