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

Normalizing path of requirement files #406

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

Conversation

ckleemann
Copy link
Contributor

A requirements file could contain a relative link to another requirements file. If the link contains a .. it can not be handled by the GitLab api.

A short example:
The file requirements/production.txt contains the following:

-r ../subproject/other_requirements.txt

Pyup adds the file path requirements/../subproject/other_requirements.txt to the list of requirement files. The request to fetch this file from the GitLab api is then responded with an HTTP 400 Error.

By normalizing the file path before it is added this error is resolved. In our example the file path then would be subproject/other_requirements.txt.

@ckleemann ckleemann changed the title normalize path before requirement file is added Normalizing path of requirement files Apr 8, 2021
@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #406 (82576c4) into master (17c2384) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #406   +/-   ##
=======================================
  Coverage   94.24%   94.25%           
=======================================
  Files          11       11           
  Lines        1164     1166    +2     
=======================================
+ Hits         1097     1099    +2     
  Misses         67       67           
Impacted Files Coverage Δ
pyup/bot.py 97.89% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17c2384...82576c4. Read the comment docs.

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.

1 participant