-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement for_packages_append
on Resource
#43
Comments
re:
This can work. An alternative could be use a new Codebase argument that would be the Resource class to use... today this class is crafted based on the provided attributes commoncode/src/commoncode/resource.py Line 402 in d3eed9a
Another possibility could be to add and pass a |
I like this approach better than the one I posted before. It makes more sense to pass in the package adding function as an argument into |
This has been implemented and merged in nexB/scancode-toolkit#3035 |
We are updating the application package scanning process on scancode.io in nexB/scancode.io#447. We are implementing the package assembly step from scancode-toolkit in scancode.io. The assembly methods from packagedcode associates Resources to packages by appending the
package_uid
to thefor_packages
attribute on Resources. This method of associating Resources to Packages does not work on scancode.io becausefor_packages
is an property onCodebaseResource
that generates a list of purls fromDiscoveredPackage
s associated with aCodebaseResource
.A solution would be to create a method on the
Resource
class namedfor_packages_append
that appends apackage_uid
toResource.for_packages
. This extra level of indirection allows us to create a different implementation onCodebaseResource
for associating Packages to Resources using the same interface.The text was updated successfully, but these errors were encountered: