Skip to content

pyegeria 6.2.31: Dashboard Sheets held in Egeria with an owner; grounding counts distinct Assets - #578

Merged
dwolfson merged 7 commits into
odpi:mainfrom
dwolfson:docs/dashboard-sheet-wording
Nov 10, 2026
Merged

dwolfson merged 7 commits into
odpi:mainfrom
dwolfson:docs/dashboard-sheet-wording

Conversation

@dwolfson

Copy link
Copy Markdown
Member

pyegeria 6.2.31 makes three changes:

  • Dashboard Sheets: the commands say the sheet is held in Egeria, and Create Dashboard Sheet now sets the Dashboard's owner.
  • The Overview's semantic grounding counts distinct Assets.
  • The Governance Coverage demo spec says what it counts.

This PR also bumps the version to 6.2.31. The release note is docs/release-notes/6.2.31.md.

Dr.Egeria: Dashboard Sheets

  • The commands say where a sheet lives. Create Dashboard Sheet, Link Report to Dashboard Sheet and Add Text on Dashboard Sheet, with the Dashboard Sheet Name and MD Content attributes, called a sheet a "local pyegeria-managed record". Since 6.2.29 a sheet is held in Egeria:

    • a Dashboard;
    • a DisplayDataSchemaType;
    • the sheet's DisplayDataContainer;
    • one DisplayDataField per placement.

    The local JSON store is a fallback, used for --local-only or when there is no Egeria connection. The specs were edited through the Spec Editor API, and the 6 templates (basic and advanced) were regenerated. Create and Link previously had no description at all.

  • Create Dashboard Sheet sets the Dashboard's owner, as migrate does (DB-3).

    • Who owns it: an Ownership classification on the Dashboard names the user the command runs as (in the Portal, by default, its service user), or the userId given in the new Advanced attribute Dashboard Owner.
    • Set once: a Dashboard that already has an owner keeps it, a re-run writes nothing, and a different requested owner gets a note.
    • Local-only: nothing is set, and the output says "Ownership: not written (local only)".
    • One implementation: migrate's code moves to DashboardSheetEgeriaWriter.ensure_ownership, which both paths use.
    • No report column: dashboard_owner is kept out of the generated report columns, because the owner is held in the classification, not in a property.

Overview metrics

  • Semantic grounding counts distinct Assets. It used to divide all SemanticAssignment links by the Asset total, so one Asset with three terms counted three times. On the quickstart, no link lands directly on an Asset: terms sit on Assets' columns.
    • What counts: an Asset counts when a term is on the Asset itself or on any element anchored to it (schema, tables, columns). The owner's definition: "Columns but could also be table or file if something like csv".

    • How it is read: each end's Asset comes from the anchor the relationship end carries (anchor.classificationProperties.anchorDomainName == "Asset" → anchorGUID), with no extra reads. A deleted (memento) end counts for nothing.

    • New fields:

      Field Meaning
      groundedAssets Distinct grounded Assets
      groundedAssetTotal The Asset total, counted in the scan's own (viewer) population
      groundedAssetPct groundedAssets as a share of that total; None when the total cannot be measured, never mixing populations
      groundedAssetNote Why the share is empty
      groundingLinksScanned The links the caller can see
      groundingLinksNotOnAsset Links that ground no Asset
    • Unchanged: groundingLinks and groundingPct (native, repository).

    • Live result (read-only): 747 links scanned, 607 not on an Asset, 140 grounding links on 41 distinct Assets. The share stays None for now, because the viewer Asset count times out at this catalogue size.

  • "Analytic Demo - Governance Coverage" says what it counts. The spec and the governed_coverage registry entry said "share of assets". The function counts elements of any type the caller can see, not a share of Assets, so it differs by definition from the Overview's Governed tile (Assets only, native, repository-wide). The label and heading are unchanged.

