fix: prevent exiting the loop when one package dep_credit
is too small
#55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #54.
Currently when processing a dependency list file, if a package with a
dep_credit
belowmin_credit
has higher precedence over the other packages in the list, the code logic would exit the loop and prevent looking into the dependencies of the rest of the packages in the list.Consider a
requirements.txt
file with two dependencies,pandas
andrequests
, ifpandas
, which has adep_credit
smaller than the defaultmin_credit
(0.01), is put on higher precedence overrequests
, the code would not generate dependencies forrequests
, which has adep_credit
bigger than 0.01.The code should continue looking into the dependencies of
requests
despitepandas
having a smalldep_credit
. The code should also generate the same dependency output regardless of the order of packages in the dependency list.This PR changes the logic, instead of exiting the loop, the code will jump to look into dependencies of the rest of the packages in
next_nodes
. It also fixes type errors when parsing--max-depth
and--max-deps
arguments by adding type converters for the arguments in the command line.