add spinner and progress - #3
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Transfer label timing and focused callback tests remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds TTY-aware progress spinners for transfers while preserving stdout behavior for scripts.
Changes:
- Adds and locks the
yaspindependency. - Integrates progress callbacks into uploads, downloads, and deletes.
- Updates tests and documentation for spinner and compatibility behavior.
File summaries
| File | Summary | Review notes |
|---|---|---|
uv.lock |
Locks new dependencies. | — |
tests/unit/test_progress.py |
Tests spinner behavior. | — |
tests/integration/test_push.py |
Updates upload mocking. | — |
tests/integration/test_entrypoint.py |
Tests TTY output separation. | — |
src/gitftp/transfer.py |
Adds transfer completion callbacks. | Nit (1 vote): Update the current-file label before transfer. Nit (2 votes): Add serial and parallel callback coverage. |
src/gitftp/progress.py |
Implements spinner handling. | — |
src/gitftp/mirror.py |
Adds download progress. | — |
src/gitftp/deploy.py |
Adds upload/delete progress. | — |
README.md |
Documents spinner behavior. | — |
pyproject.toml |
Adds dependency and typing configuration. | — |
COMPATIBILITY.md |
Documents compatibility behavior. | — |
Review details
Suppressed comments (1)
src/gitftp/transfer.py:238
on_doneis invoked only afterfut.result()completes, soProgress.advancereceives the last completed file rather than the file currently being transferred. During the next transfer (especially with parallel workers), the spinner therefore shows a stale label or no label, contrary to the documented current-file display. Add a separate start/progress callback, or otherwise update the label before invokingfn, while keeping completion counting inon_done.
if on_done is not None and not isinstance(result, _Skipped):
on_done(label(items[idx]))
- Files reviewed: 11/12 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+155
to
156
| on_done: Callable[[str], None] | None = None, | ||
| ) -> list[R | TransferError | _Skipped]: |
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.