Skip to content

Commit 877d2c1

Browse files
committed
fixes to packaging
1 parent 5ec1f57 commit 877d2c1

File tree

3 files changed

+38
-9
lines changed

3 files changed

+38
-9
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.0.0] - 2024-12-10
8+
9+
### Fixed
10+
- Fixes and improvements to the GeoNode API client
11+
- Fixed the synchronization between styles obtained from GeoNode and the QGIS renderer
12+
- Enhancements to the UX, including better error reporting and resilience errors
13+
14+
### Changed
15+
- Dropped support for legacy APIs (GeoNode < 4)
16+
717
## [1.0.1] - 2023-01-20
818

919
### Fixed
1020
- GeoNode core provider replacement inside the Data Source Manager window
1121

1222
## [1.0.0] - 2022-02-25
1323

14-
### Changed
24+
### Fixed
1525
- Default WFS version for new connections is now 1.1.0, which is known to work OK when editing vector
1626
layers via WFS
1727

pluginadmin.py

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,26 @@ def build(
8787
icon_path = copy_icon(context, output_dir)
8888
if icon_path is None:
8989
_log("Could not copy icon", context=context)
90+
licese_path = copy_license(context, output_dir)
91+
if licese_path is None:
92+
_log("Could not copy LICENSE file", context=context)
9093
compile_resources(context, output_dir)
9194
generate_metadata(context, output_dir)
9295
return output_dir
9396

97+
@app.command()
98+
def copy_license(context: typer.Context,
99+
output_dir: typing.Optional[Path] = LOCAL_ROOT_DIR / "build/temp",
100+
) -> Path:
101+
license_path = LOCAL_ROOT_DIR / "LICENSE"
102+
if license_path.is_file():
103+
target_path = output_dir / license_path.name
104+
target_path.parent.mkdir(parents=True, exist_ok=True)
105+
shutil.copy(license_path, target_path)
106+
result = target_path
107+
else:
108+
result = None
109+
return result
94110

95111
@app.command()
96112
def copy_icon(
@@ -288,19 +304,22 @@ def _get_virtualenv_site_packages_dir() -> Path:
288304
raise RuntimeError(f"{site_packages_dir} does not exist")
289305
return result
290306

307+
def _get_author_names(authors):
308+
return [author.split("<")[0].strip() for author in authors]
309+
310+
def _get_author_emails(authors):
311+
return [author.split("<")[1].strip(">") for author in authors]
291312

292313
@lru_cache()
293314
def _get_metadata() -> typing.Dict:
294315
conf = _parse_pyproject()
295316
poetry_conf = conf["tool"]["poetry"]
296-
raw_author_list = poetry_conf["authors"][0].split("<")
297-
author = raw_author_list[0].strip()
298-
email = raw_author_list[-1].replace(">", "")
317+
299318
metadata = conf["tool"]["qgis-plugin"]["metadata"].copy()
300319
metadata.update(
301320
{
302-
"author": author,
303-
"email": email,
321+
"author": ", ".join(_get_author_names(poetry_conf["authors"])),
322+
"email": ", ".join(_get_author_emails(poetry_conf["authors"])),
304323
"description": poetry_conf["description"],
305324
"version": poetry_conf["version"],
306325
"tags": ", ".join(metadata.get("tags", [])),
@@ -377,7 +396,7 @@ def _get_existing_releases(
377396
"""Query the github API and retrieve existing releases"""
378397
# TODO: add support for pagination
379398
base_url = "https://api.github.com/repos/kartoza/qgis_geonode/releases"
380-
response = httpx.get(base_url)
399+
response = httpx.get(base_url, follow_redirects=True)
381400
result = []
382401
if response.status_code == 200:
383402
payload = response.json()

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tool.poetry]
22
name = "qgis_geonode"
3-
version = "2.0.0.dev0"
3+
version = "2.0.0"
44
description = "A QGIS plugin for integrating with modern GeoNode"
5-
authors = ["Kartoza <[email protected]>", "GeoSolutions <[email protected]>"]
5+
authors = ["GeoNode Development Team <[email protected]>"]
66
license = "GPL-3.0-or-later"
77

88
[tool.poetry.dependencies]

0 commit comments

Comments
 (0)