Skip to content

Commit 4ada6b3

Browse files
committed
Merge remote-tracking branch 'plugin_map2loop/ls_merge'
2 parents 57dec36 + d866175 commit 4ada6b3

Some content is hidden

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

58 files changed

+2927
-95
lines changed

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ tooling:
4545
- .pre-commit-config.yaml
4646
- setup.cfg
4747

48-
4948
UI:
5049
- head-branch:
5150
- ^ui

.github/workflows/linter.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ env:
1919
permissions:
2020
contents: write
2121

22-
2322
jobs:
2423
lint-py:
2524
name: Python 🐍
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: "📦 Package & 🚀 Release"
2+
3+
env:
4+
PROJECT_FOLDER: plugin_map2loop
5+
PYTHON_VERSION: 3.9
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- .github/workflows/package_and_release.yml
13+
- 'docs/**/*'
14+
- "plugin_map2loop/**/*.py"
15+
- "plugin_map2loop/metadata.txt"
16+
tags:
17+
- "*"
18+
19+
# Allow one concurrent deployment per branch/pr
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
translation:
26+
name: "💬 i18n compilation"
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Get source code
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ env.PYTHON_VERSION }}
37+
38+
- name: Install translation requirements
39+
run: |
40+
sudo apt update
41+
sudo apt install qt5-qmake qttools5-dev-tools
42+
python3 -m pip install -U pyqt5-tools
43+
44+
- name: Update translations
45+
run: |
46+
python3 scripts/generate_translation_profile.py
47+
pylupdate5 -noobsolete -verbose ${{ env.PROJECT_FOLDER }}/resources/i18n/plugin_translation.pro
48+
49+
- name: Compile translations
50+
run: lrelease ${{ env.PROJECT_FOLDER }}/resources/i18n/*.ts
51+
52+
- uses: actions/upload-artifact@v4
53+
with:
54+
name: translations-build
55+
path: ${{ env.PROJECT_FOLDER }}/**/*.qm
56+
if-no-files-found: error
57+
58+
# -- NO TAGS ----------------------------------------------------------------------
59+
packaging:
60+
name: "📦 Packaging plugin"
61+
runs-on: ubuntu-latest
62+
needs:
63+
- translation
64+
65+
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
66+
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v4
70+
71+
- name: Setup Python
72+
uses: actions/setup-python@v5
73+
with:
74+
cache: "pip"
75+
cache-dependency-path: "requirements/packaging.txt"
76+
python-version: ${{ env.PYTHON_VERSION }}
77+
78+
- name: Install dependencies
79+
run: |
80+
python -m pip install -U pip setuptools wheel
81+
python -m pip install -U -r requirements/packaging.txt
82+
83+
- name: Download translations
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: translations-build
87+
path: ${{ env.PROJECT_FOLDER }}
88+
89+
- name: Amend gitignore to include compiled translations and add it to tracked files
90+
run: |
91+
# include compiled translations
92+
sed -i "s|^*.qm.*| |" .gitignore
93+
94+
# git add full project
95+
git add ${{ env.PROJECT_FOLDER }}/
96+
97+
- name: Package the latest version
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
run: |
101+
qgis-plugin-ci package latest \
102+
--allow-uncommitted-changes \
103+
--plugin-repo-url $(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')
104+
105+
- uses: actions/upload-artifact@v4
106+
with:
107+
name: ${{ env.PROJECT_FOLDER }}-latest
108+
path: |
109+
plugins.xml
110+
${{ env.PROJECT_FOLDER }}.*.zip
111+
if-no-files-found: error
112+
113+
# -- ONLY TAGS ----------------------------------------------------------------------
114+
release:
115+
name: "🚀 Release on tag"
116+
runs-on: ubuntu-latest
117+
permissions:
118+
contents: write
119+
needs:
120+
- translation
121+
122+
if: startsWith(github.ref, 'refs/tags/')
123+
124+
steps:
125+
- name: Checkout
126+
uses: actions/checkout@v4
127+
128+
- name: Setup Python
129+
uses: actions/setup-python@v5
130+
with:
131+
cache: "pip"
132+
cache-dependency-path: "requirements/packaging.txt"
133+
python-version: ${{ env.PYTHON_VERSION }}
134+
135+
- name: Install project requirements
136+
run: |
137+
python -m pip install -U pip setuptools wheel
138+
python -m pip install -U -r requirements/packaging.txt
139+
140+
- name: Download translations
141+
uses: actions/download-artifact@v4
142+
with:
143+
name: translations-build
144+
path: ${{ env.PROJECT_FOLDER }}
145+
146+
- name: Amend gitignore to include compiled translations and add it to tracked files
147+
run: |
148+
# include compiled translations
149+
sed -i "s|^*.qm.*| |" .gitignore
150+
151+
# git add full project
152+
git add ${{ env.PROJECT_FOLDER }}/
153+
154+
- name: Create GitHub Release
155+
uses: softprops/action-gh-release@v2
156+
with:
157+
fail_on_unmatched_files: true
158+
generate_release_notes: true
159+
160+
- name: Deploy plugin
161+
run: >-
162+
qgis-plugin-ci
163+
release ${GITHUB_REF/refs\/tags\//}
164+
--allow-uncommitted-changes
165+
--create-plugin-repo
166+
--github-token ${{ secrets.GITHUB_TOKEN }}
167+
--osgeo-username ${{ secrets.OSGEO_USER }}
168+
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}

.github/workflows/release-please.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
on:
32
push:
43
branches:

.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+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
GNU GENERAL PUBLIC LICENSE
33
Version 2, June 1991
44

5-
Copyright (c) 2024, Lachlan GROSE / QGIS
5+
Copyright (c) 2025, Lachlan GROSE / QGIS
66
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
77
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
88
Everyone is permitted to copy and distribute verbatim copies

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!python3
22

3-
"""Configuration for project documentation using Sphinx.
4-
"""
3+
"""Configuration for project documentation using Sphinx."""
54

65
# standard
76
import sys

docs/development/environment.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Typically on Ubuntu:
88
# create virtual environment linking to system packages (for pyqgis)
99
python3 -m venv .venv --system-site-packages
1010
source .venv/bin/activate
11-
1211
# bump dependencies inside venv
1312
python -m pip install -U pip
1413
python -m pip install -U -r requirements/development.txt
46.1 KB
Loading
36.6 KB
Loading

0 commit comments

Comments
 (0)