-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow user to choose from click and argparse #10
Comments
Sounds fine to make argparse the default CLI library, I have no strong preference. Lets keep Click as an option because some people strongly prefer it and we don't need to make a judgment. It should not be a problem to have Click as a non-stdlib dependency as it is frequently a dependency of other libraries anyway. Let's keep |
Since having the If so, I agree on doing that. |
Yes, I would say make it three options: argparse (default, creates cli.py
with stub argparse-base cli), click, and none (does not create cli.py)
…On Thu, Sep 20, 2018 at 14:15 Carles Sala ***@***.***> wrote:
Since having the cli.py is optional, I agree on keeping it.
Regarding argparse vs click, do you mean making it a new cookiecutter
optional?
If so, I agree on doing that.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFOFRtbekQJ9pMB24jO5awnQft20ZLtwks5uc9tBgaJpZM4WtvV2>
.
|
Look into the usage of |
We propose to add a We also are considering two options:
In the course of considering these options, we are surveying existing OSS projects to see which conventions are widely used and evaluating the evidence for and against. |
This is arguably a subjective preference, but I would advocate against using Click, in favor of argparse.
Among other things, the main reason is that for Click to work, the code needs to be prepared for that.
On the contrary, argparse can be used to call any function, even if it was previously not prepared to be run directly from the command line interface.
Another reason is that argparse does not introduce any third party dependency, as it is part of stdlib, while click does.
Further details of this discussion can be seen here: https://medium.com/@collectiveacuity/argparse-vs-click-227f53f023dc
Another option would be to remove the
cli.py
module from this template altogether, as most of the projects end up implementing the CLI commands somewhere else anyway.The text was updated successfully, but these errors were encountered: