Skip to content

Cache rework to better use hed-schemas version manifest#1360

Merged
VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:cache_rework
Jul 17, 2026
Merged

Cache rework to better use hed-schemas version manifest#1360
VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:cache_rework

Conversation

@VisLab

@VisLab VisLab commented Jul 17, 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 PR reworks HED schema caching/version discovery to use a repo-level schema_versions.json manifest from hed-schemas as a fast path, reducing GitHub REST API crawling and enabling single-version on-demand downloads.

Changes:

  • Add hed.schema.schema_version_manifest to parse a global version manifest and build raw download URLs pinned to a specific repo commit.
  • Update hed.schema.hed_cache to (a) use the manifest fast path in get_available_hed_versions, (b) seed caches with bundled schemas before attempting network downloads, and (c) download only a requested schema version on-demand.
  • Expand unit/spec tests to cover manifest parsing, fallback behaviors, and single-version download behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
hed/schema/schema_version_manifest.py New manifest parsing helpers for listing versions and locating per-version download metadata.
hed/schema/hed_cache.py Integrates manifest fast path, improves cache seeding robustness, and adds single-version download helper.
tests/schema/test_schema_version_manifest.py New unit tests for manifest parsing behaviors (no I/O).
tests/schema/test_hed_schema_io.py Adds regression tests for fallback behavior and ensures manifest URL is treated as library-neutral in caching tests.
spec_tests/test_hed_cache.py Updates spec test to verify on-demand downloading of a non-bundled library schema version.

Comment thread hed/schema/schema_version_manifest.py Outdated
Comment thread hed/schema/hed_cache.py Outdated

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

@VisLab
VisLab merged commit 9004367 into hed-standard:main Jul 17, 2026
18 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