-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add support for executing cookiecutter using -m or from a checkout/zip file #788
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
Conversation
Current coverage is 100% (diff: 100%)@@ master #788 diff @@
====================================
Files 14 15 +1
Lines 599 601 +2
Methods 0 0
Messages 0 0
Branches 0 0
====================================
+ Hits 599 601 +2
Misses 0 0
Partials 0 0
|
Thank you for submitting a PR @brettcannon! 🙇 It looks like click shows a wrong command name: $ python -m cookiecutter
Usage: __main__.py [OPTIONS] TEMPLATE [EXTRA_CONTEXT]...
Error: Missing argument "template". $ python -m cookiecutter --help
Usage: __main__.py [OPTIONS] TEMPLATE [EXTRA_CONTEXT]...
Create a project from a Cookiecutter project template (TEMPLATE). I'm looking into click right now to see if there is a way to set this rather than compute the name automatically: |
Coverage dropped to |
|
||
|
||
if __name__ == "__main__": | ||
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.
The click help message issue seems to be fixed when this is changed to:
if __name__ == "__main__":
main(prog_name='cookiecutter')
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.
cookiecutter [raphael@hackebook cookiecutter (brettcannon-main_submodule)]$ python -m cookiecutter
Usage: cookiecutter [OPTIONS] TEMPLATE [EXTRA_CONTEXT]...
Error: Missing argument "template".
cookiecutter [raphael@hackebook cookiecutter (brettcannon-main_submodule)]$ cookiecutter
Usage: cookiecutter [OPTIONS] TEMPLATE [EXTRA_CONTEXT]...
Error: Missing argument "template".
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.
Thanks for figuring that out! Fixed in latest commit.
Coverage should now be fixed as I marked the |
LGTM 👍 |
Thanks again @brettcannon! 😃 |
Welcome! Glad I could help out in my own little way. :) |
With this change you gain at least three ways to execute cookiecutter:
python -m cookiecutter
python .
python cookiecutter.zip
Closes #787