Repository navigation
feat(view): recognise every Egeria graph key; show action and activity graphs beside the context graph - #573
Merged
Conversation
…follow mermaidGraph From Egeria 6.2.29 mermaidGraph leaves out relationships whose purpose is Action or Activity; actionMermaidGraph and activityMermaidGraph show them. - is_mermaid_graph_key(): a key ending in MermaidGraph, MermaidMindMap, MermaidPieChart or LineageGraph is a Mermaid graph, so a new kind of graph needs no code change (covers the 9 keys pyegeria did not name). Used for REPORT/MERMAID detection and populate_common_columns (which fills a generic key only when the element carries it). - Wherever a report offers the context graph (mermaidGraph or the 'mermaid' column), the action and activity graphs the element carries follow it in MERMAID, REPORT/HTML and DICT; not in TABLE/LIST/MD/FORM; never repeated when the spec selects one. Asset-Graph MERMAID now also shows the action graph. - Output is byte-identical when neither key is present: 674 renders (every spec x declared format) hash-equal to upstream; seed unchanged. - Tests use recorded responses (zone pie charts, lineage graph, asset graph); keys the platform does not return yet are added to copies. - Docs and the 6.2.29 release note. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…te fix
Owner decision on the Architect's P2 ("Key on every row"): in a DICT
result of several rows, when any row carries a companion graph (Action or
Activity Mermaid Graph), every row gets that key right after its context
graph, "" where the element has none, so table renderers (Portal Run
panel, Trellis tiles) see one row shape. A single row, or rows none of
which carries a companion, are unchanged (674-render check still
byte-identical; seed current). DICT is the only row builder that adds
companions (TABLE adds none).
Tests: mixed rows share one shape and key order; only companions some row
carries are added; no companion means no key; a single row is unchanged.
Release note and docs: say plainly that output changes today, because
Egeria already returns actionMermaidGraph (e.g. Asset-Graph's MERMAID now
has two blocks).
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
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.
Egeria graph keys: a generic Mermaid rule, and the action and activity graphs follow the context graph (6.2.29)
Branch
feat/mermaid-graph-keysat b872720, based on upstream/main 8d5bd55 (#572). Two signed commits:400b3c61: the generic rule and the companion graphs.b8727207: the owner's "key on every row" for DICT, and the release-note fix (both from the Architect's read-back of 400b3c6).Why
From Egeria 6.2.29 the context graph,
mermaidGraph, leaves out relationships whose purpose is Action or Activity. Two graphs show them instead:actionMermaidGraphandactivityMermaidGraph. Egeria returns 25 graph keys in all, and pyegeria did not name 9 of them,activityMermaidGraphamong them. So without this change those relationships would vanish from every report that showsmermaidGraph.What changes
is_mermaid_graph_key,pyegeria/view/output_formatter.py).MermaidGraph,MermaidMindMap,MermaidPieChartorLineageGraphis a Mermaid graph; the ending's case is ignored.LineageGraphcoversfieldLevelLineageGraphandlocalLineageGraph, which carry no "Mermaid"._is_mermaid_attribute(REPORT/MERMAID rendering) and bypopulate_common_columns. The latter fills a generic graph column only when the element carries it, so a column the element lacks keeps the value it had before....BarGraph,...PieGraph) are not matched, and are checked first anyway. I checked every spec column: none changes classification.MERMAID_ATTRIBUTE_KEYSstays, plusactivityMermaidGraph. The_globals.MERMAID_GRAPHSandMERMAID_GRAPH_TITLESlists are unchanged (exported; the rule does not depend on them).MERMAID_COMPANION_GRAPHS,_companion_mermaid_columns). Wherever a report offers the context graph (a column keyedmermaidGraph, or themermaidcolumn filled from it), each companion the element carries follows it:extract_mermaid_only): one more Mermaid block each;### Action Mermaid Graph/### Activity Mermaid Graphsections right after the context graph;Action Mermaid Graph/Activity Mermaid Graphentries right after the context graph's entry. Key on every row (owner's decision): in a result of several rows, if any row carries a companion, every row gets that key, after its context graph,""where the element has none, so table renderers (the Portal Run panel, Trellis tiles) see one row shape. A single row, or rows none of which carries a companion, are unchanged. DICT is the only row builder that adds companions;Asset-Graph's REPORT shows its ownAction Graphonce.actionMermaidGraph(for Assets, for example): a report that offers the context graph now also shows the action and activity graphs when Egeria returns them. For example,Asset-GraphMERMAID now shows the asset's action graph after its context graph (2 blocks live, for an asset with one).test_asset_graph_spec.pyis updated for this.iscImplementationMermaidGraph, and_get_mermaid_graph_valuestill reads the pre-6.3iscimplementationMermaidGraphcase-insensitively. That existing test still passes. Nothing else in pyegeria, md_processing or the seed uses the lower-case form.governanceActionProcessMermaidGraphis real: it comes fromGovernanceActionProcessGraphin Egeria's open-governance-framework (setGovernanceActionProcessMermaidGraph). It is just missing from the 25-key list. Untouched.docs/output-formats-and-report-specs.mdexplains the rule, the companions and key on every row, and its key table gains the missing keys. The 6.2.29 release note has two new bullets. The first leads with "a report that offers the context graph (mermaidGraph) now also shows the action and activity graphs when Egeria returns them", and says this changes output today.Byte-identical where neither companion graph is present
This holds only for elements without
actionMermaidGraphandactivityMermaidGraph. Where Egeria already returnsactionMermaidGraph, output changes, as intended.python -m pyegeria.view.seed checkreports the seed is current. A freshseed buildis identical to the packaged seed (diff -r). Census 437 = 376 runnable / 0 unrunnable / 61 format-only. No spec declaration changed.generate_outputandextract_mermaid_only, on upstream and on this branch. Two recorded elements withoutactionMermaidGraph/activityMermaidGraphwere used: the Asset-Graph response minus its action graph, and a header+properties+mermaidGraphelement. All 674 sha256 hashes match. The preamble's minute timestamp andconstruct_mermaid_web's random id were masked; both were already nondeterministic.Tests
tests/micro-tests/test_mermaid_graph_keys.py, new, uses recorded responses:data/graph_keys_responses.json(new; a GovernanceZone and an asset lineage graph from qs-view-server, read only) and the existingdata/asset_graph_by_guid_response.json. It checks:activityMermaidGraph,collectionMermaidMindMap,zoneProfileAnchoredMermaidPieChart, the two user-account pie charts,fieldLevelLineageGraphandlocalLineageGraph;populate_common_columnsfills a generic key only when present;""where absent;The 674-render check and
seed checkwere re-run after commit 2: still byte-identical, and the seed is current.Live (read only, page_size ≤ 5)
mermaidGraphandanchorMermaidGraph;actionMermaidGraph, on 2 of 5 asset graphs;edgeMermaidGraphandfullLineageMermaidGraph, from asset lineage graphs;zoneProfileMermaidPieChartandzoneProfileAllMermaidPieChart, from GovernanceZones.activityMermaidGraph,collectionMermaidMindMap,zoneProfileAnchoredMermaidPieChart,userAccountTypeProfileMermaidPieChart,userAccountStatusProfileMermaidPieChart,fieldLevelLineageGraphandlocalLineageGraph. So the platform has not shipped the split yet. ASecretsCollectionfind returned a server 500 (read; nothing written).Asset-GraphMERMAID gives 2 blocks (context, then action).Suite
Full micro-suite on Python 3.13 (
uv run -p 3.13 pytest tests/micro-tests/, JUnit): 2668 tests, 0 failures, 0 errors, 3 skipped (run 18:10Z, at b872720). After commit 1: 2664/0/0/3.Not in this PR
Review
🤖 Generated with Claude Code