-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove unwanted files dependencies #176
base: develop
Are you sure you want to change the base?
remove unwanted files dependencies #176
Conversation
Signed-off-by: Pratik Dey <[email protected]>
Signed-off-by: Pratik Dey <[email protected]>
tests/test_deltacode.py
Outdated
@@ -422,6 +422,7 @@ def test_Delta_create_object_removed(self): | |||
assert 'removed' in delta.factors | |||
assert delta.score == 0 | |||
|
|||
@pytest.mark.xfail(reason='Tests no longer required having None paths') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping it xfail for now as these test it requires File
models and since it is just one line in the File
I thought it would be quite trivial to mae a separate .json
object to scan it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are removing the File object, I think we can just remove these tests, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can !
class ScanException(Exception): | ||
""" | ||
Named exception for JSON file (1) containing no 'scancode_version' | ||
attribute, (2) containing old version of ScanCode, or (3) containing no | ||
'scancode_options'/'--info' attribute. | ||
""" | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually they are inbuilt in VirtualCodebase
so i felt they might not be needed
tests/test_deltacode.py
Outdated
@@ -422,6 +422,7 @@ def test_Delta_create_object_removed(self): | |||
assert 'removed' in delta.factors | |||
assert delta.score == 0 | |||
|
|||
@pytest.mark.xfail(reason='Tests no longer required having None paths') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are removing the File object, I think we can just remove these tests, right?
src/deltacode/cli.py
Outdated
@@ -48,7 +48,7 @@ def write_json(deltacode, outfile, all_delta_types=False): | |||
# ('old_scan_options', deltacode.old_scan_options), | |||
('deltacode_options', deltacode.options), | |||
('deltacode_version', __version__), | |||
('deltacode_errors', collect_errors(deltacode)), | |||
('deltacode_errors', []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have this?
Signed-off-by: Pratik Dey <[email protected]>
Signed-off-by: Pratik Dey <[email protected]>
Updated! |
self._populate(new_path, old_path) | ||
|
||
self.new_scan_options = [] | ||
self.old_scan_options = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget where we stand on this, but if the VirtualCodebase objects contain this information, I do not see the value of our DeltaCode object containing it as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VirtualCodebase is actually having all the resources but Delta objects will only contains only the respective deltas
remove unwanted files dependencies
Signed-off-by: Pratik Dey [email protected]