Skip to content

My Profile bookmarks, developer guide, and get_my_resources fix - #413

Merged
dwolfson merged 1 commit into
odpi:mainfrom
pcoldico:my-profile-bookmarks-dev-guide
Oct 2, 2026
Merged

dwolfson merged 1 commit into
odpi:mainfrom
pcoldico:my-profile-bookmarks-dev-guide

Conversation

@pcoldico

@pcoldico pcoldico commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

My Profile app: bookmarks

  • GUID pick-up: Ctrl+B on the main screen and on the Shop for Data screen now fills in the bookmark GUID from the highlighted DataTable row.
    • A new helper, get_row_guid, reads any column whose heading ends in "GUID".
    • Tables with no GUID column, such as the glossary table, have the GUID looked up from the row's Qualified Name.
  • Storage: bookmarks are now members of a private collection for each user, Bookmarks::<user id>.
    • The collection is created the first time the user adds a bookmark.
    • It is anchored to the user's profile and linked from it by a ResourceList relationship with resourceUse "Bookmarks".
    • This replaces calls to add_asset_to_favorites and remove_asset_from_favorites, which don't exist in pyegeria, so adding or deleting a bookmark crashed the app with an AttributeError. The bookmark list also used to come from a placeholder find_locations search.
  • MyBookMarksScreen fixes:
    • Existing bookmarks now appear in its table.
    • Ctrl+R fills in the highlighted bookmark's GUID.
    • The Quit buttons work.
    • Two button handlers no longer share a method name. The clash disabled "Add New Bookmark" and made delete call add.

pyegeria: MyProfile.get_my_resources (ISSUE-115)

  • Every call failed with OMAG-COMMON-400-018. The method's display hint, "Resource", was being sent to Egeria as metadataElementTypeName, and Egeria has no such type.
  • The fix passes filter_results_by_type=False, which matches the .http ground truth and the existing get_collection_members fix.
  • A new micro-test captures the outgoing request body, so it runs without a server.

Docs

  • New docs/developer_guide_pyegeria_textual.md: a developer guide for Python programmers new to Egeria and Textual. It covers:

    • setting up a live Egeria with the egeria-workspaces quick start
    • pyegeria and Textual basics
    • a My Profile case study
    • Dr. Egeria and hey_egeria as other styles of program
    • testing and debugging

    Each section that summarises another guide links to it as the source: Egeria, pyegeria and Textual.

  • Examples: three runnable, step-by-step programs and a headless screenshot generator in examples/developer_guide/. The screenshots are in docs/images/developer-guide/.

  • Manual: the My Profile manual has a new Bookmarks section and the new keyboard shortcuts.

Test plan

  • Headless end-to-end run of My Profile against the Egeria quick start: bookmark a glossary from Shop for Data, add the same one again (warning), see it listed, delete it with the GUID filled in from the highlighted row, and use both Quit buttons.
  • Collection created on the first bookmark and linked to the profile, confirmed with get_attached_collections.
  • get_my_resources checked live in JSON, DICT and LIST output formats. The new micro-test fails without the fix and passes with it.
  • Developer guide examples run against the quick start; the guide's test snippet passes; all relative links resolve.
  • tests/micro-tests/my_profile/ results are unchanged from before these changes.

🤖 Generated with Claude Code

@pcoldico
pcoldico requested a review from dwolfson as a code owner October 2, 2026 15:19
@pcoldico
pcoldico force-pushed the my-profile-bookmarks-dev-guide branch from 325179c to b4c35fd Compare October 2, 2026 15:21
My Profile app (my_egeria/my_egeria/DemoCode/My_Profile):
- Ctrl+B on the main screen and the Shop for Data screen now pre-fills
  the bookmark GUID from the highlighted DataTable row. A new
  get_row_guid helper reads any column whose heading ends in "GUID",
  and falls back to resolving the row's Qualified Name for tables with
  no GUID column (e.g. the glossary table).
