refactor: remove depends_on fields from heuristics and handle skips in problog #1133
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.
Summary
The purpose of this PR is to address #1052, and implement appropriate skip and error handling in all existing heuristics. This PR removes the
depends_on
field from heuristics and makes it a responsibility of the heuristic code to determine if it should be skipped or not. All skip handling is then done my the ProbLog logic.Description of changes
The
BaseHeuristicAnalyzer
no longer has thedepends_on
field, and this has propagated to all other analyzers. The description for aSKIP
result has been updated in line with issue #1052, andHeuristicAnalyzerValueError
s have replaced someSKIP
results previously used when malformed data was encountered. Unit tests have been updated accordingly.Some refactoring to the
test_pypi_sourcecode_analyzer.py
unit tests have also been done in this PR to address #1108, adding in temporary.ini
config files to the unit tests as opposed to the existing mock objects.Related issues
Closes #1052 and #1108.
Blockers
Currently blocked by #1147, as this is treated as a
HeuristicAnalyzerValueError
in this PR and causes integration tests to fail.Checklist
verified
label should appear next to all of your commits on GitHub.