Skip to content

Phase 3: Graphviz coverage & PowerShell integration - #3

Merged
exactmike merged 2 commits into
masterfrom
phase3/graphviz-coverage-integration
Aug 29, 2026
Merged

Phase 3: Graphviz coverage & PowerShell integration#3
exactmike merged 2 commits into
masterfrom
phase3/graphviz-coverage-integration

Conversation

@exactmike

Copy link
Copy Markdown
Collaborator

Summary

Closes the Phase 3 feature gaps from plans/modernization-roadmap.md in the local_PSGraph planning repo, now that the module builds cleanly on PS7 with real CI (Phases 1 and 2, PRs #1/#2).

Deliberately out of scope (per the roadmap's own "don't merge wholesale" note on PR KevinMarquette#105): Cells.ps1, the svg all-in-one wrapper/aliases, and PR KevinMarquette#105's unrelated Edge/Node/Record convenience-parameter additions. Also deferred: approved-verb aliases for the DSL keywords — no issue-tracker ask backs specific verb names yet (see decision note in the planning repo).

Test plan

  • Full Pester suite (Tests/, untagged) passes locally with GraphViz on PATH — 367/367
  • New/changed public surface has matching test coverage (New-NodeAttributeSet.Tests.ps1, New-EdgeAttributeSet.Tests.ps1, extended Rank/Row/Export-PSGraph/Install-GraphViz/Record/PrivateFunctions tests)
  • Manually verified: graph g { edge hello world } | Export-PSGraph -OutputFormat svg -PassThru returns valid SVG text with zero files written to disk
  • CI green on ubuntu/windows/macos (will confirm once the PR's checks run)

🤖 Generated with Claude Code

https://claude.ai/code/session_014u9G91TefcQ42MAGvWrrqK

exactmike and others added 2 commits August 29, 2026 09:50
Closes the feature gaps identified for Phase 3 of the modernization
roadmap, now that the module builds cleanly on PS7 with real CI:

- Export-PSGraph: add -PassThru to return rendered graph text (e.g. SVG)
  directly via the pipeline instead of writing a file, for notebook
  workflows (Jupyter/.NET Interactive). Ported from upstream PR KevinMarquette#105's
  intent with a safer explicit-switch design instead of the original's
  empty-string-DestinationPath sentinel.
- New-NodeAttributeSet / New-EdgeAttributeSet: ported from PR KevinMarquette#105,
  fixing upstream bugs (.ToLower() called on non-string parameter types,
  a stray malformed array entry that silently dropped -Distortion).
- Rank: add -RankType (issue KevinMarquette#101) for min/source/max/sink grouping,
  not just rank=same.
- Row: add -Attributes for row-level HTML attributes (issue KevinMarquette#64, e.g.
  hiding a row's border), and fix Format-Value's record-port regex to
  recognize and quote GUID-style port names instead of silently
  swallowing them (issue KevinMarquette#65).
- Install-GraphViz: add -Scope CurrentUser for non-admin installs, with
  a nuget.org fallback when Chocolatey registration fails (PR KevinMarquette#112).
  Also fixed $IsOSX (not a real PowerShell variable) to $IsMacOS, and
  added the -Scope CurrentUser install path to Export-PSGraph's default
  GraphVizPath search list.
- PSGraph.psm1's dev-mode loader was exporting functions only, silently
  dropping every module alias (including the pre-existing 'digraph');
  fixed so NodeAttributes/EdgeAttributes (and digraph) actually resolve
  after Import-Module, matching the manifest's AliasesToExport.

Deliberately left out of this PR (see local_PSGraph/pull-requests/pr-105
and local_PSGraph/checklists/phase3-approved-verb-aliases.md): PR KevinMarquette#105's
Cells.ps1/svg.ps1 wrapper and Edge/Node/Record convenience-parameter
changes, and approved-verb aliases for the DSL keywords - neither has a
concrete ask in the issue tracker backing it yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014u9G91TefcQ42MAGvWrrqK
Tests/Project.Tests.ps1's unfiltered Invoke-ScriptAnalyzer run (every
registered rule, no settings/exclusions) threw a NullReferenceException
analyzing PSGraph.psm1 on windows-latest only - the module install step
never pinned or explicitly re-imported PSScriptAnalyzer (unlike Pester,
which already does both after Phase 2's version-ambiguity fix), so CI
could pick up a different/mismatched version than what was verified
locally. Pin to 1.25.0 and explicitly import it in the same place Pester
already is, mirroring that precedent.

Also swapped Export-ModuleMember's `-Alias *` for an explicit list
matching the manifest's AliasesToExport - more precise regardless, and
removes any dependence on how a given ScriptAnalyzer version resolves a
wildcard alias export.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014u9G91TefcQ42MAGvWrrqK
@exactmike
exactmike merged commit 5a120a0 into master Aug 29, 2026
3 checks passed
@exactmike
exactmike deleted the phase3/graphviz-coverage-integration branch August 29, 2026 19:04
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