-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add base pipeline for importers and migrate PyPa importer to aboutcode pipeline #1559
Conversation
keshav-space
commented
Aug 20, 2024
- Reference: Use the SCIO Pipeline Mechanism for Importers/Improvers #1509
1364361
to
567f1ec
Compare
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.
Thank. Some nits for your consideration!
|
||
def advisories_count(self): | ||
vulns_path = Path(self.vcs_response.dest_dir) / "vulns" | ||
return sum(1 for _ in vulns_path.rglob("*.yaml")) |
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.
What about this too? or is this to avoid using too much memory?
return sum(1 for _ in vulns_path.rglob("*.yaml")) | |
return len(list(vulns_path.rglob("*.yaml"))) |
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, did that to avoid keeping all the Path objects in memory at the same time.
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
567f1ec
to
d73cfd4
Compare
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.
LGTM!