Repository navigation
feat(dashboards): read dashboard sheets from Egeria (RS-DASH PR-2) - #571
Merged
Merged
Conversation
… (RS-DASH PR-1) Create Dashboard Sheet, Link Report to Dashboard Sheet and Add Text on Dashboard Sheet keep their names and syntax and now write the pipeline note v5.5 §8d chain: Dashboard -Schema-> DisplayDataSchemaType -AttributeForSchema-> DisplayDataContainer -NestedSchemaAttribute(position)-> one DisplayDataField per placement, with DataSetContent (queryId = the placement's qualifiedName), ScopedBy to Trellis Perspectives (DB-2) and DataDescription to the drill-down ReportSpec. Upsert by qualifiedName; a re-run writes nothing. Removing a placement or deleting a sheet never deletes a Report or ReportSpec. DB-1: every command also writes the local JSON store; --local-only (or PYEGERIA_DASHBOARD_SHEETS_LOCAL_ONLY) or an unreachable Egeria writes the store alone and says so. Create Report writes one reportParameters document (author-written values only), the typed outputFormat, and ReportTypeInstance from the spec element found under ReportSpec:: or ReportType::, with a note when the spec has no element. additionalProperties keys are kept for one release. The Dashboard asset write is shared (upsert_dashboard_asset) by Create Dashboard and Create Dashboard Sheet. DashboardSheetEgeriaWriter is the one Egeria implementation, for the processors and for migration. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A live dry run found two real Reports ('Term Definition Completeness',
'Governance Classification Coverage') that __async_get_guid__ cannot
resolve: its unique-name lookup is rejected when another element type
shares the display name. The writer now finds the one Report whose
displayName matches exactly (the Portal's own lookup), else by
qualifiedName; two same-named Reports give a note and no link.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The contains-search took ~35 s per placement on the live platform; the exact by-property-value lookup filtered to type Report takes 0.1 s. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…H PR-2) load_dashboard_sheet(name) and list_dashboard_sheets() walk the Egeria 6.3 chain (Dashboard -> DisplayDataSchemaType -> DisplayDataContainer -> DisplayDataField placements) with the PR-1 writer's own primitives and return today's DashboardSheet / Placement model (EgeriaDashboardSheet / EgeriaPlacement subclasses add source, kind, note, breaks). Placement.ref is the linked Report's display name, through DataSetContent by queryId. Absence in words: a report placement whose DataSetContent is gone reads kind "missing", "report link missing in Egeria"; a sheet with a broken chain is listed with the break named, not dropped. dashboard_sheet_registry gains an EGERIA tier below the local sources; a local sheet overrides a same-named Egeria sheet with one warning. python -m pyegeria.view.dashboards list|show|migrate|delete: migrate writes from the JSON store through the PR-1 writer (idempotent, --dry-run lists every write, --rename for a scratch copy) and never writes the store. Gate: round trip of the five live sheets (fixture copied read-only 2026-11-09) gives equal models. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
migrate classifies each Dashboard with Ownership (owner = the signed-in user, or --owner), once; no zone is set, so the sheet is shared in the default zone. The dry run lists the classification. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The library rule (test_async_runner) forbids asyncio.run outside a __main__ block, since it fails inside a running loop. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…rt lookup) - A placement added after a removal never reuses a taken position: an explicit migrate index that is already taken falls back to max+1. - A sheet with two placements of one name is refused before any write (they would collapse into one); a report and a text placement cannot share a name, in Egeria or the store. - Link Report to Dashboard Sheet resolves Report Name with the exact Report-typed lookup first, so a Report whose name another element type shares no longer fails validation. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A placement's stored perspective labels and drill-down name are what the author wrote; ScopedBy and DataDescription carry the graph meaning. The reader now reads both and adds a note where they disagree (a link edited in Egeria directly), instead of returning the stored labels silently. A stored drill-down with no link is not drift: a spec held only in pyegeria has no element. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A re-run's action list now names the Schema, AttributeForSchema and NestedSchemaAttribute links it found in place, so its "unchanged" count matches the first run's change count (live step (a): 9 and 9, not 9 and 6). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson
marked this pull request as ready for review
November 9, 2026 16:36
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # tests/micro-tests/dashboard_fake_egeria.py
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.
Read dashboard sheets held in Egeria; migrate CLI (RS-DASH PR-2)
Branch
dwolfson:feat/dashboards-in-egeria-reader, stacked on PR-1 (feat/dashboards-in-egeria-writes, through2b4c716). Three commits of its own:
run_sync.Merge PR-1 first.
What changes
pyegeria/view/dashboards.py(new).load_dashboard_sheet(name)andlist_dashboard_sheets()walk the Egeria chain, using the same primitives thatPR-1's writer writes it with, so the two cannot disagree about its shape. Async forms:
async_load_dashboard_sheet(client, name)andasync_list_dashboard_sheets(client).DashboardSheet/Placementmodel, as the subclassesEgeriaDashboardSheet/EgeriaPlacement, so every consumer keeps its code. The subclasses add only:source(egeria);kind(report/text/missing) andnote;breaksandguid.as_local_model()drops those fields, and the result compares equal to the JSON record.Placement.reffor a report placement is the linkedReport's display name, found through DataSetContent byqueryId(oneget_placement_reportscall per sheet).Absence in words.
kind: "missing", note "report linkmissing in Egeria", and
refis the placement's name, so it can still be shown.Create DashboardDashboard.Every read is bounded. Page size 25,
graph_query_depth=0, paged until an empty page.list_dashboard_sheetsreads typeDashboardin pages of 25 and filtersDashboard::. Live, that took 1.1 s.A starts-with qualifiedName search took 21 s with no Dashboards at all.
dashboard_sheet_registrygains an EGERIA tier below the local sources, with the same precedence as specs.It never raises.
refresh_egeria_dashboard_sheets(client)orset_egeria_dashboard_sheets(…).Reading the registry makes no Egeria call.
get_dashboard_sheet_tier(name)says where a sheet came from.CLI.
python -m pyegeria.view.dashboards list | show NAME | migrate | delete.migrate [--sheet NAME] [--rename NEW] [--store PATH] [--owner USER] [--dry-run]--dry-runlists every element and link it would write, plus the notes.--renamewrites a scratch copy, for the live test (a).delete --sheet NAME [--dry-run] [--local]removes the Egeria chain and never touches Reports.--localalsoremoves the store record.
DB-3.
Ownershipclassification (owner = the signed-in user, or--owner). It is leftalone if one is already there.
Gate 2: the round trip, on fakes
tests/micro-tests/test_dashboards_reader.pyholds the five live sheets, copied read-only from the Portal containeron 2026-11-09 to
tests/micro-tests/data/dashboard_sheets_live_2026_11_09.json. That is 40 placements: 30 reportand 10 text. The text is demo content, about the fictional Coco Pharmaceuticals.
DashboardSheetis equal (as_local_model(loaded) == DashboardSheet(**json)). That covers order, span, style, perspectives, text (including a mermaid fence),drill-down names and refs.
list_dashboard_sheetsreturns all five, and a secondmigratewrites nothing. Counts: 5 Dashboards,40 fields, 30 DataSetContent.
--renamescratch copy, Ownership set once, andthe registry precedence with a single warning.
Full micro-suite, Python 3.13: 2540 tests, 0 failures, 0 errors, 3 skipped at 54e91b4 (JUnit:
junit-dashboards-pr2-54e91b42.xml). An earlier run at 4da6072 had 1 failure:test_async_runnercaught anasyncio.runin the CLI. It was fixed in 54e91b4.Live dry run (read only, 2026-11-09, 8 s)
migrate --dry-runagainst the platform, over a copy of the live store:resolves) and 19 ScopedBy.
Governance-Metric-DrE-Basic,Digital-Products,Information-Supply-Chain-DrE-Basic). Their names are kept on the placement.The writes themselves are the Coordinator's: (a), then (b), with their undo, in
DASHBOARDS-LIVE-WRITES-2026-11-09.md.Not in this PR
Signed-off-by: Dan Wolfson dan.wolfson@pdr-associates.com
🤖 Generated with Claude Code