Simplify schema version caching to manifest-first - #1362
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_intervalargument. - 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. |
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.
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.