Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ For detailed information on using pyegeria, see:
- [docs/user_programming.md](docs/user_programming.md): A comprehensive guide to the programming model, configuration, and client usage.
- [docs/output-formats-and-report-specs.md](docs/output-formats-and-report-specs.md): Guidance on output formats and report specs (including nested/master–detail).
- [md_processing/v2/README.md](md_processing/v2/README.md): Detailed documentation on the Dr. Egeria v2 (Async) markdown processing engine, including rules for attribute validation and reference resolution.
- [my_egeria/README.md](my_egeria/README.md): Documentation and user guides for the My Egeria and My Profile Textual TUI applications.

### Report specs: families and filtering

Expand Down
6 changes: 3 additions & 3 deletions docs/My-Egeria-Doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

# My Profile Application: Reference Guide

This guide explains how the **My Profile Application** (`my_egeria.py`) is put together: its screens, the handler mixins behind them, the Egeria calls each flow makes, and the codes screens use to talk to the app. To learn how to *use* the app (configuration, starting it, keys), see the [My Profile App User Manual](my_egeria_manual.md).
This guide explains how the **My Profile Application** (`my_profile.py`) is put together: its screens, the handler mixins behind them, the Egeria calls each flow makes, and the codes screens use to talk to the app. To learn how to *use* the app (configuration, starting it, keys), see the [My Profile App User Manual](my_egeria_manual.md).

All source files named here are in `my_egeria/my_egeria/DemoCode/My_Profile/`.
All source files named here are in `my_egeria/my_egeria/`.

---

## Source Layout

| File | Contents |
| :--- | :--- |
| `my_egeria.py` | `MyProfileApp`: startup, profile loading, table population, menu dispatch, comments-from-main |
| `my_profile.py` | `MyProfileApp`: startup, profile loading, table population, menu dispatch, comments-from-main |
| `MainScreen.py` | The dashboard: tables, Other Functions menu, row-selection tracking |
| `SplashScreen.py` | Welcome card; its Change User button opens `ChangeUserScreen` |
| `ChangeUserScreen.py` | Collects a new user and password and checks Egeria accepts them |
Expand Down
17 changes: 9 additions & 8 deletions docs/developer_guide_pyegeria_textual.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,16 +526,17 @@ application, so it shows how the patterns from section 6 hold up at scale.
### 7.1 Running it

```bash
cd my_egeria/my_egeria/DemoCode/My_Profile
python my_egeria.py
my_profile # installed console script
# or, with python:
python -m my_egeria.my_profile
```

When developing, run it under the Textual dev tools so you can see its log output. Start the
console in one terminal and the app in another:

```bash
textual console # terminal 1: shows self.log(...) output
textual run --dev my_egeria.py # terminal 2
textual run --dev my_egeria/my_egeria/my_profile.py # terminal 2
```

> **Pitfall:** make sure the `textual` command is the one from your project's `.venv`
Expand All @@ -555,19 +556,19 @@ Then comes the main screen:
### 7.2 How the code is organised

All files are in
[`my_egeria/my_egeria/DemoCode/My_Profile/`](../my_egeria/my_egeria/DemoCode/My_Profile/):
[`my_egeria/my_egeria/`](../my_egeria/my_egeria/):

| File(s) | Role |
|---|---|
| `my_egeria.py` | The `App` subclass, `MyProfileApp`: startup, loading the profile, filling the main tables, and shared actions such as comments. |
| `my_profile.py` | The `App` subclass, `MyProfileApp`: startup, loading the profile, filling the main tables, and shared actions such as comments. |
| `MainScreen.py` | The main dashboard screen: its layout, and keeping track of which table and row are selected. |
| `*Screen.py`, `*Screens.py` | One class per screen or dialog: `SplashScreen`, `ShopForDataScreen`, `MyBookMarksScreen`, `AddCommentScreen`, the `Edit*`/`Add*` screens, and so on. |
| `*_handler.py` | **Mixins**, each holding one feature area's logic: `shop_for_data_handler.py`, `tech_types_handler.py`, `team_roles_handler.py`, `elements_crud_handler.py`, `feedback_handler.py`, `bookmarks_handler.py`. |
| `profile_utils.py` | Plain functions with no UI code: data clean-up, flattening Egeria elements (`element_summary`), reading a row's GUID and qualified name (`row_identity`), and the environment check. |
| `my_profile.tcss` | All the Textual CSS for the app. |
| `RETURN_CODES.md` | The catalogue of numeric codes that screens pass back through `dismiss()`. |

