Skip to content

Discover analytic functions and steps from installed packages (ISSUE-172) - #519

Merged
dwolfson merged 3 commits into
odpi:mainfrom
dwolfson:feat/analytic-entry-points
Oct 31, 2026
Merged

dwolfson merged 3 commits into
odpi:mainfrom
dwolfson:feat/analytic-entry-points

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Installed packages can now register analytic functions and steps by installing (pyegeria/view/analytic_registry.py), per the Architect's library-split design (LS1: the entry-point group and manifest loader belong in pyegeria):

  • Group: pyegeria.analytics, with trellis-analytics' trellis.analytics read as an alias during the split. An entry point names an AnalyticFunctionSpec (or subclass), a list of them, or a callable returning either; routines and steps (kind) alike.
  • Lazy: nothing is read at import. Entry points are read on the first get_analytic_registry() call and cached; refresh_analytic_functions() forgets the cache. Only manifests load then; a function's module is imported on its first run by the resolver.
  • Failures: a broken entry point, or one whose name clashes with a built-in/config entry, is reported by analytic_entry_point_errors() (also analytic_registry_payload()["entry_point_errors"]) and logged at WARNING; it never blocks the rest. The same manifest under both groups is not a clash.

Checked in trellis's venv: both installed entry points (context_pack, curation_coverage) are discovered with no errors, and trellis's discovery.register() then adds nothing, harmlessly.

Tests: tests/micro-tests/test_issue_172_analytic_entry_points.py (8 tests: both groups, lazy and read once, no function-module import, broken entry point, wrong type, built-in clash, duplicate across groups, trellis register compatibility). All micro-tests pass.

Note: this is one of four related PRs (ISSUE-169..172). Each adds an entry near the top of PYEGERIA_ISSUES.md, so whichever merges later needs a trivial conflict resolution there.

🤖 Generated with Claude Code

https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc

…172)

Packages register into the analytic registry through the
pyegeria.analytics entry-point group (trellis.analytics read as an alias
during the library split). Entry points are read lazily on first use of
the registry and cached; refresh_analytic_functions() forgets them. Only
manifests load then; a function's module is imported on its first run.
A broken entry point, or one clashing with a built-in name, is reported
by analytic_entry_point_errors() and never blocks the rest.

Claude-Session: https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…-points

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

# Conflicts:
#	PYEGERIA_ISSUES.md
…-points

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

# Conflicts:
#	PYEGERIA_ISSUES.md
@dwolfson
dwolfson merged commit b9758ac into odpi:main Oct 31, 2026
6 checks passed
dwolfson added a commit that referenced this pull request Oct 31, 2026
ISSUE-168 was released in 6.2.16 (#513) but still read "not merged";
ISSUE-169..172 are merged (#516..#519) and ship in 6.2.17. Their
statuses now say so, the five entries move to Fixed / Resolved, and the
open-items index and at-a-glance count (now 2: ISSUE-155, 150) match.
No entry's content changed beyond its status line.

Claude-Session: https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
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