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 README for Copier v8 compatibility #391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aleuffre
Copy link

Simple documentation update

@pedrobaeza
Copy link
Member

Isn't better to adapt templates to a "safe" syntax?

@aleuffre
Copy link
Author

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.

@pedrobaeza
Copy link
Member

@yajo as you know both pieces. Are there too many changes to do?

Copy link
Contributor

@yajo yajo left a 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:

_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
Copy link
Contributor

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:

Suggested change
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
Copy link
Contributor

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:

Suggested change
[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

@aleuffre
Copy link
Author

aleuffre commented Jul 3, 2023

Should I continue simply updating the documentation, or make the necessary changes so that it doesn't use "unsafe" features anymore?

@Tardo
Copy link
Contributor

Tardo commented Jul 3, 2023

I updated here the tests/copier template to use copier 8.0.0: #390

@aleuffre
Copy link
Author

aleuffre commented Jul 3, 2023

I updated here the tests/copier template to use copier 8.0.0: #390

Nice work! That matches the documentation update I was suggesting.

@aleuffre aleuffre force-pushed the update-docs-copier branch from 2019ed3 to 89afec5 Compare July 3, 2023 13:05
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 this pull request may close these issues.

4 participants