python-template icon indicating copy to clipboard operation
python-template copied to clipboard

copier update does not update pyproject.toml

Open lyashevska opened this issue 1 year ago • 3 comments

Checklist before submitting a bug report

  • [x] I have checked the existing issues and couldn't find an issue about this bug.

Bug details

Describe the bug

I create a minimum version of package, which I then update with 'copier update' and make some changes (e.g. version, email). Because pyproject.toml is listed under _skip_if_exists it is rightfully skipped. As a result, those values are not updated. I do not think this is a desired behaviour.

https://github.com/NLeSC/python-template/blob/cd751a0973a4e591ea8533a2b376a566039705bd/copier/settings.yml#L6

To Reproduce

Steps to reproduce the behavior:

  1. install copier using '...'
  2. run copier copy ...
  3. Select Minimum profile
  4. Run 'copier update'
  5. Change version, email
  6. Observe pyproject.toml file

Error Message

pyproject.toml is not updated after 'copier update'

Expected behavior

We want to update it. I am not aware of other reasons why it should be under _skip_if_exist

Desktop (please complete the following information):

  • Template profile
    • [ ] recommended
    • [x] minimum
    • [ ] let me choose

lyashevska avatar Aug 30 '24 09:08 lyashevska

Btw same applies to CITATION.cff and LICENCE. If user changes those, they wont't change.

lyashevska avatar Aug 30 '24 09:08 lyashevska

this is expected because we skip these files in https://github.com/NLeSC/python-template/blob/cd751a0973a4e591ea8533a2b376a566039705bd/copier/settings.yml#L5

Do you suggest updating the settings?

fdiblen avatar Aug 30 '24 09:08 fdiblen

Yes, I suggest removing it from there. It was expected, but undesired. Unless there is another reason to keep it?

lyashevska avatar Aug 30 '24 09:08 lyashevska