Skip to content

Simplify schema version caching to manifest-first - #1362

Merged
VisLab merged 4 commits into
hed-standard:mainfrom
VisLab:cache_rework
Jul 18, 2026
Merged

Simplify schema version caching to manifest-first#1362
VisLab merged 4 commits into
hed-standard:mainfrom
VisLab:cache_rework

Conversation

@VisLab

@VisLab VisLab commented Jul 18, 2026

Copy link
Copy Markdown
Member

Follows up the manifest fast path by removing the now-redundant directory-scoped commit-SHA gating from the REST fallback. The manifest is the primary version-discovery path; the fallback is now a plain ETag-cached crawl used only for custom URLs or when the manifest can't be read. Also drops the repo_check_interval parameter (its only purpose was the gating). Net −373 lines; tests/docs/CHANGELOG updated.

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 simplifies HED schema version discovery by making the repo-level schema_versions.json manifest the primary path, and by removing the directory-scoped commit-SHA “gating” from the REST API fallback (including dropping the now-redundant repo_check_interval parameter). This reduces complexity in hed_cache.get_available_hed_versions() while keeping a plain ETag-cached crawl as a fallback for custom URLs or manifest failures.

Changes:

  • Removed directory-level commit-SHA gating (and related cache keys/constants) from the REST fallback and dropped the repo_check_interval argument.
  • Updated get_available_hed_versions() documentation to describe the manifest-first behavior and the REST fallback behavior.
  • Updated tests/docs/changelog to reflect the new caching/version-discovery approach.

Reviewed changes

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

Show a summary per file
File Description
tests/schema/test_hed_schema_io.py Removes tests tied to commit-SHA gating/repo_check_interval and updates expectations around cached URLs.
hed/schema/hed_cache.py Removes commit-SHA gating logic and repo_check_interval; uses manifest-first discovery with ETag/time throttling via cache_time_threshold.
hed/schema/init.py Updates module docstring to reflect manifest-first listing behavior.
docs/user_guide.md Updates user guide caching section to describe manifest-first behavior and REST fallback tiers; removes repo_check_interval example.
CHANGELOG.md Updates release date and describes manifest-first discovery and fallback behavior changes.

Comment thread hed/schema/__init__.py
Comment thread CHANGELOG.md
@VisLab
VisLab merged commit 46a8669 into hed-standard:main Jul 18, 2026
18 checks passed
@VisLab
VisLab deleted the cache_rework branch July 18, 2026 17:12
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