Repository navigation
[CI only] Validate parallel edge grouping (#78) - #3
Draft
huxiaoyi-ovo wants to merge 43 commits into
Draft
huxiaoyi-ovo wants to merge 43 commits into
huxiaoyi-ovo wants to merge 43 commits into
Conversation
…etercorke#74) Without a k-d tree both measured the metric of every vertex in a Python loop, and any add_vertex discarded the tree, so a planner that interleaves add_vertex with closest (RTB's LatticePlanner, RRTPlanner) always paid for the loop. The graph now keeps the coordinates of its embedded vertices as a matrix, built on first use and appended to by add_vertex, and applies the built-in metrics to all rows at once. Removing a vertex or assigning a coord drops it. A metric of your own is still applied to each vertex in turn. It is not pickled or copied, and has its own staleness flag. closest at N=1,000: 726 us -> 12 us. Lattice plan of 1,292 vertices: 1.07 s -> 0.06 s. Vertices, edges and paths of the RTB planners are unchanged. A coordinate changed in place (v.coord[0] = x) is not seen, as with build_kdtree(); documented. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Agents choosing between packages need to know what this one is for and what it is not for, and users phrase problems as tasks, not API names. llms_intro.md gains a "When to use it" section (including what it is not for) and a "Recipes" section of task-phrased one-liners, each checked against the current code. pyproject.toml gains a project URL for llms.txt so it is discoverable from the PyPI page. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Align plot() and highlight_path() with the RVC block contract without changing explicit True/False handling. Co-Authored-By: ChatGPT (OpenAI GPT-6) <noreply@openai.com>
Co-Authored-By: ChatGPT (OpenAI GPT-6) <noreply@openai.com>
Co-Authored-By: ChatGPT (OpenAI GPT-6) <noreply@openai.com>
Co-Authored-By: ChatGPT (OpenAI GPT-6) <noreply@openai.com>
Co-Authored-By: ChatGPT (OpenAI GPT-6) <noreply@openai.com>
The graph had two __repr__ definitions in one class. The first returned str(self) and was shadowed by the second, which printed one line per vertex, so a repr (a notebook cell, a debugger, a log line, an error message) was as long as the graph. A type: ignore[no-redef] hid the redefinition. Keep one __repr__, the same one-line summary as __str__, and have show() print what the long repr did: each vertex with its name, coordinate and component number. plot() and show() now refer to each other in :seealso:. Part of petercorke#23. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…elper Fourteen of the sixteen assert statements in PGraph.py only told mypy that an optional value was set: the ends of an edge (v1 and v2 are None until it is connected) and the name of a vertex (None until it is in a graph). Bandit reports each as B101, and python -O removes them. Add Edge._ends(), which returns both vertices or raises ValueError, and Vertex._require_name(), which returns the name or raises ValueError, in the manner of Graph._require_cost(). They replace the asserts, so the narrowing is still there for mypy and the check is a real one. The two asserts left (the coordinate of a candidate in near(), the graph in Vertex.connect()) are type narrowing too, and are marked # nosec B101. A connected edge behaves as before. An unconnected one, which no graph holds, now raises ValueError from endpoints and next() instead of AssertionError (or, from next(), "should not happen"). Part of petercorke#23. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Delete posegraph.py, a 2020 prototype in the repository root that nothing
uses: it imports the deprecated UVertex, has a stub method and debug prints,
and needs itertools.pairwise (Python 3.10) in a package that supports 3.9.
The Robotics Toolbox has the real PoseGraph.
- examples/create_json.py: pop('dgoal', None) instead of a bare except.
- Pin the two remaining third-party GitHub Actions to commit SHAs with the
version in a comment, as RTB did in petercorke/robotics-toolbox-python#892:
codecov/codecov-action v7.1.1 and dependabot/fetch-metadata v3.1.0. They are
the commits that @v7 and @V3 point to today, so what runs is unchanged.
GitHub's own actions/* stay on tags, and Dependabot updates a pinned SHA with
its comment.
- Ignore build/ as well as docs/build and dist/.
Part of petercorke#23.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Edge.__str__ (and so repr) used "--" and "->". Use ↔ for an undirected edge and → for a directed one. The DOT exporter is unchanged: GraphViz needs ASCII. The saved outputs in examples/roads.ipynb are updated. Fixes petercorke#76 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix: repr(g) is the one-line summary, show() lists the vertices
…-helpers refactor: narrow optional edge ends and vertex names with a checked helper
…eftovers chore: housekeeping leftovers from the Codacy cleanup
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rows feat(edge): show ↔ and → between the ends of an edge
docs(llms): add 'when to use it' and recipes, link llms.txt from PyPI
perf: closest() and near() use a matrix of coordinates, not a loop
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.14.2 to 1.14.3. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](pypa/gh-action-pypi-publish@dc37677...7245906) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-version: 1.14.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…tions/pypa/gh-action-pypi-publish-1.14.3 chore(deps): bump pypa/gh-action-pypi-publish from 1.14.2 to 1.14.3
…tract-79 fix(plot): default to environment-managed Matplotlib display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork-only validation of the changes requested by Peter Corke in upstream PR petercorke#78. Runs the repository's Python 3.9–3.14 test matrix, mypy, and coverage on the exact proposed head. Do not merge this validation PR; the upstream PR remains the actual contribution.
AI disclosure: ChatGPT assisted with code analysis and test preparation.