Tests

  • Dashboard Sheets (Ownership):
    • set once, and a re-run writes nothing;
    • explicit owner;
    • an owned Dashboard keeps its owner;
    • no known user;
    • local-only;
    • the attribute's wording.
  • Grounding:
    • distinct Assets, not links;
    • an Asset and its columns count once;
    • memento and non-Asset ends are excluded and counted;
    • the share is None with a note when the viewer total is not measured;
    • a fixture of two real relationship ends read live (tests/micro-tests/data/semantic_assignment_live_ends_2026_11_11.json).
  • Wording: the spec and registry text.
  • Full micro-suite on Python 3.13: 2717 tests, 0 failures, 0 errors, 3 skipped.
  • Wheel, checked in a clean venv: my_egeria/ is top-level, serve_my_profile is installed, and pyegeria 6.2.31 imports.

The matching egeria-workspaces template mirror is dwolfson/egeria-workspaces branch docs/dashboard-sheet-wording-templates (7d81a8df). It deploys after this release.

🤖 Generated with Claude Code

…eria

The compact specs still described a Dashboard Sheet as a "local
pyegeria-managed record" planned to become an Egeria element. Since 6.2.29 a
sheet is held in Egeria as a Dashboard with a DisplayDataSchemaType, the
sheet's DisplayDataContainer and one DisplayDataField per placement. The local
JSON store is a fallback, written alone with --local-only or when there is no
Egeria connection.

Edited through the Spec Editor API (commands_report_compact):
- descriptions: Create Dashboard Sheet and Link Report to Dashboard Sheet (both
  were empty), Add Text on Dashboard Sheet, and the Dashboard Sheet Name and MD
  Content attributes;
- Journal Entries: the three commands, plus a dated note on Dashboard Sheet
  Name.

refresh_specs regenerated the 6 Dashboard Sheet templates (basic and advanced).
Report specs and the seed are unchanged, and Zone Membership is unchanged.
Release note: docs/release-notes/6.2.31.md.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…s migrate does (DB-3)

Sheets migrated with `python -m pyegeria.view.dashboards migrate` get an
Ownership classification on their Dashboard. Sheets made with Create Dashboard
Sheet got none. Now they do.

- Owner: the signed-in user (client.user_id), or the userId given in the new
  Advanced attribute Dashboard Owner. This matches migrate's --owner.
- Set once: a Dashboard that already has an owner keeps it, and a re-run
  writes nothing. A different requested owner gets a note.
- One implementation: migrate's _ensure_ownership moves to
  DashboardSheetEgeriaWriter.ensure_ownership. migrate and the processor both
  call it, and dashboards._ensure_ownership delegates to it.
- Output: "Ownership: <owner>", or "unchanged (already owned)". With
  local-only or no Egeria connection, nothing is set and the output says
  "Ownership: not written (local only)".
- Spec Editor: the Dashboard Owner attribute is added to the Dashboard Sheet
  Base bundle. gen_report_specs excludes dashboard_owner from generated report
  columns, because the owner is held in the classification, not a property,
  so the column would always be empty. Only the Advanced Create Dashboard Sheet
  template changes; the report specs and seed are unchanged.

Tests:
- create sets Ownership once, and a re-run writes nothing;
- Dashboard Owner names another user;
- an owned Dashboard keeps its owner, with a note;
- with no known user, no Ownership is set;
- local-only (env and no client) sets nothing and says so.
migrate's own ownership tests pass unchanged.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…s as

Architect P2 on bc29d83. The default owner is client.user_id, the user
Dr.Egeria runs AS. In the Portal that is req.user_id or EGERIA_USER, by
default its service user, not the person signed in. The Dashboard Owner text
(Spec Editor API), the processor comment and the 6.2.31 release note now say
"the user the command runs as (in the Portal, by default, its service user)"
instead of "the signed-in user". The Advanced Create Dashboard Sheet template
is regenerated. A test checks the attribute text.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…verage says what it counts

Two definition fixes found by comparing the Overview tiles with the seed specs
(OVERVIEW-TILES-VS-SEED-SPECS-2026-11-10).

