Skip to content

Added repo data check to reduce github access#1352

Merged
VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:streamline_cache
Jul 11, 2026
Merged

Added repo data check to reduce github access#1352
VisLab merged 3 commits into
hed-standard:mainfrom
VisLab:streamline_cache

Conversation

@VisLab

@VisLab VisLab commented Jul 11, 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 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_interval option 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.

Comment thread hed/schema/hed_cache.py
Comment thread hed/schema/hed_cache.py
Comment thread tests/schema/test_hed_schema_io.py
Comment thread tests/schema/test_hed_schema_io.py Outdated
Comment thread tests/schema/test_hed_schema_io.py
@VisLab VisLab merged commit 08962d5 into hed-standard:main Jul 11, 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