pyup icon indicating copy to clipboard operation
pyup copied to clipboard

Extra dot in requirements file detected twice and not updated

Open browniebroke opened this issue 5 years ago • 4 comments

I have an issue with PyUP on Cookiecutter Django project. This is a project template for Cookiecutter to quickly generate boilerplate for a Django project

We have 4 requirements file:

  • One at the top of the project: requirements.txt
  • 3 in the project template under {{cookiecutter.project_slug}}/requirements:
    • base.txt
    • local.txt
    • production.txt

We're receiving updates for all of them except base.txt, and I can't really understand why.

When looking at the PyUP dashboard, I can see the file is detected twice, with a dot in the name:

  1. {{cookiecutter.project_slug}}/requirements/./base.txt
  2. {{cookiecutter.project_slug}}/requirements/base.txt

Somehow, I assume this is preventing the update from arriving...?

I've tried to add them to the config file, or click "reload" in the dashboard, but the problem persists.

browniebroke avatar Jul 04 '20 15:07 browniebroke

@browniebroke thank you for this catch. This is an unusual bug causing strange behavior. I added it to the list of bugfixes.

lf1up avatar Jul 17 '20 14:07 lf1up

Just adding here a new piece of info I've just discovered in case it helps. Pyup creates the branches to run the updates, but doesn't open a pull reques:

https://github.com/pydanny/cookiecutter-django/branches/all

image

browniebroke avatar Jul 24 '20 16:07 browniebroke

I tracked it down to this recursive call to add_requirement_file:

https://github.com/pyupio/pyup/blob/6fb86387f58c5a345d7c44ebdbb02a6a1d1ba07d/pyup/bot.py#L519

Which doesn't play nice with our production.txt and local.txt including the base requirements with a relative path: -r ./base.txt

https://github.com/pydanny/cookiecutter-django/blob/3dedd4dd4b55254a0fe6ef272c70c0a54c5e5188/%7B%7Bcookiecutter.project_slug%7D%7D/requirements/production.txt#L3

browniebroke avatar Jul 24 '20 16:07 browniebroke

Changed the -r ./base.txt to -r base.txt fixed it, all good on my end now!

Do you want to keep this issue open to improve how you deal with this use case?

browniebroke avatar Jul 24 '20 17:07 browniebroke