Skip to content

Release 6.2.19: link methods return relationship GUIDs (ISSUE-174), ISSUE-173 removals, Pydantic V2 - #525

Merged
dwolfson merged 7 commits into
odpi:mainfrom
dwolfson:fix/link-methods-return-guid
Nov 1, 2026
Merged

dwolfson merged 7 commits into
odpi:mainfrom
dwolfson:fix/link-methods-return-guid

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Release 6.2.19. Scope confirmed by the owner, relayed by the Trellis Coordinator on 2026-10-31.

ISSUE-174: link methods return the new relationship GUID

  • ServerClient._async_new_relationship_request already returned the GUID. About 142 callers in pyegeria/omvs awaited it bare, so they and their sync wrappers returned None.
  • All of them, including intermediate async methods such as ClassificationExplorer's add_*_to_element, now return the GUID. -> None annotations and Returns: None docstrings are updated.
  • Existing callers that ignore the value are unaffected.
  • test_issue_174_link_returns_guid.py:
    • an AST guard over all of pyegeria/omvs, transitive and covering both async and sync;
    • a stubbed round trip for 8 methods across 7 clients.

ISSUE-173 removals, deprecated in 6.2.18

  • Dotted paths refused: a report spec's analytic_function or metric_path must be a registered name. Anything else raises AnalyticFunctionRefused before any import.
  • Sources no longer read: config.json's "Pyegeria Report Spec Modules", PYEGERIA_REPORT_SPEC_MODULES, PYEGERIA_REPORT_FORMATS_JSON and PYEGERIA_REPORT_FORMATS_MODULES. If one is still set, a refresh logs one WARNING naming it.
  • Alias groups dropped: trellis.report_specs and trellis.analytics.
  • register_report_specs() is the runtime path for code that isn't an installed package. Registering the same label from the same source is now a no-op.
  • Downstream: trellis-analytics is ready (#956). The Portal moves its PYEGERIA_REPORT_SPEC_MODULES setdefault to register_report_specs() in the same change as its move to 6.2.19, and not before.

Pydantic V2 migration

  • In _output_format_models.py and _output_dashboard_sheet_models.py, @root_validator/@validator become @model_validator/@field_validator.
  • The dict() overrides keep their output, including Format's legacy columns key, but now build on model_dump().
  • models.get_defined_fields uses model_fields.
  • Verification:
    • no PydanticDeprecatedSince20 warnings on import or serialisation;
    • a full dump of all 423 specs, through both model_dump() and dict(), is byte-identical before and after;
    • so is select_report_spec over 400 label/format pairs.

find_note_logs

  • graph_query_depth is now a named parameter, with the default (3) unchanged. Pass 0 to list logs without inlining their entries; that took one listing from about 30 s to 0.3 s.

Checks

  • micro-tests: 0 failed of 1757.
  • The Coordinator's specs_check.py prints bad [] (423 specs, 25 function refs). It is now a micro-test, test_report_specs_registered_and_pydantic_v2.py.
  • PyPI's latest version is 6.2.18.

🤖 Generated with Claude Code

https://claude.ai/code/session_015pdMuPiVFuZhoGLsBSFaN3

…p GUID

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… (ISSUE-174)

ServerClient._async_new_relationship_request returns the GUID from the
server's GUIDResponse, but about 142 callers in pyegeria/omvs awaited it
bare and returned None, and so did their sync wrappers. Every such method,
its sync wrapper, and intermediate async methods now return the GUID.
Their -> None annotations and Returns docstrings are updated. This is
additive: callers that ignore the value are unaffected.

Adds an AST guard test over pyegeria/omvs and a stubbed round-trip test
for a sample of methods across seven clients.

Claude-Session: https://claude.ai/code/session_015pdMuPiVFuZhoGLsBSFaN3
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ed in 6.2.18 (ISSUE-173)

- A report spec's analytic_function, or metric_path, must be a registered
  name. Anything else raises AnalyticFunctionRefused before any import,
  naming the registered name to use when there is one.
- refresh_report_specs() no longer reads config.json's "Pyegeria Report
  Spec Modules", PYEGERIA_REPORT_SPEC_MODULES, PYEGERIA_REPORT_FORMATS_JSON
  or PYEGERIA_REPORT_FORMATS_MODULES. If one is still set, it logs one
  WARNING naming it, so a stale setting doesn't quietly do nothing.
- The trellis.report_specs and trellis.analytics entry-point alias groups
  are no longer read.
- register_report_specs() is the way for code that isn't an installed
  package to add specs. Registering a label again from the same source is
  now a no-op, so a reloaded handler can call it safely. A label held by
  another source still raises.

Tests that used the removed sources or dotted paths as fixtures now use
the user specs directory and registered names. Docs and CLAUDE.md are
updated to match.

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

- @root_validator(pre=True) becomes @model_validator(mode="before"), and
  @validator(..., pre=True) becomes @field_validator(..., mode="before"), in
  _output_format_models.py and _output_dashboard_sheet_models.py.
- The dict() overrides keep their output, including Format's legacy
  "columns" key. They build on model_dump() instead of the deprecated
  BaseModel.dict(). Nested models without an override use model_dump().
- models.get_defined_fields uses model_fields instead of __fields__.

Importing and serialising the registry now raises no
PydanticDeprecatedSince20 warnings. A full dump of all 423 registered specs,
through both model_dump() and dict(), plus select_report_spec over 400
label/format pairs, is byte-identical before and after.

Adds test_report_specs_registered_and_pydantic_v2.py: every registered
spec names registered functions only (the Trellis Coordinator's
specs_check.py), no V1 deprecation warnings, the columns key is kept, and
no V1 validators are left in these files.

Claude-Session: https://claude.ai/code/session_015pdMuPiVFuZhoGLsBSFaN3
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
At the default depth, each log's noteLogEntries are inlined, and page_size
bounds logs rather than entries. On a server with two large system logs,
listing them took about 30 s; with graph_query_depth=0 it takes 0.3 s.
Until now the value reached the request only through **kwargs. It's now in
both signatures and documented, with the default (3) unchanged.

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

Claude-Session: https://claude.ai/code/session_015pdMuPiVFuZhoGLsBSFaN3
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Claude-Session: https://claude.ai/code/session_015pdMuPiVFuZhoGLsBSFaN3
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson force-pushed the fix/link-methods-return-guid branch from ebf7ed4 to b9df37c Compare November 1, 2026 14:21
@dwolfson
dwolfson merged commit 9ca7b69 into odpi:main Nov 1, 2026
6 checks passed
@dwolfson
dwolfson deleted the fix/link-methods-return-guid branch November 3, 2026 21:27
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