Skip to content

Phase 8: Graphviz coverage expansion (easy wins) - #12

Merged
exactmike merged 3 commits into
masterfrom
phase8/graphviz-coverage-expansion
Aug 31, 2026
Merged

Phase 8: Graphviz coverage expansion (easy wins)#12
exactmike merged 3 commits into
masterfrom
phase8/graphviz-coverage-expansion

Conversation

@exactmike

Copy link
Copy Markdown
Collaborator

Summary

Reviews Graphviz's own documentation (graphviz.org's attribute/shape references, the Graphviz CHANGELOG, forum.graphviz.org) against PSGraph's current surface and closes the convenience/discoverability gaps that turned up, reusing the module's existing attribute-set-builder pattern rather than adding new machinery. Every DSL keyword already accepts a generic -Attributes hashtable passthrough, so none of this is about raw capability — it's about ValidateSets that reject valid Graphviz values, and attributes with no dedicated parameter anywhere.

  • Export-PSGraph -OutputFormat: widened from 10 to 26 accepted formats (svgz, svg_inline, eps, ps, ps2, xdot, dot_json, xdot_json, json0, canon, gv, fig, bmp, tif/tiff, wbmp, pic, plain-ext) — the old list rejected several valid dot -T values outright. List validated against a real dot -T? on the dev machine (Graphviz 15.1.1); two originally-planned formats (vml/vmlz) turned out not to exist in current Graphviz builds and were swapped for json0/plain-ext.
  • Export-PSGraph -LayoutEngine: added osage and patchwork, the two Graphviz layout engines that were previously unreachable.
  • Graph -Strict: new switch, emits strict digraph/strict graph so GraphViz merges duplicate edges.
  • New-GraphAttributeSet (alias GraphAttributes): new graph/cluster-level attribute-set builder mirroring New-NodeAttributeSet/New-EdgeAttributeSetrankdir previously had no dedicated parameter anywhere in the module. Covers -RankDir, -Splines, -BgColor/-GradientAngle/-Style radial (gradients), -NodeSep/-RankSep, -Concentrate, -Compound, -ColorScheme, -Ratio, -Size, and graph-level font/label attributes.
  • New-NodeAttributeSet: added -Peripheries, -GradientAngle, -Tooltip, -URL/-Href, -XLabel, -ColorScheme; added 'radial' to -Style and 'record'/'Mrecord' to -Shape.
  • New-EdgeAttributeSet: added -Weight, -MinLen, -Tooltip, -URL/-Href, -XLabel.
  • Docs updated throughout (docs/graphviz.md, Command-Graph.md, Command-Export-PSGraph.md, both existing attribute-set command pages, and a new Command-New-GraphAttributeSet.md wired into mkdocs.yml).
  • CHANGELOG.md + manifest ReleaseNotes updated; ModuleVersion bumped to 3.2.0 (additive/non-breaking).

Test plan

  • Full Pester suite green: 463/463 (up from the 401 baseline), including the PSScriptAnalyzer sweep and comment-based-help completeness check for the new command.
  • Live-rendered every new -OutputFormat value through the real dot executable via -PassThru and confirmed non-empty output (eps, xdot, dot_json, canon, svg_inline, json0, plain-ext).
  • Rendered real SVG files through both osage and patchwork.
  • Confirmed -Strict actually merges a duplicate edge: two edge a b calls render as a single edge element in the rendered SVG (count verified directly).
  • Rendered real PNGs for the gradient-node, colorscheme, and New-GraphAttributeSet -RankDir LR doc examples, not just checked the emitted DOT text.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JkdNkQkbr85iif33Q964JX

exactmike and others added 3 commits August 30, 2026 22:39
Reviews graphviz.org's documentation/attribute reference/CHANGELOG
against PSGraph's current surface and closes the convenience/
discoverability gaps that turned up, reusing the module's existing
attribute-set-builder pattern rather than adding new machinery:

- Export-PSGraph -OutputFormat: widened from 10 to 26 accepted formats
  (svgz, svg_inline, eps, ps, ps2, xdot, dot_json, xdot_json, json0,
  canon, gv, fig, bmp, tif/tiff, wbmp, pic, plain-ext) - the old
  ValidateSet rejected several valid `dot -T` values outright.
- Export-PSGraph -LayoutEngine: added osage and patchwork, the two
  Graphviz layout engines that were previously unreachable.
- Graph -Strict: emits 'strict digraph'/'strict graph' to merge
  duplicate edges.
- New-GraphAttributeSet (alias GraphAttributes): a new graph/cluster-
  level attribute-set builder mirroring New-NodeAttributeSet/
  New-EdgeAttributeSet - rankdir previously had no dedicated parameter
  anywhere in the module.
- New-NodeAttributeSet: added -Peripheries, -GradientAngle, -Tooltip,
  -URL/-Href, -XLabel, -ColorScheme; added 'radial' to -Style and
  'record'/'Mrecord' to -Shape.
- New-EdgeAttributeSet: added -Weight, -MinLen, -Tooltip, -URL/-Href,
  -XLabel.

All additions verified by actually rendering through `dot` (new output
formats, osage/patchwork layouts, -Strict edge merging, gradient/
colorscheme/rankdir examples), not just eyeballed. Full suite green:
463/463 (up from the 401 baseline), including PSScriptAnalyzer and
comment-based-help compliance for the new command.

ModuleVersion bumped to 3.2.0 (additive/non-breaking).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkdNkQkbr85iif33Q964JX
Missed when Phase 8 added the command - the readme's attribute-set
section listed only the original two builders.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkdNkQkbr85iif33Q964JX
Same omission as the readme - the conceptual help topic's COMMANDS
section listed only the original two attribute-set builders.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkdNkQkbr85iif33Q964JX
@exactmike
exactmike merged commit 8d5a9f7 into master Aug 31, 2026
6 checks passed
@exactmike
exactmike deleted the phase8/graphviz-coverage-expansion branch August 31, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant