Add Download Control Functionality (Pause/Resume/Cancel) Issue#53#56
Merged
Einswilli merged 4 commits intoAllDotPy:masterfrom Oct 6, 2025
Merged
Add Download Control Functionality (Pause/Resume/Cancel) Issue#53#56Einswilli merged 4 commits intoAllDotPy:masterfrom
Einswilli merged 4 commits intoAllDotPy:masterfrom
Conversation
added 4 commits
October 6, 2025 23:32
- Add verbose parameter to GitHubDownloader constructor with default False - Configure logger to use DEBUG level when verbose=True, INFO otherwise - Pass verbose flag through to DownloadRequest for downstream logging - Update logger output to stderr instead of stdout for proper separation - Update constructor docstring with verbose parameter documentation Closes AllDotPy#51
- Remove redundant if self.verbose checks before logger.debug calls - Logger level filtering handles this automatically - Remove unnecessary __main__ block from test file Addresses maintainer feedback in PR review
- Add cancel_current_download() method for stopping active downloads - Add pause_current_download() async method for pausing downloads - Add resume_current_download() async method for resuming paused downloads - Add comprehensive test suite for download control operations - Support workflow: start -> pause -> resume -> cancel - Return DownloadResult with appropriate status or None if no active download Closes AllDotPy#53
Einswilli
approved these changes
Oct 6, 2025
Contributor
Einswilli
left a comment
There was a problem hiding this comment.
Simple and clean!
Thanks!
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.
📋 Summary
This PR adds comprehensive download control functionality to the GitHubDownloader Python API, enabling users to pause, resume, and cancel active downloads. This provides better control over long-running download operations and improves the overall user experience.
🔗 Related Issue
Closes #53 - Add download control functionality
🚀 Changes Made
✨ New Features
📝 Usage Examples
Basic Control Operations
Complete Workflow
🧪 Testing
Test Coverage
✅ 11 comprehensive tests covering all control scenarios
✅ Success and edge cases for each operation
✅ Complete workflow testing (pause -> resume -> cancel)
✅ Async operation testing with proper mocking