Repository navigation
Add an optional declaration to AnalyticFunctionSpec (ISSUE-170) - #517
Merged
Merged
Conversation
An analytic function can now say what its results mean: result kind, measures with unit, as-of and basis, and the four absence sentences. It is the minimum of trellis-analytics' Declaration, with the same field names, so trellis declarations validate here (all 42 in Resource Explorer's analysis catalog do). Optional; existing entries unchanged. Claude-Session: https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ration Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # PYEGERIA_ISSUES.md
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional
declarationtoAnalyticFunctionSpec, so an analytic function can say what its results mean (pyegeria/view/analytic_registry.py):result_kind, from the fixed vocabularyRESULT_KINDSmeasures, each withunit,as_of,value_field, optionalbasis(denominator field and label) andcapped_field. Required for measure/series/distribution/graph.absence: all four sentences (not_measured,not_permitted,not_applicable,measured_nothing)This is the minimum of trellis-analytics'
Declaration, with the same field names and vocabulary. Trellis's richer blocks (extents, confidence, answers, ...) are ignored, not refused. All 42 declarations in Resource Explorer'sanalysis_catalog.yamlvalidate. trellis'sStepManifestalready overrides the field with its ownDeclaration, which still works. The field is optional, so every existing entry loads unchanged.Tests:
tests/micro-tests/test_issue_170_analytic_declaration.py(10 tests: round-trip, registry payload, richer blocks accepted, five incomplete declarations refused with a sentence, unmeasured kinds). 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