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

Should we mandate cruft or provide it as a option? #36

Open
ESKYoung opened this issue Jul 9, 2021 · 2 comments
Open

Should we mandate cruft or provide it as a option? #36

ESKYoung opened this issue Jul 9, 2021 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@ESKYoung
Copy link
Collaborator

ESKYoung commented Jul 9, 2021

cruft is a Python package that lets you update projects built from a cookiecutter to the cookiecutter's latest version.

In the next release (see PR #33), we'll be supplying some barebones instructions in README.md on how to implement it after your first commit. However, this requires repeating the prompt entries you just made to get it up and running.

However, you can call cruft directly from command line (once you have it installed). It produces the same prompts as cookiecutter, but also creates the necessary cruft files. Note there are limited install options (i.e. in a Python virtual environment), whereas cookiecutter can be installed system-wide.

An alternative is to create a Jinja templated version of cruft.json so that it's present in all generated projects, and then up to the user to decide if they want to use it.

Thoughts welcome!

@ESKYoung ESKYoung added enhancement New feature or request question Further information is requested labels Jul 9, 2021
@ESKYoung ESKYoung changed the title Should we mandate cruft Should we mandate cruft or provide it as a option? Jul 9, 2021
@ESKYoung
Copy link
Collaborator Author

ESKYoung commented Jul 19, 2021

I had a think around creating a templated version of .cruft.json, but realised a few issues. We can't (easily) get the commit hash the user AFAIK without adding a dependency (see this issue on cookiecutter, for example).

I'm against doing this, as cookiecutter can be installed in many ways (Homebrew, APT, pip), but adding a dependency would limit these options. Of course if we mandate cruft, we would be reducing the installation options in any case.

We could hack a workaround, but it wouldn't be universal, given users can define the commit or branch to use when they call cookiecutter.

Grateful for thoughts.

@ESKYoung
Copy link
Collaborator Author

ESKYoung commented Sep 21, 2021

To note — seems cruft has now been added to Homebrew so (for MacOS and Linux users at least), you should be able to system-wide install it! 🎉

Homebrew formula: https://formulae.brew.sh/formula/cruft#default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant