From 87c59b1bf0dd294d458fdd983ae043223b4cc64a Mon Sep 17 00:00:00 2001 From: hassan <144530465+h55n@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:14:22 +0530 Subject: [PATCH] Restore project URLs to project metadata --- CHANGELOG.md | 2 ++ pyproject.toml | 6 +++--- tests/test_project_metadata.py | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 tests/test_project_metadata.py diff --git a/CHANGELOG.md b/CHANGELOG.md index ee63b35..ef202f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ in every released version. ### Version 1.x.x (unreleased) ## What's Changed +* Keep project URLs under project metadata so dependency groups remain valid + and built distributions include their documentation and source links. * Fix issue where sometimes the plot sectors showed a straight line instead of a curved one (#137) * `wrscatter` now converts the wind direction from degrees to radians, so scatter plots use the same North-up, clockwise convention as the other plots (#99) diff --git a/pyproject.toml b/pyproject.toml index b2bd2a1..df3f1bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,9 @@ optional-dependencies.extras = [ "pandas", "scipy", ] +urls.documentation = "https://python-windrose.github.io/windrose" +urls.homepage = "https://github.com/python-windrose/windrose" +urls.repository = "https://github.com/python-windrose/windrose" [dependency-groups] dev = [ @@ -47,9 +50,6 @@ dev = [ { include-group = "docs" }, ] docs = [ "jupyter", "nbsphinx", "seaborn", "sphinx", "sphinx-copybutton", "sphinx-rtd-theme" ] -urls.documentation = "https://python-windrose.github.io/windrose" -urls.homepage = "https://github.com/python-windrose/windrose" -urls.repository = "https://github.com/python-windrose/windrose" [tool.setuptools] packages = [ "windrose" ] diff --git a/tests/test_project_metadata.py b/tests/test_project_metadata.py new file mode 100644 index 0000000..67ef395 --- /dev/null +++ b/tests/test_project_metadata.py @@ -0,0 +1,23 @@ +"""Checks for the source distribution's project metadata.""" + +import tomllib +from pathlib import Path + + +def test_dependency_groups_are_lists(): + with (Path(__file__).parents[1] / "pyproject.toml").open("rb") as stream: + metadata = tomllib.load(stream) + + for name, dependencies in metadata["dependency-groups"].items(): + assert isinstance(dependencies, list), name + + +def test_project_urls(): + with (Path(__file__).parents[1] / "pyproject.toml").open("rb") as stream: + metadata = tomllib.load(stream) + + assert metadata["project"]["urls"] == { + "documentation": "https://python-windrose.github.io/windrose", + "homepage": "https://github.com/python-windrose/windrose", + "repository": "https://github.com/python-windrose/windrose", + }