Skip to content

feat: support async#345

Merged
henryiii merged 10 commits into
mainfrom
henryiii/feat/async2
Apr 3, 2026
Merged

feat: support async#345
henryiii merged 10 commits into
mainfrom
henryiii/feat/async2

Conversation

@henryiii

@henryiii henryiii commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

Async support for file prefetching.

  • Needs to handle both package and project dir. we could use the entry point name for that, since it's not used currently.
  • Does nothing on 3.10, should be noted in docs

henryiii and others added 5 commits March 31, 2026 19:38
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]>
@henryiii henryiii force-pushed the henryiii/feat/async2 branch from 27c90d1 to 2c19a61 Compare April 2, 2026 14:18
Comment thread src/repo_review/ghpath.py Outdated

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

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 GHPath async fetching (open_url_async), a shared fetch cache, prefetch(), and a new glob() helper to expand prefetch patterns.
  • Adds repo_review.files module 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.

Comment thread src/repo_review/ghpath.py Outdated
Comment thread src/repo_review/ghpath.py
Comment thread src/repo_review/ghpath.py Outdated
Comment thread src/repo_review/ghpath.py Outdated
Comment thread src/repo_review/files.py
Comment thread src/repo_review/__main__.py Outdated
Comment thread docs/files.md
henryiii and others added 2 commits April 2, 2026 22:39
@henryiii henryiii marked this pull request as ready for review April 3, 2026 03:43
@henryiii henryiii merged commit 2ed0d14 into main Apr 3, 2026
13 checks passed
@henryiii henryiii deleted the henryiii/feat/async2 branch April 3, 2026 03:46
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