Skip to content

Comparer: derivable removals and changelog layout - #1407

Open
VisLab wants to merge 2 commits into
hed-standard:mainfrom
VisLab:validation_cleanup
Open

Comparer: derivable removals and changelog layout#1407
VisLab wants to merge 2 commits into
hed-standard:mainfrom
VisLab:validation_cleanup

Conversation

@VisLab

@VisLab VisLab commented Sep 9, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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., uV as u + V).
  • Reformat SchemaComparer.pretty_print_change_dict() markdown output to match hed-schemas prerelease/PRERELEASE_CHANGES.md layout and extend compare_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.

Comment thread hed/schema/schema_comparer.py Outdated
Comment thread tests/schema/test_schema_compare.py Outdated
Comment thread hed/schema/schema_comparer.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance python Pull requests that update Python code schema-handling testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants