Skip to content

Add new argument package_adder to DatafileHandler.assemble() #3034

Description

@JonoYang

We want to reuse the code from the assembly() method of the different PackageHandlers in scancode.io, and the current method of associating Packages to Resources (in the assembly() methods), where we append package_uid to resource.for_packages, does not work there. We need to be able to pass in a function that performs the Package - Resource association, so we can use the assembly() methods in different contexts.

The package_adder argument is a function that takes in a package_uid, resource, and codebase. It is used in places where we want to associate a Resource to a Package using the package_uid.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions