-
Notifications
You must be signed in to change notification settings - Fork 117
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 README for Copier v8 compatibility #391
base: main
Are you sure you want to change the base?
Conversation
Isn't better to adapt templates to a "safe" syntax? |
Probably. To be honest, I didn't look into it and wouldn't know how, and since the project heavily relies on all three of "Jinja extensions, Migrations and Tasks", I assumed it would require a heavy heavy refactor at the very least. |
@yajo as you know both pieces. Are there too many changes to do? |
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.
You can bump this too if you want, to avoid a warning. But that doesn't affect the rest of the template:
doodba-copier-template/copier.yml
Line 13 in 9e48836
_min_copier_version: "7.0.1" |
Unsafe features here are tasks and migrations. But migrations only block updates that actually use them, so the surface of unsafety is lower. You can remove all tasks and then you won't require --UNSAFE
in most cases: https://github.com/Tecnativa/doodba-copier-template/blob/9e48836230b19afc25103776f86077b3c5037b40/copier.yml#L43C1-L45
However that can impact the UX of the template, so it's up to you to decide what you prefer.
FWIW in the next release there'll be a --trust
flag that is equivalent to --UNSAFE
. Some people will prefer it because it's less scary. But that's not released yet.
README.md
Outdated
``` | ||
|
||
Copier will ask you all questions again, but default values will be those you answered | ||
last time. Just hit <kbd>Enter</kbd> to accept those defaults, or change them if | ||
needed... or you can use `copier --force update` instead to avoid answering again all | ||
things. | ||
needed... or you can use `copier --force update --UNSAFE` instead to avoid answering |
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.
In copier 8+, all flags are after the subcommand. This has changed for ergonomy, and because there's a new subcommand that required a different set of flags.
Thus, this has changed too:
needed... or you can use `copier --force update --UNSAFE` instead to avoid answering | |
needed... or you can use `copier update --UNSAFE --force` instead to avoid answering |
README.md
Outdated
``` | ||
|
||
Copier will ask you a lot of questions. Answer them to properly generate the template. | ||
|
||
The `--UNSAFE` flag is necessary since | ||
[Copier v8](https://copier.readthedocs.io/en/latest/configuring/#unsafe) to use features |
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 think most people will use stable copier releases:
[Copier v8](https://copier.readthedocs.io/en/latest/configuring/#unsafe) to use features | |
[Copier v8](https://copier.readthedocs.io/en/stable/configuring/#unsafe) to use features |
Should I continue simply updating the documentation, or make the necessary changes so that it doesn't use "unsafe" features anymore? |
I updated here the tests/copier template to use copier 8.0.0: #390 |
Nice work! That matches the documentation update I was suggesting. |
2019ed3
to
89afec5
Compare
Simple documentation update