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

Extra dot in requirements file detected twice and not updated #390

Open
browniebroke opened this issue Jul 4, 2020 · 4 comments
Open

Extra dot in requirements file detected twice and not updated #390

browniebroke opened this issue Jul 4, 2020 · 4 comments
Labels

Comments

@browniebroke
Copy link
Contributor

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.

@lf1up
Copy link
Contributor

lf1up commented Jul 17, 2020

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

@lf1up lf1up added the bug label Jul 17, 2020
@browniebroke
Copy link
Contributor Author

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

I tracked it down to this recursive call to add_requirement_file:

self.add_requirement_file(other_file, sha=sha)

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants