pyupio / pyup

A tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
https://pyup.io
MIT License
454 stars 67 forks source link

Normalizing path of requirement files #406

Open ckleemann opened 3 years ago

ckleemann commented 3 years ago

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.

codecov[bot] commented 3 years ago

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%) :arrow_up:

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.