Skip to content
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

Separate Package parsing functions #3135

Merged
merged 5 commits into from
Oct 28, 2022
Merged

Separate Package parsing functions #3135

merged 5 commits into from
Oct 28, 2022

Conversation

JonoYang
Copy link
Member

This PR updates some code in packagecode for use outside of scancode toolkit. Currently, our package handlers return a generator of PackageData objects when we parse a manifest file. I would like to use the code to get the package object itself, rather than the generator. I've updated the code for the freebsd, haxe, maven, and npm parsers such that the parse method functionality is separated: the parse function for the freebsd, haxe, maven, and npm parsers now yields from another function named _parse, which returns a single PackageData object for a given manifest.

JonoYang and others added 5 commits October 20, 2022 17:40
    * We would like to have a way to get PackageData objects from different manifest data without using generator from the DatafileHandler.parse() method
    * Update get_urls for several packages to accept arbitrary keyword arguments

Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
    * Update CHANGELOG.rst

Signed-off-by: Jono Yang <jyang@nexb.com>
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks! Merging

@pombredanne pombredanne merged commit 217d979 into develop Oct 28, 2022
@pombredanne pombredanne deleted the packagecode-updates branch October 28, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants