Comparer: derivable removals and changelog layout - #1407
Open
VisLab wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
It introduces a non-robust assert in a unittest and has a couple of output/formatting stability and convention issues that should be fixed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the schema comparison/reporting logic to better align with HED 8.5.0 unit derivation behavior and to emit changelog output in the same markdown layout used by hed-schemas prerelease notes, with supporting tests and minor downstream call-site/doc updates.
Changes:
- Treat removed units as a Patch change when the newer schema still accepts them via derivation (e.g.,
uVasu + V). - Reformat
SchemaComparer.pretty_print_change_dict()markdown output to match hed-schemasprerelease/PRERELEASE_CHANGES.mdlayout and extendcompare_differences()to support non-markdown output. - Add/adjust tests for derived-unit defaultUnits validation and the new comparer behaviors/layout.
File summaries
| File | Description |
|---|---|
hed/schema/schema_comparer.py |
Adds derivable-unit removal classification and updates changelog formatting + API. |
hed/scripts/schema_script_util.py |
Forces plain-text schema diff output for reload error reporting. |
hed/schema/schema_validation/compliance_summary.py |
Updates compliance summary bullet list to reflect current rules. |
tests/schema/test_schema_compare.py |
Adds regression tests for derivable unit removals and markdown layout expectations. |
tests/schema/test_schema_attribute_validators.py |
Adds test coverage for derived-form defaultUnits validation. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
No description provided.