You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add recommended CLI options section to README (D34)
- Re-render example graph with --no-defines --concentrate
- Add graph0 regeneration instructions as HTML comment
- Finalize changelog and bump version to 2.2.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[")](graph0.svg)
77
84
78
-
**Defines** relations are drawn with _dotted gray arrows_.
85
+
This example was rendered with the [recommended options](#recommended-options): `--colored --no-defines --concentrate`.
79
86
80
-
**Uses** relations are drawn with _black solid arrows_. Recursion is indicated by an arrow from a node to itself. [Mutual recursion](https://en.wikipedia.org/wiki/Mutual_recursion#Basic_examples) between nodes X and Y is indicated by a pair of arrows, one pointing from X to Y, and the other from Y to X.
87
+
**Uses** relations are drawn with _black solid arrows_. Recursion is indicated by an arrow from a node to itself. [Mutual recursion](https://en.wikipedia.org/wiki/Mutual_recursion#Basic_examples) between nodes X and Y is indicated by a pair of arrows, one pointing from X to Y, and the other from Y to X. With `--concentrate`, bidirectional edges are merged into double-headed arrows.
88
+
89
+
**Defines** relations (drawn with _dotted gray arrows_) can be enabled with `--defines`.
81
90
82
91
**Nodes** are always filled, and made translucent to clearly show any arrows passing underneath them. This is especially useful for large graphs with GraphViz's `fdp` filter. If colored output is not enabled, the fill is white.
83
92
84
93
In **node coloring**, the [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) color model is used. The **hue** is determined by the _filename_ the node comes from. The **lightness** is determined by _depth of namespace nesting_, with darker meaning more deeply nested. Saturation is constant. The spacing between different hues depends on the number of files analyzed; better results are obtained for fewer files.
85
94
86
-
**Groups** are filled with translucent gray to avoid clashes with any node color.
95
+
**Groups**can be enabled with `--grouped` (and `--nested-groups` for nested subgraph clusters). Groups are filled with translucent gray to avoid clashes with any node color.
87
96
88
97
The nodes can be **annotated** by _filename and source line number_ information.
This omits defines edges (which tend to clutter the graph) and merges bidirectional uses edges into double-headed arrows. The `dot` layout works well for hierarchical call graphs; for larger graphs, `fdp` (force-directed) can produce more readable results:
137
+
138
+
```bash
139
+
pyan3 src/*.py --dot --colored --no-defines --concentrate --graphviz-layout fdp --file output.dot
140
+
fdp -Tsvg output.dot -o output.svg
141
+
```
142
+
143
+
For a high-level overview, add `--depth 1` to collapse everything down to modules, classes, and top-level functions:
Copy file name to clipboardExpand all lines: TODO_DEFERRED.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,6 @@ Items with GitHub ticket numbers are tracked externally. The rest are internal n
28
28
-**D31: Test suite organization**: Tests are spread across few modules (`test_features.py`, `test_regressions.py`, `test_modvis.py`, `test_writers.py`, `test_analyzer.py`, `test_sphinx.py`, `test_coverage.py`). Consider reorganizing by concern — e.g. separate CLI tests from unit tests, group by module under test.
29
29
-**D32: Analyzer module split**: `analyzer.py` is ~2200 lines. Consider splitting into submodules (e.g. visitors, postprocessing, scope handling) without changing the public API.
30
30
-**D33: Type annotations for pyan's own code**: Add type annotations to pyan's modules. The analyzer is the largest target (~2200 lines). Would improve IDE support and catch bugs.
31
-
-**D34: Document recommended options in README**: The README should include a recommended set of options for common use cases, e.g.:
32
-
-`pyan3 src/*.py --dot --colored --no-defines --concentrate --file output.dot` for a clean uses-only call graph
33
-
- Laying out with `fdp` (works well with Pyan call graphs): `fdp -Txdot output.dot -o output.xdot`
34
-
-`--depth 1` for module+class/function overview, default depth for full detail
35
-
36
-
Discovered during raven-xdot-viewer dark mode contrast fix.
37
31
38
32
## Done
39
33
@@ -51,4 +45,5 @@ Discovered during raven-xdot-viewer dark mode contrast fix.
0 commit comments