Reorganized the validation code#1234
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reorganizes schema validation code by moving compliance checking, attribute validators, and validation utilities into a new hed.schema.schema_validation subpackage while keeping backward-compatible shims for older import paths.
Changes:
- Added
hed/schema/schema_validation/package containing compliance checking, compliance summary reporting, HedID validation, attribute validators, and validation utilities. - Replaced legacy modules (
schema_compliance.py,schema_attribute_validators.py,schema_validation_util.py) with backward-compatible shims that re-export from the new package. - Updated tests to import from the new locations and removed deprecated/legacy validation utilities and debug-only test scripts.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/schema/test_schema_validator_hed_id.py | Update HedID validator import to new package path. |
| tests/schema/test_schema_validation_util.py | Update validation util import to new package path. |
| tests/schema/test_schema_compliance.py | Update compliance imports to new package path. |
| tests/schema/test_schema_attribute_validators.py | Update attribute validators import to new package path. |
| tests/schema/test_schema_validation_util_deprecated.py | Remove tests for deprecated legacy validation util. |
| spec_tests/_debug_dep_tests.py | Remove debug-only script. |
| hed/schema/schema_validation_util_deprecated.py | Remove deprecated legacy validation utilities. |
| hed/schema/schema_validation_util.py | Convert to shim re-exporting schema_validation.validation_util. |
| hed/schema/schema_validation/validation_util.py | New home for schema validation utility functions. |
| hed/schema/schema_validation/hed_id_validator.py | New HedID validator implementation under schema_validation. |
| hed/schema/schema_validation/compliance_summary.py | New structured compliance summary reporter. |
| hed/schema/schema_validation/compliance.py | New compliance checker implementation under schema_validation. |
| hed/schema/schema_validation/attribute_validators.py | New attribute validation functions under schema_validation. |
| hed/schema/schema_validation/init.py | Package exports for schema validation components. |
| hed/schema/schema_compliance_old.py | Remove old compliance implementation file. |
| hed/schema/schema_compliance.py | Convert to shim re-exporting schema_validation.compliance. |
| hed/schema/schema_attribute_validators.py | Convert to shim re-exporting schema_validation.attribute_validators. |
| hed/schema/hed_schema.py | Route HedSchema.check_compliance() through the new compliance module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.