-
Notifications
You must be signed in to change notification settings - Fork 84
simplified usage of cookiecutter variables using derived variables #158
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
Merged
Conversation
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
jspaaks
commented
Apr 15, 2021
jspaaks
commented
Apr 15, 2021
jspaaks
commented
Apr 15, 2021
jspaaks
commented
Apr 15, 2021
Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
fdiblen
reviewed
Apr 19, 2021
Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
fdiblen
reviewed
Apr 19, 2021
Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
fdiblen
reviewed
Apr 19, 2021
Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
fdiblen
reviewed
Apr 19, 2021
Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
fdiblen
reviewed
Apr 19, 2021
Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
fdiblen
reviewed
Apr 19, 2021
Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
jspaaks
commented
Apr 19, 2021
jspaaks
commented
Apr 19, 2021
fdiblen
reviewed
Apr 19, 2021
…e.py Co-authored-by: Faruk D. <fdiblen@users.noreply.github.com>
fdiblen
approved these changes
Apr 19, 2021
Member
fdiblen
left a 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.
I had a big relief after reviewing and approving this PR. 🍬
Author
|
Thank you Faruk for the review and your code contributions! |
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.
In this PR:
MY python Projectbecomesmy-python-projectproject_short_descriptiontopackage_short_descriptionproject_slugtopackage_nameopen_source_licenseto justlicensemy_module.py(i.e. without any templating)Refs: #152
Works except for the top level directory
for some reasonbecause cookiecutter first creates the top level directory, then runs thehooks/pre_gen_project.pyhook. That means any updates you do to theproject_namefrom thepre_gen_projecthook come too late. This might be fixable by adding a post hook that renames the directory afterwards. But anyway, this behavior is not worse than what we had before.To test (assuming you have cookiecutter already installed in user space):
Here is the tree after running cookiecutter with the defaults:
Now check the generated package: