Skip to content

Comments

Minor refactoring of tests for efficiency#1226

Merged
VisLab merged 3 commits intohed-standard:mainfrom
VisLab:fix_extras
Feb 21, 2026
Merged

Minor refactoring of tests for efficiency#1226
VisLab merged 3 commits intohed-standard:mainfrom
VisLab:fix_extras

Conversation

@VisLab
Copy link
Member

@VisLab VisLab commented Feb 20, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

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 refactors and expands the schema I/O test suite, consolidating prior converter/compliance coverage into broader roundtrip tests and adding targeted coverage around the inLibrary attribute across save modes and formats.

Changes:

  • Added a dedicated inLibrary attribute test module that exercises merged vs unmerged behavior across XML/JSON/MediaWiki/TSV and roundtrips.
  • Moved temp-file test helpers into a shared schema_test_helpers.py module and updated imports accordingly; removed the older test_schema_converters.py.
  • Expanded test_schema_format_roundtrip.py with additional coverage (load-from-string, compliance, duplicates, prefix saving, edge-case roundtrips, prologue/epilogue preservation) and updated/extended test fixtures for HED_testlib_4.0.0.

Reviewed changes

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

Show a summary per file
File Description
tests/schema/test_schema_inlibrary_attribute.py New cross-format tests validating inLibrary behavior under merged/unmerged saves and across roundtrips.
tests/schema/test_schema_format_roundtrip.py Adds broader schema I/O tests (string loads, compliance/duplicates, prefix saving, edge-case roundtrips, prologue preservation).
tests/schema/test_schema_converters.py Removes legacy converter/compliance tests that are now covered elsewhere.
tests/schema/test_hed_schema_io_df.py Refactors line-ending tests into a helper and consolidates per-format checks.
tests/schema/test_hed_schema_io.py Updates helper import to the new shared test helper module.
tests/schema/schema_test_helpers.py Adds shared temp-file helper/decorator for schema tests.
tests/data/schema_tests/test_merge/HED_testlib_4.0.0* Extends testlib fixture schema content across TSV/XML/MediaWiki/JSON.
temp_test_output/* Adds generated TSV outputs (appear to be debugging artifacts rather than test fixtures).
Comments suppressed due to low confidence (1)

temp_test_output/temp_test_output_Structure.tsv:5

  • The temp_test_output/ directory appears to contain generated schema output artifacts (e.g., full Tag/Unit/Property TSV exports) and is not referenced by the test suite. Committing these large, generated files will bloat the repo and can easily become stale. Consider removing this directory from the PR and adding the path to .gitignore if it is produced locally during debugging.
hedId	rdfs:label	Attributes	omn:SubClassOf	dc:description
HED_0040010	ScoreHeader	version="1.1.0", library="score", withStandard="8.2.0"	HedHeader	
HED_0040011	ScorePrologue		HedPrologue	This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings.\nThe HED-SCORE library schema allows neurologists, neurophysiologists, and brain researchers to annotate electrophysiology recordings using terms from an internationally accepted set of defined terms (SCORE) compatible with the HED framework.\nThe resulting annotations are understandable to clinicians and directly usable in computer analysis.\n\nFuture extensions may be implemented in the HED-SCORE library schema.\nFor more information see https://hed-schema-library.readthedocs.io/en/latest/index.html.
HED_0040012	ScoreEpilogue		HedEpilogue	The Standardized Computer-based Organized Reporting of EEG (SCORE) is a standard terminology for scalp EEG data assessment designed for use in clinical practice that may also be used for research purposes.\nThe SCORE standard defines terms for describing phenomena observed in scalp EEG data. It is also potentially applicable (with some suitable extensions) to EEG recorded in critical care and neonatal settings.\nThe SCORE standard received European consensus and has been endorsed by the European Chapter of the International Federation of Clinical Neurophysiology (IFCN) and the International League Against Epilepsy (ILAE) Commission on European Affairs.\nA second revised and extended version of SCORE achieved international consensus.\n\n[1] Beniczky, Sandor, et al. "Standardized computer based organized reporting of EEG: SCORE." Epilepsia 54.6 (2013).\n[2] Beniczky, Sandor, et al. "Standardized computer based organized reporting of EEG: SCORE second version." Clinical Neurophysiology 128.11 (2017). \n\nTPA, March 2023


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

@VisLab VisLab merged commit 3431890 into hed-standard:main Feb 21, 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.

1 participant