Skip to content

Separate Package parsing functions#3135

Merged
pombredanne merged 5 commits into
developfrom
packagecode-updates
Oct 28, 2022
Merged

Separate Package parsing functions#3135
pombredanne merged 5 commits into
developfrom
packagecode-updates

Conversation

@JonoYang

Copy link
Copy Markdown
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>

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

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