-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added CLI wrapper #366
base: main
Are you sure you want to change the base?
Added CLI wrapper #366
Conversation
|
1 similar comment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not convinced about the need/usage, but why not. Though there's no test so I'm a bit reluctant to merge that.
@@ -8,5 +8,6 @@ AUTHORS | |||
ChangeLog | |||
.eggs/ | |||
doc/_build | |||
venv/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
@@ -0,0 +1,3 @@ | |||
#!/usr/bin/env python3 | |||
from tenacity.__main__ import main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use console scripts
@@ -18,4 +18,5 @@ | |||
setuptools.setup( | |||
setup_requires=["setuptools_scm"], | |||
use_scm_version=True, | |||
scripts=["bin/tenacity"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use console scripts
dest="ignore_codes", | ||
action="append", | ||
type=int, | ||
help="Status code that should be ignored. This argument can be called multiple times.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
help="Status code that should be ignored. This argument can be called multiple times.", | |
help="Non-zero status code that should be ignored. This argument can be called multiple times.", |
This seems like a nice feature! Worth mentioning in the release notes, and would be good to have some test coverage. |
Tenacity can now be used as a CLI app to retry shell scripts or apps!
Closes #279
It's not yet complete, some of the advanced functions are left (such as exponential and random wait functions, thinking of a good way to implement those). A changelog is left too, but I wanted your reviews first on whether this is a good change, and if I am following the proper styling/coding guidelines or not.