Skip to content

My Profile: rename app to my_egeria.py, clearer Add-screen switches, remove deprecated code - #491

Merged
dwolfson merged 26 commits into
odpi:mainfrom
pcoldico:my-profile-strict-tests
Oct 26, 2026
Merged

dwolfson merged 26 commits into
odpi:mainfrom
pcoldico:my-profile-strict-tests

Conversation

@pcoldico

@pcoldico pcoldico commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Rename the My Profile app module my_profile_app.py → my_egeria.py, and update everything that pointed at it:
    • pyproject.toml my_profile entry point and my_egeria/serve.py (serve_my_profile) now use my_egeria.DemoCode.My_Profile.my_egeria
    • examples/developer_guide/capture_screenshots.py, the splash screen subtitle, READMEs and docs
    • User manual renamed docs/my_profile_app_manual.md → docs/my_egeria_manual.md; test file renamed test_my_profile_app.py → test_my_egeria.py; all links updated
  • Add screens: the "link to my profile" switch now has an explanatory label per element type (project, role, team, user identity) and is styled so it's visible and not clipped off the right edge.
  • Tidy up: remove the DemoCode/Deprecated/ and DemoCode/Experimental Code/ folders (~28,900 lines of unused code).

Note on the module name

The app module My_Profile/my_egeria.py has the same name as the my_egeria package. The package is editable-installed, and Python checks that kind of install only after the normal sys.path search. So once the My_Profile folder is on sys.path (every handler module adds it), a first import my_egeria finds the app file instead of the package. That broke test_my_egeria_serve.py when it ran in the same session as the My Profile tests. tests/micro-tests/my_profile/conftest.py now imports the package before adding the folder to the path. The normal launch paths (my_profile, python -m ..., serve_my_profile) are not affected.

Test plan

  • pytest tests/micro-tests/my_profile tests/micro-tests/test_my_egeria_serve.py: 531 passed, 1 skipped. Also run with the files in the opposite order, so the result doesn't depend on test order
  • The my_profile entry point and the serve.py module path both import correctly
  • Add-screen switches checked by hand in the running app

🤖 Generated with Claude Code

pcoldico and others added 25 commits October 16, 2026 07:49
Co-authored-by: Junie <junie@jetbrains.com>
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…w peers

- Load the user's profile and existing Peer relationships on mount
- Search actor profiles (case-insensitive) instead of user identities
- Add description input and a Link Peer button to create the relationship

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…, added custom report format for listing peers

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
… of the custome report format

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Merge the experimental my_network.py functionality into the My Profile
app as a "My Network" option: list the user's peers, search for people
and add them, view a peer's contact methods and communities, and remove
a peer (with confirmation) via unlink_peer_person.

- network_handler.py: NetworkMixin doing the Egeria calls
- MyNetworkScreen.py: network screen and remove-confirmation dialog
- my_network.py: add Remove from Network button with confirmation,
  hide stale details after removal
- my_profile_report_specs.json: fix invalid JSON, query the Peer
  relationship, and show the person's GUID
- tests for the mixin, screen and option routing

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
TechnologyTypesScreen dismisses quit/go back with the strings "200"/"201",
but tech_type_callback compared against the int 201. The back result was
then treated as a tech type name, get_tech_type_detail returned the string
"No elements found", and .get() on it raised AttributeError.

- match "200"/"201" as either str or int and return to the main screen
- if the tech type detail is not a dict, notify and return to the main
  screen instead of crashing
- stop after showing the error screen when the detail lookup fails
- use the Egeria client for get_tech_type_detail

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
- user manual: My Network section (view details, search and add,
  remove with confirmation), keyboard reference rows, intro mention
- reference guide: NetworkMixin section with sequence diagram and
  function table, plus source layout, class diagram, menu dispatch,
  report spec, client and testing updates

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Restore config/config.json and test_classification_manager.py to their
upstream versions. The config change pointed the report spec modules and
log directory at local absolute paths, and the test change was local
debugging of the Peer relationship query.

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
- go back/quit as "201"/"200" (str or int) returns to the main screen
  without looking up a tech type
- a string detail result such as "No elements found" notifies and
  returns to the main screen
- patch Egeria rather than AutomatedCuration, matching the handler, so
  the callback tests no longer try to reach the server
- a failed detail lookup now pushes only the StatusScreen

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
The screen's prompt was a TextArea, which took focus when the screen
opened. A focused TextArea consumes printable keys, so b (go back), q,
s, u, t and k did nothing and Textual hid them from the footer.

- make the prompt a Static, and mention b/Escape in it
- add Escape as a go-back key (not shown in the footer)
- move Go back next to Quit so it isn't cut off on narrow terminals
- tests: b and Escape pressed straight after the screen opens dismiss
  with [200]; the callback returns [200] to the main screen
- user manual: document Escape on Shop for Data

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Every screen now follows the same rules:
- escape goes back one level (every screen except Main)
- q is the only plain-letter key: main menu on list screens, quit on
  Main; left off text-entry forms, where it would be typed into the Input
- every other action is a ctrl key with one meaning app-wide: ctrl+s
  submit, ctrl+n add, ctrl+d delete, ctrl+o open, ctrl+k/ctrl+b bookmark
  row/bookmarks, ctrl+u subscribe, ctrl+l sample, ctrl+g glossary
  search, ctrl+y copy GUID, ctrl+r refresh (was r)

Return codes are unchanged; only the keys moved. Also fixes keys that
could never fire: ctrl+i (sent as Tab) and ctrl+c on Edit Profile, the
"return" key name on Status and the sample-data view, and the
Technology Types quit/go back mix-ups. Adds ctrl+s to Create/Edit
Profile.

MainScreen shows the user name as its subtitle; its config logging
moves to on_mount, since self.log needs a running app.

test_key_bindings.py enforces the convention; docs updated to match.

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…-profile-strict-tests

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…s to User Identities

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…ests

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>

# Conflicts:
#	docs/my_profile_app_manual.md
#	my_egeria/my_egeria/DemoCode/My_Profile/MyNetworkScreen.py
#	my_egeria/my_egeria/DemoCode/My_Profile/ShopForDataScreen.py
#	tests/micro-tests/my_profile/test_screens.py
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…tual switch widget

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
…idied up the code files for the project

Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
Signed-off-by: Peter Coldicott <86156876+pcoldico@users.noreply.github.com>
@pcoldico
pcoldico requested a review from dwolfson as a code owner October 26, 2026 16:48
@dwolfson
dwolfson merged commit 4b71b4f into odpi:main Oct 26, 2026
5 checks passed
@pcoldico
pcoldico deleted the my-profile-strict-tests branch October 26, 2026 20: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.

2 participants