pyup icon indicating copy to clipboard operation
pyup copied to clipboard

Normalizing path of requirement files

Open ckleemann opened this issue 5 years ago • 1 comments

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 avatar Apr 08 '21 14:04 ckleemann

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.

codecov[bot] avatar Apr 08 '21 14:04 codecov[bot]