Skip to content

Added roundtrip extras for mediawiki schema format#1222

Merged
VisLab merged 2 commits into
hed-standard:mainfrom
VisLab:remove_vis
Feb 18, 2026
Merged

Added roundtrip extras for mediawiki schema format#1222
VisLab merged 2 commits into
hed-standard:mainfrom
VisLab:remove_vis

Conversation

@VisLab

@VisLab VisLab commented Feb 18, 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 pull request adds support for roundtripping schema extras (Sources, Prefixes, and External Annotations) in MediaWiki format with proper in_library tracking. The changes enable library schemas to maintain proper attribution of extras sections when reading from and writing to MediaWiki format, supporting both merged and unmerged schema saves.

Changes:

  • Added comprehensive test suite for MediaWiki extras roundtripping with in_library tracking
  • Modified wiki2schema.py to parse and track inLibrary attributes from MediaWiki files and merge extras from withStandard base schemas
  • Modified schema2wiki.py to filter and output extras based on save mode (merged vs unmerged) with proper inLibrary attribute handling

Reviewed changes

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

File Description
tests/schema/test_schema_extras_wiki_roundtrip.py New test file validating extras I/O, merging, filtering, and roundtrip preservation for MediaWiki format
hed/schema/schema_io/wiki2schema.py Added inLibrary attribute parsing, in_library column tracking, and extras merging logic for withStandard schemas
hed/schema/schema_io/schema2wiki.py Added filtering for unmerged saves and inLibrary attribute output for merged saves

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

Comment thread tests/schema/test_schema_extras_wiki_roundtrip.py Outdated
Comment thread hed/schema/schema_io/schema2wiki.py Outdated
Comment thread hed/schema/schema_io/schema2wiki.py Outdated
Comment thread hed/schema/schema_io/wiki2schema.py
@VisLab VisLab merged commit d1b3d87 into hed-standard:main Feb 18, 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