Semantic grounding. semantic_grounding divided all SemanticAssignment links by
the Asset total, so an Asset with three terms counted three times. New fields:
- groundedAssets: the distinct Assets with at least one SemanticAssignment,
  taken from a scan of every SemanticAssignment (ends typed Asset or an Asset
  subtype). Egeria cannot count distinct relationship ends natively.
- groundedAssetTotal: the Asset total counted in the scan's own (viewer)
  population, on its own thread while the scan pages.
- groundedAssetPct: groundedAssets as a share of groundedAssetTotal. It is
  None, with its reason recorded, when that total cannot be measured. Never a
  viewer count over a repository total.
groundingLinks and groundingPct are unchanged (native, repository; links per
hundred Assets). The registry declaration names each measure's population;
the count's basis is groundedAssetTotal. The demo spec text and the seed are
updated. The Portal Overview's Grounding tile reads groundedAssets and
groundedAssetPct.

Governance coverage. "Analytic Demo - Governance Coverage" and the
governed_coverage registry entry said "share of assets". They now say it
counts elements of any type that the caller can see, which is not a share of
Assets. The Overview's Governed tile (Assets only, native, repository-wide)
differs by definition. The label and heading are unchanged, because a live
dashboard sheet refers to that heading.

Tests: distinct Assets, not links (a non-Asset end is excluded); the share is
None when the viewer total is not measured, while the count still shows; the
updated contracts in four existing tests; and the spec and registry wording.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… of its parts

Architect HOLD on cade8f9: on live data, all 767 SemanticAssignment links
end on a TabularColumn or a SubscribingActionProcess, never directly on an
Asset, so groundedAssets was 0. The owner's definition is "Columns but could
also be table or file if something like csv".

An Asset now counts as grounded when a SemanticAssignment ends on the Asset
itself, or on any element anchored to it: its schema, tables, columns and so
on. The Asset for each end is read from the anchor the relationship end
carries (anchorDomainName "Asset", then anchorGUID), with no extra reads.
Live, all 144 sampled column ends carry it. Assets are counted by distinct
GUID, so an Asset and two of its columns count once. A deleted (memento) end
grounds nothing.

New fields:
- groundingLinksNotOnAsset: the scanned links that ground no Asset, such as a
  term on a process. They are shown, not silently dropped.
- groundedAssetNote: a plain sentence on why the share is empty: the scan
  failed or was incomplete, the viewer Asset total was not measured, or no
  Assets are visible.

The population (viewer), groundedAssets, groundedAssetTotal and
groundedAssetPct are unchanged. The registry declaration, the demo spec text
("on it or on any of its parts (tables, columns)"), the seed and the 6.2.31
release note are updated.

Tests:
- column-anchored links count their Asset once;
- the Asset itself plus two of its columns count once;
- memento and non-Asset-anchored ends are excluded and counted in
  groundingLinksNotOnAsset;
- the note appears when the viewer total is not measured;
- the existing contract tests are extended.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…sificationProperties

Architect live re-run of 4ebd942: groundedAssets was still 0 and
groundingLinksNotOnAsset 747. A relationship end's `anchor` is an
ElementClassification, so anchorGUID and anchorDomainName live under
anchor.classificationProperties, not at its top level. _grounded_asset_guid
now reads them from there (a bare dict is still accepted).

New field: groundingLinksScanned, the number of links the scan read (the ones
the caller can see). It can be below groundingLinks, the native repository
count (747 vs 767 live), by the links the caller cannot see. The docstring,
the registry declaration, the demo spec text and the 6.2.31 note say so.

Tests use the real shape:
- tests/micro-tests/data/semantic_assignment_live_ends_2026_11_11.json holds
  two SemanticAssignments read live (read-only, as erinoverview, page size
  25): a TabularColumn anchored to an Asset, and a SubscribingActionProcess
  anchored to a DigitalProduct (domain AuthoredReferenceable).
- The column grounds its Asset; the process grounds none.
- The column helper in the other tests now builds the nested
  ElementClassification too.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 720516d into odpi:main Nov 10, 2026
6 checks passed
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