From a966001b5bcfaf156a9dcc5f85092a61eb9b227e Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Thu, 3 Sep 2026 20:33:56 +0200 Subject: [PATCH 1/2] Release 1.0.0 Six years of production use (first commit 2020-09-20), a real downstream dependency (RTB), and this cycle's comprehensive type-hinting/documentation/bug-fixing pass felt like the right point to commit to API stability. See CHANGELOG.md for the full list of what changed since 0.6.5 (the last real release -- 0.6.4 and 0.6.5 were identical except for the version string). Co-Authored-By: Claude Sonnet 5 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b00fd65..c65366cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,47 @@ +1.0.0 + +- First 1.0 release: six years of production use since the first commit + in 2020 (including as a real dependency of the Robotics Toolbox for + Python), and this cycle's comprehensive type-hinting, documentation, + and bug-fixing pass, felt like the right point to commit to API + stability. +- Breaking (internal-only): renamed the abstract base classes `PGraph` -> + `_BaseGraph` and `Vertex` -> `BaseVertex`. Neither was ever exported + from the package or referenced by name elsewhere in the ecosystem. +- Added `iscyclic()` to test whether a graph contains a cycle. +- Added a `dim` keyword arg to `UGraph`/`DGraph`: declares that every + embedded vertex must have a coordinate of exactly that length, + enforced in `add_vertex()`. +- Added `remove_edge()`/`remove_vertex()` as explicit replacements for + the old, ambiguous `remove()` (deprecated, still works). +- Added modern type hints and reST docstrings throughout, most with a + runnable, doc-build-verified usage example. +- Fixed a cluster of real bugs found via the type-hinting and testing + pass: wrong-subclass vertices silently accepted or mangled by + `add_vertex()`; `Dict()` always creating undirected vertices even for + `DGraph`; a broken same-type check in `connect()` that never actually + caught a cross-type or cross-graph connection; `path_BFS`/`path_UCS`/ + `path_Astar` validating the wrong parameter's type; `distance()` and + the path planners silently packing `None`/`nan` into results for + costless edges instead of raising; two bugs in `incidence()` that + scrambled its output; `remove()` unconditionally crashing for any + directed-graph edge; `dotfile()` closing `sys.stdout` when called + with its default arguments; and several methods crashing with a bare + `AttributeError`/`TypeError` instead of a clear message when called on + a vertex with no coordinate or no graph membership. +- Removed the vertex `connect()` "pass an existing Edge instead of a + destination vertex" option -- it was completely broken and exercised + by no test. +- `mypy` added as an informational CI check; the bulk of the + `Optional`-narrowing gap it found has been closed. +- Documentation now builds with `sphinx-pyrunblock` (replacing the + unmaintained `sphinx-autorun`) and `matplotlib.sphinxext.plot_directive` + for real embedded plot images; the doc footer now matches the + ecosystem-wide convention. +- CI: added Python 3.13/3.14 to the test matrix; PyPI publishing is now + automated via GitHub Releases and trusted publishing (see + `.github/workflows/publish.yml`) instead of a manual `twine upload`. + 0.6.3 - runs with Numpy2.x diff --git a/pyproject.toml b/pyproject.toml index a5b133ad..a3884f35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pgraph-python" -version = "0.6.4" +version = "1.0.0" authors = [{ name = "Peter Corke", email = "rvc@petercorke.com" }] description = "Mathematical graphs for Python" readme = "README.md" From dc6e83708296b6f46ec1d6192e15b9ae80b0ee08 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Thu, 3 Sep 2026 20:34:35 +0200 Subject: [PATCH 2/2] changelog: also credit MVTB as a real dependency, not just RTB Co-Authored-By: Claude Sonnet 5 --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c65366cb..8cf07d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ 1.0.0 - First 1.0 release: six years of production use since the first commit - in 2020 (including as a real dependency of the Robotics Toolbox for - Python), and this cycle's comprehensive type-hinting, documentation, - and bug-fixing pass, felt like the right point to commit to API - stability. + in 2020 (including as a real dependency of both the Robotics Toolbox + for Python and the Machine Vision Toolbox for Python), and this + cycle's comprehensive type-hinting, documentation, and bug-fixing + pass, felt like the right point to commit to API stability. - Breaking (internal-only): renamed the abstract base classes `PGraph` -> `_BaseGraph` and `Vertex` -> `BaseVertex`. Neither was ever exported from the package or referenced by name elsewhere in the ecosystem.