First stage in fixing inLibrary attribute for schema extras#1340
Open
VisLab wants to merge 7 commits into
Open
First stage in fixing inLibrary attribute for schema extras#1340VisLab wants to merge 7 commits into
VisLab wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is the first step toward correctly tracking the inLibrary / in_library origin for schema “extras” (Sources/Prefixes/External annotations) when working with partnered library schemas, and updates the test fixtures to reflect merged library schemas.
Changes:
- Add
in_librarytagging/merge behavior when loading extras from XML/MediaWiki/JSON/DataFrame inputs, and adjust serializers to use a merged-extras accessor. - Update merged-schema serialization paths to better control whether base-standard extras are included, and ensure
in_librarymetadata is not serialized. - Refresh schema test fixtures (TSV/XML/MediaWiki) and a few tests to reflect merged library schema state and newly required extras sections.
Reviewed changes
Copilot reviewed 32 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/schema/test_schema_extras_comprehensive.py | Adjusts expectation for merged test schemas (schema.merged). |
| tests/schema/test_schema_compliance.py | Modifies dc:source compliance test (currently includes debug I/O and removed assertion). |
| tests/schema/test_hed_schema_io.py | Updates prerelease library fixture name/library (testliba). |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_ValueClass.tsv | Expands value class fixtures for merged test library schema. |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_UnitModifier.tsv | Adds SI unit modifier fixtures. |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_UnitClass.tsv | Adds unit class fixtures. |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_Unit.tsv | Adds unit fixtures and relationships to unit classes. |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_Tag.tsv | Rebuilds merged tag TSV (including inLibrary=testlib markings for library-origin tags). |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_Structure.tsv | Updates header structure (removes unmerged="True" in fixture). |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_ObjectProperty.tsv | Adds object-property fixtures. |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_DataProperty.tsv | Adds data-property fixtures (including inLibrary definition). |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_AttributeProperty.tsv | Adds attribute-property fixtures. |
| tests/data/schema_tests/test_merge/HED_testlib_4.0.0/HED_testlib_4.0.0_AnnotationProperty.tsv | Expands annotation-property fixtures. |
| tests/data/schema_tests/prerelease/HED9.9.9.mediawiki | Adds extras section headers required for parsing (Sources/External annotations). |
| tests/data/schema_tests/prerelease/HED_testpre_1.0.0.mediawiki | Adds Prefixes section header required for parsing. |
| tests/data/schema_tests/prerelease/HED_testliba_2.1.0.xml | Renames prerelease library fixture and updates withStandard. |
| tests/data/schema_tests/HED_testlib_2.1.0.xml | Adds a non-prerelease XML library schema fixture including extras sections. |
| hed/scripts/check_schema_loading.py | Adds support for testing additional flat schema directories + CLI flag to exclude them. |
| hed/schema/schema_io/xml2schema.py | Adds in_library column tagging for extras when loading library schemas (XML). |
| hed/schema/schema_io/wiki2schema.py | Adds in_library column tagging for extras when loading library schemas (MediaWiki). |
| hed/schema/schema_io/schema2xml.py | Switches extras output to use merged-extras accessor. |
| hed/schema/schema_io/schema2wiki.py | Switches extras output to use merged-extras accessor and skips in_library when serializing. |
| hed/schema/schema_io/schema2json.py | Switches extras output to use merged-extras accessor. |
| hed/schema/schema_io/schema2df.py | Updates DataFrame serializer extras output; ensures in_library is stripped from serialized extras. |
| hed/schema/schema_io/schema2base.py | Adds base-schema loading + merged-extras helper to support merged output behavior. |
| hed/schema/schema_io/json2schema.py | Adds in_library column tagging for extras when loading library schemas (JSON). |
| hed/schema/schema_io/df2schema.py | Adds in_library column tagging for extras when loading from DataFrames. |
| hed/schema/schema_io/df_util.py | Updates extras merge logic to prefer library rows for duplicates (and keeps in_library for comparison semantics). |
| hed/schema/schema_io/base2schema.py | Strips in_library column during normalization to avoid serializing internal metadata. |
| hed/schema/hed_schema.py | Adjusts save_as_dataframes behavior to preserve serializer-merged extras when saving merged output and strip in_library when appropriate. |
| .github/copilot-instructions.md | Updates contributor guidance on placing temporary files in .status/. |
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.