Repository navigation
Add CLI Retry Parameters and Improve Test Script Structure - #539
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #539 +/- ##
=======================================
Coverage 94.36% 94.36%
=======================================
Files 72 72
Lines 3339 3339
=======================================
Hits 3151 3151
Misses 188 188 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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 global
--max-retriesand--retry-waitoptions to the CLI and refactors the test script to use variables for better maintainability.Features Added
CLI Retry Parameters
--max-retries: Maximum number of retry attempts for transient errors (HTTP 429, 5xx, timeouts, connection errors). Default:3--retry-wait: Base wait time in seconds between retries using exponential backoff. Default:1.0Test Script Improvements
RETRY_PARAMSandUV_CMDvariables in test_cli.shChanges Made
Core CLI Implementation
_common_optionsin wikipediaapi/commands/base.pyDocumentation
Test Infrastructure
--max-retries 10 --retry-wait 5images_nonexistenttestUsage Examples
Benefits
Testing
Files Changed
wikipediaapi/commands/*.py- Updated all command functionsThis improvement makes the CLI more robust for production use while significantly improving the maintainability of the test infrastructure.