Two design choices keep `my_egeria.py` manageable.
Two design choices keep `my_profile.py` manageable.

**Feature logic lives in mixins.** The app class is assembled from them:

Expand Down Expand Up @@ -808,7 +809,7 @@ to and linked from the profile.

- **Return codes from screens.** Screens dismiss with small integers (200 = OK, 211 =
subscribe, 212 = sample data, 4xx = failure), or with a list whose first entry is the code.
The callback branches on the code. [`RETURN_CODES.md`](../my_egeria/my_egeria/DemoCode/My_Profile/RETURN_CODES.md)
The callback branches on the code. [`RETURN_CODES.md`](../my_egeria/my_egeria/RETURN_CODES.md)
records them all, which matters once dozens of screens share the convention.
- **Priority bindings.** Ordinary app-level bindings are ignored while a `ModalScreen` is
active. Declaring `Binding("ctrl+f", "feedback", "Feedback", priority=True)` makes
Expand Down Expand Up @@ -1051,7 +1052,7 @@ python examples/developer_guide/capture_screenshots.py
| [Output Formats and Report Specs](output-formats-and-report-specs.md) | §4 |
| [My Profile App User Manual](my_egeria_manual.md) | §7 |
| [Egeria User Guide: My Profile Application](My-Egeria-Doc.md) | §7 |
| [My Profile return codes](../my_egeria/my_egeria/DemoCode/My_Profile/RETURN_CODES.md) | §7.6 |
| [My Profile return codes](../my_egeria/my_egeria/RETURN_CODES.md) | §7.6 |
| [My Profile tests](../tests/micro-tests/my_profile/README.md) | §10 |
| [Dr. Egeria user manual](dr_egeria_manual.md) and [design notes](design/README.md) | §8 |
| [Command line interface docs](../commands/doc/README.md) | §9 |
Expand Down
9 changes: 4 additions & 5 deletions docs/my_egeria_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The **My Profile App** is a terminal user interface (TUI), built with [Textual](

This manual describes how to *use* the app. For how it works internally (screens, handlers, Egeria calls and flow diagrams) see the [My Profile Reference Guide](My-Egeria-Doc.md).

The app's source is in `my_egeria/my_egeria/DemoCode/My_Profile/`.
The app's source is in `my_egeria/my_egeria/`.

## Table of Contents

Expand Down Expand Up @@ -74,11 +74,10 @@ From the app folder, inside the project's virtual environment:

```bash
my_profile # installed console script, runs from any directory
# or, from the app folder:
cd my_egeria/my_egeria/DemoCode/My_Profile
python my_egeria.py
# or with python:
python -m my_egeria.my_profile
# or, with the Textual developer console (needs textual-dev, a dev dependency):
textual run --dev my_egeria.py
textual run --dev my_egeria/my_egeria/my_profile.py
```

Use Python 3.13: Textual currently fails on Python 3.14 (an assertion in `textual/rlock.py` at startup).
Expand Down
4 changes: 2 additions & 2 deletions examples/developer_guide/capture_screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
HERE = Path(__file__).resolve().parent
REPO_ROOT = HERE.parents[1]
IMAGES = REPO_ROOT / "docs" / "images" / "developer-guide"
MY_PROFILE_DIR = REPO_ROOT / "my_egeria" / "my_egeria" / "DemoCode" / "My_Profile"
MY_PROFILE_DIR = REPO_ROOT / "my_egeria" / "my_egeria"
SIZE = (150, 42)

sys.path.append(str(MY_PROFILE_DIR))
Expand Down Expand Up @@ -62,7 +62,7 @@ async def capture_examples() -> None:


async def capture_my_profile() -> None:
from my_egeria.DemoCode.My_Profile.my_egeria import MyProfileApp
from my_egeria.my_profile import MyProfileApp

app = MyProfileApp()
async with app.run_test(size=SIZE) as pilot:
Expand Down
8 changes: 3 additions & 5 deletions my_egeria/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ uv sync
## Running the apps
This package contains two Textual apps:

- **My Profile** (`DemoCode/My_Profile/`) — the actively developed app, and the one
the Egeria-Workspaces portal serves:
- **My Profile** (`my_egeria/my_profile.py`) — the production user profile and catalog TUI app, and the one the Egeria-Workspaces portal serves:
```bash
uv run my_profile # or: python -m my_egeria.DemoCode.My_Profile.my_egeria
uv run my_profile # or: python -m my_egeria.my_profile
```
- **MyEgeria** — the original glossary/collection browser (not under active
development; several of its secondary screens are incomplete):
- **MyEgeria** (`my_egeria/main.py`) — the glossary and collection browser:
```bash
uv run my-egeria # or: python -m my_egeria.main
```
Expand Down
116 changes: 0 additions & 116 deletions my_egeria/my_egeria/DemoCode/My_Profile/VIDEO_SCRIPT_DRAFT.md

This file was deleted.

7 changes: 0 additions & 7 deletions my_egeria/my_egeria/DemoCode/My_Profile/__init__.py

This file was deleted.

28 changes: 16 additions & 12 deletions my_egeria/my_egeria/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ The `my-egeria` Textual TUI application's package root — see the parent

| Folder/file | Role |
|---|---|
| `main.py` | Entry point (`uv run my-egeria` / `python -m my_egeria.main`). |
| `my_egeria_app.py` | The main Textual `App` class. |
| `screens/` | Textual screens, one per feature area (`GovernanceOfficer`, `ProductManager`, `ProjectManager`, `collections`, `glossary`, `platform`). |
| `my_profile.py` | Production My Profile & Catalog TUI Application (`MyProfileApp` / `MyEgeriaApp`, entry point `uv run my_profile` / `python -m my_egeria.my_profile`). |
| `main.py` | Entry point for MyEgeria app (`uv run my-egeria` / `python -m my_egeria.main`). |
| `my_egeria_app.py` | The MyEgeria browser/navigation Textual `App` class. |
| `*Screen.py` / `*Screens.py` | Production Textual screens (Main, Splash, Profile Creation/Edit, Data Shopping, Bookmarks, Network, Teams, Communities, Feedback, Tech Types, Subscriptions). |
| `*_handler.py` | Domain mixins for bookmarks, communities, CRUD operations, feedback, networks, shopping, team roles, and tech types. |
| `profile_utils.py` | Profile formatting, Mermaid graph sanitization, data structures, and connection utilities. |
| `screens/` | Feature screens (`GovernanceOfficer`, `ProductManager`, `ProjectManager`, `collections`, `glossary`, `platform`). |
| `widgets/` | Reusable Textual widgets shared across screens. |
| `services/`, `con_services/` | Backend service layer wrapping pyegeria SDK calls for the screens/widgets to use. |
| `utils/` | Shared helpers. |
| `styles/` | Textual CSS. |
| `tests/` | Tests for this app. |
| `services/`, `con_services/` | Backend service layer wrapping pyegeria SDK calls for screens/widgets. |
| `utils/` | Shared helpers and configuration. |
| `styles/` | Textual CSS styles. |
| `tests/` | Tests for the app components. |
| `error_popup_app.py`, `startup_check.py` | Startup/error-handling helpers. |
| `serve.py` | Browser-mode serving via the `textual-serve` library — see the `serve_my_egeria`/`serve_my_profile` entry points in the root `pyproject.toml`. |
| `DemoCode/` | Standalone demo scripts and experimental/deprecated code, not part of the main app (own subfolders per demo topic — Data Products, Journals, My Profile, Report Specs, Technology Type, plus `Deprecated/` and `Experimental Code/`). |
| `serve.py` | Browser-mode serving via `textual-serve` — provides `serve_my_profile` and `serve_my_egeria`. |
| `RETURN_CODES.md` | Screen callback return code contract reference. |
| `catalog_api_calls.md` | API mapping reference for Egeria catalog calls. |
| `DemoCode/` | Standalone demo scripts and experimental/deprecated code (`Data_Products_Demo`, `Deprecated/`, `Experimental Code/`). |

`DemoCode/` is a scratch/demo area, not maintained to the same standard as
the rest of the app — treat anything there as illustrative, not
production code.
`DemoCode/` is a scratch/demo area for experimental prototypes — production code lives in `my_egeria/my_egeria/`.
Loading
Loading