Skip to content

Load released test schemas from the bundle - #1476

Merged
VisLab merged 2 commits into
hed-standard:mainfrom
VisLab:cleanup_dup_tests
Oct 22, 2026
Merged

VisLab merged 2 commits into
hed-standard:mainfrom
VisLab:cleanup_dup_tests

Conversation

@VisLab

@VisLab VisLab commented Oct 22, 2026

Copy link
Copy Markdown
Member

Tests loaded released standard schemas from seven copies under tests/data. They now use load_schema_version (the bundled copies in hed/schema/schema_data), and tests that name a standard inside an xml_folder build a temporary folder from their fixtures plus the bundled files (make_xml_folder in tests/schema/schema_test_helpers.py).

  • Delete HED8.0.0t.xml, HED8.1.0.xml, HED8.2.0.xml, HED8.2.0.mediawiki, merge_tests/HED8.2.0.xml and merge_group_tests/HED8.4.0.xml and HED8.5.0.xml; their differences from the releases were accidental.
  • TestHedBase gains a schema_version attribute; a schema_file still wins.
  • Remove existence guards that would have skipped tests silently, and dead references to the deleted files.
  • Add tests/data/schema_tests/README.md listing the edited fixtures kept.

Tests loaded released standard schemas from seven copies under
tests/data. They now use load_schema_version (the bundled copies in
hed/schema/schema_data), and tests that name a standard inside an
xml_folder build a temporary folder from their fixtures plus the bundled
files (make_xml_folder in tests/schema/schema_test_helpers.py).

- Delete HED8.0.0t.xml, HED8.1.0.xml, HED8.2.0.xml, HED8.2.0.mediawiki,
  merge_tests/HED8.2.0.xml and merge_group_tests/HED8.4.0.xml and
  HED8.5.0.xml; their differences from the releases were accidental.
- TestHedBase gains a schema_version attribute; a schema_file still wins.
- Remove existence guards that would have skipped tests silently, and
  dead references to the deleted files.
- Add tests/data/schema_tests/README.md listing the edited fixtures kept.

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.

🔵 Needs a closer look

Schema substitutions affect many test suites, and their full results remain unverified.

No open issues 🎉

What changed in this PR

This PR consolidates released-schema test data around the schemas bundled with hedtools, reducing duplicate fixtures while retaining deliberately edited schemas.

Changes:

  • Replace fixture-based loads with version-based loading across validator, model, analysis, and schema tests.
  • Add bundled-file and temporary-folder helpers, plus schema_version support in the shared validator test base.
  • Remove obsolete fixtures, unused references, and selected existence guards; document retained test data.
File Description
tests/​validator/​test_tag_validator.py Selects released schema 8.2.0.
tests/​validator/​test_tag_validator_library.py Uses version-based loads for duplicate-schema checks.
tests/​validator/​test_tag_validator_base.py Adds version loading while preserving file precedence.
tests/​validator/​test_spreadsheet_validator.py Loads released schema 8.0.0.
tests/​validator/​test_sidecar_validator.py Loads released schema 8.0.0.
tests/​validator/​test_onset_validator.py Loads released schema 8.2.0.
tests/​validator/​test_hed_validator.py Replaces fixture loads with released versions.
tests/​validator/​test_def_validator.py Uses released schemas for definition tests.
tests/​tools/​analysis/​test_hed_tag_counts.py Uses released schema for tag counting.
tests/​tools/​analysis/​test_assembling_hed_strings.py Uses released schema for annotation assembly.
tests/​tools/​analysis/​test_annotation_util.py Uses released schema for annotation utilities.
tests/​test_deprecations.py Uses a bundled file for warning checks.
tests/​scripts/​test_script_util.py Validates the bundled XML schema.
tests/​schema/​test_schema_util.py Removes an unused fixture reference.
tests/​schema/​test_schema_merge.py Builds temporary folders with bundled partner schemas.
tests/​schema/​test_schema_format_roundtrip.py Uses released schemas and removes existence guards.
tests/​schema/​test_schema_compliance.py Checks compliance against released 8.0.0.
tests/​schema/​test_hed_schema.py Uses bundled data and removes unused setup.
tests/​schema/​test_hed_schema_io.py Uses bundled XML and temporary prerelease fixtures.
tests/​schema/​test_convert_tags.py Selects schema by version.
tests/​schema/​test_base_tag.py Loads the configured schema version.
tests/​schema/​schema_test_helpers.py Adds bundled-path and temporary-folder helpers.
tests/​models/​test_tabular_input.py Uses released schema for tabular input.
tests/​models/​test_string_search.py Uses released schema for ancestor searches.
tests/​models/​test_spreadsheet_input.py Uses released schema for spreadsheet input.
tests/​models/​test_sidecar.py Uses released schema for sidecar tests.
tests/​models/​test_schema_lookup.py Uses released schema for lookup tests.
tests/​models/​test_query_util.py Uses released schema for query utilities.
tests/​models/​test_query_service.py Uses released schema for query services.
tests/​models/​test_query_handler.py Uses released schema for query handling.
tests/​models/​test_hed_group.py Uses released schema for group tests.
tests/​models/​test_column_mapper.py Replaces fixture-path setup with version loading.
tests/​models/​test_base_input.py Uses released schema for base input.
tests/​data/​schema_tests/​README.md Documents bundled loading and retained edited fixtures.
tests/​data/​schema_tests/​merge_group_tests/​README.md Documents temporary partner-schema assembly.
tests/​data/​schema_tests/​HED8.2.0.mediawiki Deletes the redundant schema fixture.
spec_tests/​test_hed_cache.py Removes an unused fixture filename.

Review effort: Balanced

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.

🔵 Needs a closer look

The migration changes test inputs across the suite, and compatibility with the unit and specification tests remains unverified.

No open issues 🎉

Review effort: Balanced

@VisLab
VisLab merged commit f71876a into hed-standard:main Oct 22, 2026
19 checks passed
@VisLab
VisLab deleted the cleanup_dup_tests branch October 22, 2026 20:26
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