Repository navigation
Report schema findings as the specification grades them - #18
Merged
Merged
Conversation
A URI abbreviated by two tags breaks only a recommendation, so validate() now marks it with severity "recommendation" and dumps(validate=True) no longer refuses to write it. One tag defined with several URIs is permitted where their concepts never meet, so it is no longer reported. Also pins down the parser's rejection of lower-case cross-reference identifiers and the validator's report of a FORM that is not a media type, and documents what an empty validate() result does and does not prove. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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
validate()results now have aseverityfield:"error"(default) or"recommendation".2 TAG _LOC …and2 TAG _GOV …with the same URI) is still reported asschema-conflict, now with severity"recommendation". The spec says a schema should map only one tag to each URI and lists unique URIs as recommended, so such a file still conforms.dumps(validate=True)raises only for findings with severity"error"._LOCexample). Its requirements list also says each tag definition's extension tag must be unique; the specific permission is taken to govern, and_check_schema's docstring records this. The parser still leaves such a tag unresolved, as before.FORM pngis reported asmalformed-payloadwith its path.Errorholds, whatseveritymeans, and what an empty result does not prove.Behaviour changes
schema-conflictfinding.dumps(validate=True)now writes a dataset whose only finding is a shared URI.Test plan
pytest(469 passed)ruff check,ruff format --check,mypy gedcom7