fossology-python icon indicating copy to clipboard operation
fossology-python copied to clipboard

Question: Is there a bulk text match API?

Open goneall opened this issue 2 years ago • 7 comments

I'm working on migrating an app from using fossdriver to this fossology-python.

I've worked out most of the mapping with the exception of the bulk text match described here.

Is there an equivalent function in this library or API? If not, any advice on how to migrate that feature over?

goneall avatar Aug 04 '23 19:08 goneall

Hi @goneall,

From my understanding of the BulkTextMatch workflow it is meant to interact with scan results and license matches, right?

Unfortunately there is no Rest API endpoints able to perform such tasks (as far as I know). Maybe this needs to be discussed first in Fossology, e.g. in this issue about evolution of the REST API.

/cc @shaheemazmalmmd

deveaud-m avatar Aug 04 '23 20:08 deveaud-m

Thanks @deveaud-m for the quick response.

From my understanding of the BulkTextMatch workflow it is meant to interact with scan results and license matches, right?

That is my understanding as well. This is used in a batch mode in the Linux Foundation Scaffold script and is driven by configuration files. In looking at the fossdriver implementation, it is doing a post to .../repo/?mod=change-license-bulk which doesn't have a corresponding API as far as I can tell.

goneall avatar Aug 04 '23 21:08 goneall

Hey @goneall and @deveaud-m , the endpoints for bulk scans have recently been merged.

You can find the relevant PRs linked in the issue https://github.com/fossology/fossology/issues/2472

The next version of FOSSology will be shipping with these new endpoints.

GMishx avatar Aug 09 '23 10:08 GMishx

the endpoints for bulk scans have recently been merged.

Thanks @GMishx - Looks like one more PR to merge then we'll have what we need to replace the FOSSDriver implementation.

@deveaud-m - let me know if you'd like a PR to add once we have a release candidate for the next release of FOSSOlogy. Python isn't my "native" language, but I can make an attempt at a PR if it helps.

goneall avatar Aug 09 '23 17:08 goneall

@deveaud-m - let me know if you'd like a PR to add once we have a release candidate for the next release of FOSSOlogy. Python isn't my "native" language, but I can make an attempt at a PR if it helps.

I just released a new version supporting Fossology 4.2.1 today and there are still some endpoints not yet supported in this library for Fossology version 4.3.0 (see #52).

I'm a bit late but this is not a blocker, we can start working on integrating all the license clearing endpoints even if there are not released in Fossology yet so feel free to open a PR (note that I'll be on vacation until end of the month).

deveaud-m avatar Aug 09 '23 20:08 deveaud-m

@goneall does this endpoint provides the functionality you need: https://fossology.github.io/fossology-python/items.html#fossology.items.Items.schedule_bulk_scan?

deveaud-m avatar Feb 15 '24 21:02 deveaud-m

@goneall does this endpoint provides the functionality you need: https://fossology.github.io/fossology-python/items.html#fossology.items.Items.schedule_bulk_scan?

Yes - this should work. Thanks @deveaud-m

goneall avatar Feb 15 '24 23:02 goneall