- Bookmarks are now stored as members of a private per-user collection,
  Bookmarks::<user id>, created on first use, anchored to the user's
  profile and linked to it by a ResourceList relationship (resourceUse
  "Bookmarks"). This replaces calls to add_asset_to_favorites /
  remove_asset_from_favorites, which don't exist in pyegeria, and a
  placeholder find_locations listing.
- MyBookMarksScreen: existing bookmarks now display in its table,
  Ctrl+R pre-fills the highlighted bookmark's GUID, the Quit buttons
  work, and two button handlers no longer share a name (the clash had
  disabled "Add New Bookmark" and made delete call add).

pyegeria:
- MyProfile.get_my_resources always failed with OMAG-COMMON-400-018
  because its rendering hint "Resource" was sent as
  metadataElementTypeName. Pass filter_results_by_type=False, matching
  the .http ground truth. Logged as ISSUE-115, with a micro-test that
  captures the outgoing request body.

Docs:
- New docs/developer_guide_pyegeria_textual.md for Python programmers
  new to Egeria and Textual: egeria-workspaces quick-start setup,
  pyegeria and Textual essentials, a My Profile case study, Dr. Egeria
  and hey_egeria as further examples, testing and debugging, with
  attributed references to the Egeria, pyegeria and Textual guides.
- Runnable step-by-step examples and a headless screenshot generator
  in examples/developer_guide/; screenshots in
  docs/images/developer-guide/.
- My Profile manual gains a Bookmarks section and shortcuts.

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
@dwolfson
dwolfson merged commit b85b20c into odpi:main Oct 2, 2026
5 checks passed
pcoldico added a commit to pcoldico/egeria-python that referenced this pull request Oct 2, 2026
Rebased onto main after odpi#413 (which added its own bookmarks implementation),
reconciling the two:
- Bookmarks keep odpi#412's structure (BookmarksMixin in bookmarks_handler.py,
  Ctrl+K / 'k' to bookmark the highlighted row, in-place reload, 'd' to
  remove) and its tests, with odpi#413's storage: the collection is
  Bookmarks::<user id>, anchored to the user's profile and linked from it
  by a ResourceList relationship (resourceUse "Bookmarks"), so
  MyProfile.get_my_resources() finds it and existing odpi#413 bookmarks are
  kept. Adding an existing bookmark now warns instead of duplicating it.
- Ctrl+B (main and Shop for Data) still opens the bookmarks screen with the
  highlighted row's GUID pre-filled; get_row_guid moves into the mixin and
  uses row_identity.
- odpi#413's bookmark methods in my_profile_app.py are removed in favour of the
  mixin. The manual keeps odpi#412's rewrite, with the bookmarks section updated;
  the developer guide's bookmarks passages and screenshots are updated to
  match.

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
dwolfson pushed a commit that referenced this pull request Oct 2, 2026
Rebased onto main after #413 (which added its own bookmarks implementation),
reconciling the two:
- Bookmarks keep #412's structure (BookmarksMixin in bookmarks_handler.py,
  Ctrl+K / 'k' to bookmark the highlighted row, in-place reload, 'd' to
  remove) and its tests, with #413's storage: the collection is
  Bookmarks::<user id>, anchored to the user's profile and linked from it
  by a ResourceList relationship (resourceUse "Bookmarks"), so
  MyProfile.get_my_resources() finds it and existing #413 bookmarks are
  kept. Adding an existing bookmark now warns instead of duplicating it.
- Ctrl+B (main and Shop for Data) still opens the bookmarks screen with the
  highlighted row's GUID pre-filled; get_row_guid moves into the mixin and
  uses row_identity.
- #413's bookmark methods in my_profile_app.py are removed in favour of the
  mixin. The manual keeps #412's rewrite, with the bookmarks section updated;
  the developer guide's bookmarks passages and screenshots are updated to
  match.

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
@pcoldico
pcoldico deleted the my-profile-bookmarks-dev-guide branch October 5, 2026 22:28
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.

2 participants