Repository navigation
feat(dr-egeria): Reference Data authoring + Valid Metadata family; fix ISSUE-142 - #449
Merged
Merged
Conversation
…t; fix ISSUE-142 Reference Data (business value lists): - Create Reference Data Set / Reference Data Value (ReferenceDataSet / ReferenceDataValue, the shape Egeria's own content uses). A set's members come from Members (existing values, synced), Values (one per line, created inline) or Value Table (created with per-value properties). Inline values are named <set qualified name>::<value>, so re-runs update in place; members no longer listed are unlinked, never deleted. - Link/Detach Valid Value Member, Consistent, Associated, Mapped Valid Values and Valid Value Implementation, via one OM_TYPE-driven link table. - Link Element to Valid Values sends Strict Requirement; Link Reference Value Assignment sends Attribute Name, Confidence, Steward*, Notes. Valid Metadata (allowed values of Egeria's own properties): the 9 Setup/Clear/ Set Consistent/Specification Property Assignment commands move to their own family, names unchanged. Setup Valid Metadata Value accepts a Metadata Value Table. Parser: new "Table" and "Line List" attribute styles. Preferred Value is no longer required (the processors check it where needed). Live-verified on qs-view-server, including a second run of the same document. ISSUE-142: a wrapped Egeria 401/403 is raised as PyegeriaUnauthorizedException only for UserNotAuthorizedException (or a bare 401); other 403s, e.g. OMAG-GENERIC-HANDLERS-403-005, keep Egeria's own message. The user id is now named in the authorization message. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
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.
Summary
Adds authoring of business value lists to Dr.Egeria's Reference Data family, and splits the type-system commands out into a new Valid Metadata family. Also fixes ISSUE-142.
Two terms used in this PR:
ReferenceDataSet/ReferenceDataValue.fileType(valid_metadata.py).Reference Data: new commands
Create Reference Data Set. A set's members come from three attributes:Members: values that already exist, kept in sync on each run.Values: created inline, one per line, with commas kept as part of the value.Value Table: a markdown table with Value, Display Name, Description, Usage, Data Type, Is Case Sensitive, Default and Ordinal columns.Inline values are named
<set qualified name>::<value>, so re-running a document updates them in place. A member no longer listed is unlinked, never deleted.Create Reference Data Value, optionally joining a set (In Reference Data Set,Is Default Member,Member Ordinal).Link/Detachfor Valid Value Member, Consistent, Associated and Mapped Valid Values, and Valid Value Implementation. One table in the code (VALID_VALUE_LINKS) drives all five, and the processor branches on the verb.Relationship properties the existing commands used to drop:
Link Element to Valid Valuesnow sendsStrict Requirement;Link Reference Value Assignmentnow sends Attribute Name, Confidence, Steward and Notes.Valid Metadata: new family
Setup Valid Metadata Valueaccepts aMetadata Value Table(Preferred Value, Display Name, Description).Parser and specs
refresh_specsadded 4 report specs and changed nothing else. Only Reference Data and Valid Metadata templates changed.Preferred Valueis no longer marked required; the processors check for it where it's needed.Design notes
ReferenceDataSet/ReferenceDataValuesubtypes are created. The Reference Data view's finds default to typeReferenceDataValue(ReferenceDataInstance.java:65-69), so a plainValidValueDefinitionis invisible to them.ISSUE-142
Any Egeria-wrapped
relatedHTTPCode401/403 used to be raised as "User not authorized … for user - ``". Egeria also uses 403 for errors that aren't about authorization, e.g.OMAG-GENERIC-HANDLERS-403-005when deleting an element that still has dependents.Now an error is treated as an authorization failure only for
UserNotAuthorizedException, or a 401 with no exception class. Any other 403 keeps Egeria's own message, and the authorization message now names the user.Test plan
pytest tests/micro-tests: 1090 passed, 1 skipped.test_reference_data_family.py: 16 new tests covering parsing, specs, set and member sync, the links and valid metadata.test_issue_142_403_not_always_unauthorized.py: 3 new tests.validate_compact_specs: 0 errors. The 28 warnings were there before.--validateon the new regression doctests/dr-egeria-command-tests/dr_test_reference_data.md: all commands pass.--processon qs-view-server, under a throwaway prefix:Metadata Value Tableset up 2 values, and re-running it stayed at 2.Follow-ups
🤖 Generated with Claude Code