feat: support async#345
Merged
Merged
Conversation
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
27c90d1 to
2c19a61
Compare
henryiii
commented
Apr 2, 2026
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
cf0785f to
98b8fd1
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds async-capable file prefetching for GitHub-backed repositories (GHPath) to reduce repeated network fetches and improve responsiveness, exposing the feature via a new repo_review.prefetch_files entry-point group and documenting the behavior/limitations (notably Python 3.11+).
Changes:
- Introduces
GHPathasync fetching (open_url_async), a shared fetch cache,prefetch(), and a newglob()helper to expand prefetch patterns. - Adds
repo_review.filesmodule to collect prefetch entry points and prefetch matching files concurrently (Python 3.11+). - Wires prefetching into the CLI, adds tests, docs, and packaging metadata for the new entry points / optional deps.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_async_ghpath.py | Adds tests for async constructor and prefetch cache population. |
| src/repo_review/processor.py | Adjusts collect_all default handling (root=None) and documents process(..., collected=...). |
| src/repo_review/ghpath.py | Adds async URL fetching, caching, prefetch, and globbing support to GHPath. |
| src/repo_review/files.py | New module to collect prefetch entry points and run concurrent prefetch tasks. |
| src/repo_review/_compat/typing.py | Exposes Self from typing/typing_extensions for compatibility. |
| src/repo_review/main.py | Invokes prefetching for GHPath inputs when async support is available. |
| pyproject.toml | Registers new entry points and adds async/test dependencies & lint env feature. |
| docs/index.md | Adds files to the docs navigation. |
| docs/files.md | Documents prefetch entry points and behavior. |
| docs/api/repo_review.rst | Adds API docs for repo_review.files. |
| .pre-commit-config.yaml | Adds httpx to mypy hook deps so type checking can see it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
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.
Async support for file prefetching.