Skip to content

Start revising the schema compliance checking#1232

Merged
VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:fix_extras
Feb 24, 2026
Merged

Start revising the schema compliance checking#1232
VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:fix_extras

Conversation

@VisLab

@VisLab VisLab commented Feb 24, 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.

Pull request overview

This PR begins a refactor of HED schema compliance checking by moving to a more data-driven validator (domain/range-based) and adding a structured compliance reporting summary, with corresponding test updates and small supporting script/config changes.

Changes:

  • Reworked hed/schema/schema_compliance.py to build attribute validators from schema metadata (domain/range) and to attach a ComplianceSummary to the returned issues list.
  • Added hed/schema/schema_compliance_summary.py (new) plus additional tests validating summary output and domain/range invariants.
  • Updated multiple tests to account for new/expanded compliance checks and adjusted schema loading checks output shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/schema/test_schema_wiki_fatal_errors.py Updates expected issue count for fatal error test.
tests/schema/test_schema_format_roundtrip.py Makes duplicate tests assert by error code rather than total issue count.
tests/schema/test_schema_compliance.py Adds extensive tests for ComplianceSummary and domain/range constraints; updates schema versions under test.
tests/schema/test_schema_attribute_validators.py Updates deprecatedFrom edge cases (current version allowed; future invalid).
tests/schema/test_hed_schema_io.py Adjusts expected compliance issue counts and assertions to tolerate additional issue types.
tests/schema/test_hed_schema_group.py Updates expected warning count for group compliance.
tests/schema/test_hed_schema.py Updates expected warning count for group compliance.
spec_tests/test_errors.py Alters spec test runner behavior for schema_tests (currently disables running them).
hed/scripts/check_schema_loading.py Removes “skipped” from results/summary and updates docstring accordingly.
hed/schema/schema_compliance_summary.py New: compliance reporting structure and text report output.
hed/schema/schema_compliance_old.py New: keeps prior compliance implementation (now with summary support).
hed/schema/schema_compliance.py Main refactor: new domain/range constants, validator building, and summary attachment.
hed/schema/schema_attribute_validators.py Updates deprecatedFrom validation to allow current (even prerelease) schema version.
hed/schema/hed_schema_entry.py Ensures subclasses call super().finalize_entry(schema) to clear stale unknown attributes.
.github/dependabot.yml Fixes GitHub Actions dependabot directory to /.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spec_tests/test_errors.py
Comment thread hed/schema/schema_compliance.py Outdated
Comment thread hed/schema/schema_compliance.py Outdated
@VisLab VisLab merged commit b4f4d75 into hed-standard:main Feb 24, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants