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

back2source: Report on many d2d projects at once #1524

Open
2 tasks done
Tracked by #1506
pombredanne opened this issue Jan 9, 2025 · 2 comments
Open
2 tasks done
Tracked by #1506

back2source: Report on many d2d projects at once #1524

pombredanne opened this issue Jan 9, 2025 · 2 comments
Assignees

Comments

@pombredanne
Copy link
Member

pombredanne commented Jan 9, 2025

I would like to report on many projects at once.

Given a bunch of "map_deploy_to_devel" projects that share a tag or name pattern, I would like to create a consolidated report across all the projects that will list the issues and problem that need attention in the d2d runs of these projects.

The exact details are exactly these:

I would like to:

I would like this XLSX report would contain these columns:

  • the project name
  • the resource columns from a UI list filtered with resources/?status=requires-review

Later on we could refine that to look like this:
https://github.com/aboutcode-org/back2source-data/blob/main/d2d-summary.csv
but generic

@pombredanne pombredanne changed the title Report on many projects at once: Given a bunch of projects that share a tag or name pattern, I would like to create a consolidated report across all the projects that will list the issues and problem that need attention in the d2d runs of these projects. Report on many d2d projects at once Jan 9, 2025
@pombredanne pombredanne changed the title Report on many d2d projects at once back2source: Report on many d2d projects at once Jan 9, 2025
@tdruez tdruez self-assigned this Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
Signed-off-by: tdruez <[email protected]>
tdruez added a commit that referenced this issue Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
Signed-off-by: tdruez <[email protected]>
tdruez added a commit that referenced this issue Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
tdruez added a commit that referenced this issue Jan 10, 2025
Signed-off-by: tdruez <[email protected]>
@tdruez
Copy link
Contributor

tdruez commented Jan 10, 2025

@pombredanne Current progress is ready to be tested:

  1. Search a label, such as "back2source-Cpp", in the main project search bar
  2. Click the "Select all" checkbox on the top left header column of the table
  3. "Action" drop down on the right side, select the "Report" action
  4. Select the "TODOs" type and click the "Download XLSX" button

-> be patient, it may take a while to build the report (loading screen will be added to prevent the user from clicking elsewhere). You may want to try on a smaller set a project in case of timeout, we will work on an async report generation next but I'd like feedback on the content of the XLSX first.

tdruez added a commit that referenced this issue Jan 13, 2025
tdruez added a commit that referenced this issue Jan 13, 2025
tdruez added a commit that referenced this issue Jan 15, 2025
tdruez added a commit that referenced this issue Jan 16, 2025
tdruez added a commit that referenced this issue Jan 16, 2025
tdruez added a commit that referenced this issue Jan 17, 2025
tdruez added a commit to aboutcode-org/back2source-data that referenced this issue Jan 17, 2025
tdruez added a commit that referenced this issue Jan 17, 2025
tdruez added a commit that referenced this issue Jan 17, 2025
tdruez added a commit that referenced this issue Jan 17, 2025
tdruez added a commit that referenced this issue Jan 17, 2025
tdruez added a commit that referenced this issue Jan 17, 2025
* Add a report management command to generate XLSX reports #1524

Signed-off-by: tdruez <[email protected]>

* Rename "todos" in "todo" in mapping for consistency #1524

Signed-off-by: tdruez <[email protected]>

* Set the proper exclude for the report XLSX outputs #1524

Signed-off-by: tdruez <[email protected]>

---------

Signed-off-by: tdruez <[email protected]>
tdruez added a commit that referenced this issue Jan 17, 2025
tdruez added a commit that referenced this issue Jan 20, 2025
tdruez added a commit that referenced this issue Jan 21, 2025
tdruez added a commit that referenced this issue Jan 21, 2025
tdruez added a commit that referenced this issue Jan 21, 2025
Signed-off-by: tdruez <[email protected]>
tdruez added a commit that referenced this issue Jan 21, 2025
tdruez added a commit that referenced this issue Jan 22, 2025
tdruez added a commit that referenced this issue Jan 22, 2025
For re-usability: `get_xlsx_report`

Signed-off-by: tdruez <[email protected]>
tdruez added a commit that referenced this issue Jan 22, 2025
tdruez added a commit that referenced this issue Jan 22, 2025
tdruez added a commit that referenced this issue Jan 22, 2025
tdruez added a commit that referenced this issue Jan 22, 2025
* Use new tab for download and report action #1524

Signed-off-by: tdruez <[email protected]>

* Refactor the XLSX report logic into a single function #1524

For re-usability: `get_xlsx_report`

Signed-off-by: tdruez <[email protected]>

* Add unit test for get_xlsx_report #1524

Signed-off-by: tdruez <[email protected]>

* Rename the --sheet option to --model #1524

Signed-off-by: tdruez <[email protected]>

* Add support for the XLSX report in REST API #1524

Signed-off-by: tdruez <[email protected]>

---------

Signed-off-by: tdruez <[email protected]>
tdruez added a commit that referenced this issue Jan 22, 2025
@tdruez
Copy link
Contributor

tdruez commented Jan 22, 2025

@pombredanne The "Report" feature is now complete and ready for your review.
It is available from the UI, the CLI, and the API.

For the following usage example, we'll assume you have run multiple d2d pipelines using the batch-create command.
All your projects for that batch are tagged with the label "back2source-ruby".

UI

From the project list:

  • Put the label "back2source-ruby" in the search box and
  • Click on the "select all" checkbox in the table header
  • The "Action" dropdown will be activated, click on it and select "Report"
  • Select the "TODOs" type and check the "Include all xxx projects" to select all projects for your current search.

A new tab will open and once the report is created, the download will start. Note: It may take a while if too much data is selected to be included in the report.

CLI

Documented at https://scancodeio.readthedocs.io/en/latest/command-line-interface.html#scanpipe-report-model-model

$ scanpipe report --model todo --label back2source-ruby

REST API

Documented at https://scancodeio.readthedocs.io/en/latest/rest-api.html#xlsx-report

GET /api/projects/report/?model=todo&label=back2source-ruby

@pombredanne Let me know if that whole feature needs adjustments, otherwise you can close this issue.

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

No branches or pull requests

2 participants