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

Add package_adder argument to assemble() #3034 #3035

Merged
merged 2 commits into from
Aug 2, 2022

Conversation

JonoYang
Copy link
Member

This PR adds a new argument, package_adder, to the DatafileHandler.assemble() method and to its subclassed variants as well. This is done to address the issues of running the different assemble() methods in a context outside of scancode-toolkit, see #3034 and aboutcode-org/scancode.io#476.

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.

Very nicely done! Clean and neat... one minor nitpicking: what about adding a test on one assemble function that passes a custom adder to validate the behaviour?
This would be nice... but this is good to merge as it is anyway.

@pombredanne
Copy link
Member

We still need a CHANGELOG entry too.

@JonoYang
Copy link
Member Author

JonoYang commented Aug 1, 2022

@pombredanne Thanks for the review! I've added a new test where I run get_package_and_deps with a custom package adder and updated the changelog.

    * Add test for add_to_package

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!

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