Repository navigation
docs: second documentation pass for the single Vertex class - #49
Merged
Merged
Conversation
- analysis: the tables are grouped by theme (graph size and kind, structure, geometry; a vertex's identity, adjacent vertices, incident edges, degree, distance) and cover every query, including directed, validate, name, label, successors, predecessors, in/out edges and degree, edgeto and edges_to - edges and vertices: the Vertex and Edge classes are documented there, and edge.rst is removed, so nothing is orphaned or listed twice; the data structures paragraph says what each kind of vertex holds - export: the exporters module is documented, including how to add a format - intro: a figure for 'What is a graph?' showing an undirected and a directed graph with parallel edges, antiparallel edges and a loop; Graph(directed=) - construction: Graph(directed=...), copying a vertex - planning, visualization, common, policy, modification: corrected wording and cross references; the policy page no longer refers to UGraph.add_vertex - README: path_Astar returns a tuple, samecomponent is a graph method, remove() is deprecated, subclassing wording - conf: add_module_names = False, so headings show Graph, not pgraph.PGraph.Graph Fixes the wrong claim that Edge(v1, v2) is equivalent to Edge().connect(), and the typos found in a read through. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Shows the graph's vertex list and edge dict, a vertex's edge list, and for a directed graph a separate in-list, with the start and end vertex of an edge labelled. The export is outlined text with path coordinates rounded to three decimals, which is visually identical (no pixel differs by more than 5%) and 1.6 MB rather than 2.9 MB. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Class docstring for Graph (so the construction table has a precis), Edge's cost and data are documented attributes, the precis of edges, Vertex.edges and edgeto say what they return, cross references that did not resolve, and typos. The only change to code is the text of an internal error message. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
datastructures.svg is exported from this file, so they are kept together. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
=======================================
Coverage 95.37% 95.37%
=======================================
Files 3 3
Lines 1277 1277
=======================================
Hits 1218 1218
Misses 59 59 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
The second documentation pass, following the single
Vertexclass (#47) andedges_to(#48). Three commits: the rst/README text, the redrawn data-structures diagram, and docstring corrections.Coverage. Every public class and method is in the Sphinx tree, checked against Sphinx's own object inventory. This needed:
Vertexis documented as a class (it had no entry onceuvertex.rst/dvertex.rstwent), withEdgeon the same page;edge.rstis removed so nothing is orphaned or listed twiceanalysistables cover every query (36 entries, grouped by theme), includingdirected,validate,name,label,successors,predecessors, in/out edges and degree,edgetoandedges_topgraph.exportersmodule (formats, adding a format of your own) is in the Export pageVertex.copy,Edge.costandEdge.datahave entriesCorrectness. Found by reading every page and running the examples:
Edge(v1, v2)is not equivalent toEdge().connect(v1, v2)(the first does not add the edge to the graph)path_Astarreturns a tuple,samecomponentis a graph method,remove()is deprecatedpath_BFSas "optimal", the policy page's links and its claim about edge cost without a graphPresentation. An intro figure for "What is a graph?" (undirected and directed, with parallel edges, antiparallel edges and a loop);
Graph(directed=...)in the intro and construction pages; headings showGraphrather thanpgraph.PGraph.Graph(add_module_names = False); the redrawn data-structures diagram, compacted from 2.9 MB to 1.6 MB with no pixel differing by more than 5%.Checks
sphinx-build -E: 0 warnings (the nitpicky build went from 91 warnings to 9, six of which are numpy/typing noise)Not in this PR
DGraph.plot()draws no arrowheads (and parallel edges and loops are invisible inplot()). That is a separate code change, parked for its own branch.🤖 Generated with Claude Code