Skip to content
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

Update to cookiecutter 2.02 #1414

Closed
ghoersti opened this issue Mar 11, 2022 · 4 comments · Fixed by #1601
Closed

Update to cookiecutter 2.02 #1414

ghoersti opened this issue Mar 11, 2022 · 4 comments · Fixed by #1601

Comments

@ghoersti
Copy link

Description

Is your feature request related to a problem? A clear and concise description of what the problem is:

I want to be able to use `{{uuid4()}} in cookie cutter prompts. We have a process which requires it to be part of the template.
Cookie cutters Docs say that this functionality is available in 1.73 , but this is not true.
According to this .

I know that the release is not yet stable for cookie cutter 2.0.2, but I just wanted to get transparency that the cookie cutter 1.7.3 features are not actually available until 2.xx namely cookiecutter.extensions.UUIDExtension

Context

Why is this change important to you? How would you use it? How can it benefit other users?
Currently as a stub I am using "{{ random_ascii_string(24) }}" but this is not satisfactory.
We have a script to work around it, but it would be very useful for templates to come out of the box with the ability to have UUID functionality from cookie cutter, without making a custom jinja extension, or custom code.

Possible Implementation

(Optional) Suggest an idea for implementing the addition or change.
Bump to `cookiecutter==2.02' eventually

Possible Alternatives

  • Jinja extension
  • Custom script that does all the stuff prompts.yml would ask for then pass to config kedro new --config myconfig --starter my_starter
  • Its not a stable release so this can likely just be closed, I just wanted to get the awareness out there that it is effecting kedro users in some way.
@antonymilne antonymilne transferred this issue from kedro-org/kedro-starters Apr 5, 2022
@antonymilne
Copy link
Contributor

Hi @ghoersti and thanks for raising this very well written issue. Sorry no one responded before - we don't check issues on kedro-starters so much so I think this was inadvertently missed. I've moved this to the main repo for better visibility, and also because cookiecutter is a core kedro requirement so if we change anything then we would need to bump it on this repo rather than the starters repo.

I'm curious about how you even know about cookiecutter 2.0.2? I see the latest docs on their website are for 2.0.2, but there's not been any release of it on their repo or PyPI. Is it possible to install 2.0.2 somehow already?

@ghoersti
Copy link
Author

ghoersti commented Apr 7, 2022

@AntonyMilneQB Thank you for moving this for visibility! Well you can actually see the docs are out for it here, but I came across some post some where I cant find anymore.

Current cookie master is on 2.0.0 . For usage I just use the plain old.

git clone https://github.com/cookiecutter/cookiecutter.git
pip install -e cookiecutter

I was making a project where it was super important to automate the uniqueness of an instantiated repository, and using {{uuid4}} would have been nice. I am sure pypi and forge will be up to data soon with 2.0.0 currently in master.

@antonymilne
Copy link
Contributor

Cool, thanks for the explanation and the heads up! When it is out on PyPI we can try and bump the requirement and 🤞 it doesn't break anything.

@Enlooo
Copy link

Enlooo commented Apr 27, 2022

Or single command:
pip install --user git+https://github.com/cookiecutter/cookiecutter.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants