fix: prevent exiting the loop when one package dep_credit is too small#55
Merged
vsoch merged 3 commits intovsoch:mainfrom Jan 20, 2025
hykelvinlee42:main
Merged
fix: prevent exiting the loop when one package dep_credit is too small#55vsoch merged 3 commits intovsoch:mainfrom hykelvinlee42:main
dep_credit is too small#55vsoch merged 3 commits intovsoch:mainfrom
hykelvinlee42:main
Conversation
Owner
|
Excellent work! Could you please:
|
Owner
|
The output generates equivalently now regardless of order? |
Contributor
Author
|
Yes, the outputs generated are now consistent regardless of order (I should've mentioned it). Whether it's, pandas
requestsor requests
pandas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_creditbelowmin_credithas 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.txtfile with two dependencies,pandasandrequests, ifpandas, which has adep_creditsmaller than the defaultmin_credit(0.01), is put on higher precedence overrequests, the code would not generate dependencies forrequests, which has adep_creditbigger than 0.01.The code should continue looking into the dependencies of
requestsdespitepandashaving 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-depthand--max-depsarguments by adding type converters for the arguments in the command line.