Added repo data check to reduce github access#1352
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a directory-level “repo data check” gate to hed.schema.hed_cache.get_available_hed_versions() to reduce GitHub API traffic by skipping per-folder crawls when standard_schema/ or library_schemas/ hasn’t changed since the last crawl.
Changes:
- Added path-scoped “latest commit SHA” gate checks (standard vs library) plus a
repo_check_intervaloption to reduce how often those gates are queried. - Added integration tests validating the new gating behavior using live GitHub responses (no mocking).
- Added user-guide documentation describing schema/listing caching behavior and rate-limit mitigation options.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
hed/schema/hed_cache.py |
Adds path-scoped commit-SHA gate checks and repo_check_interval to avoid unnecessary per-folder crawls. |
tests/schema/test_hed_schema_io.py |
Adds tests for the new gating behavior and cache effects. |
docs/user_guide.md |
Documents schema caching, listing behavior, and rate-limit mitigation guidance. |
.context/plan.md |
Updates plan history entry. |
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.