Adds PDF report for Size Distribution#3965
Open
jellybean2004 wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds report generation support for the Size Distribution perspective by leveraging the existing ReportBase HTML/PDF reporting pipeline, while also refactoring common report utilities for reuse across perspectives.
Changes:
- Added
getReport()(andsupports_reports) to the Size Distribution perspective, including embedding currently-shown plots into the report. - Factored out parameter key/value formatting into a shared
format_report_parameters()helper and reused it from Corfunc. - Centralized “collect live plot figures by dataset id” logic into
PlotHelper.figures_for_plot_ids()and reused it in the Fitting report flow.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/sas/qtgui/Utilities/Reports/reports.py |
Adds reusable report-parameter formatting helper. |
src/sas/qtgui/Utilities/Reports/__init__.py |
Re-exports the new formatting helper from the Reports package. |
src/sas/qtgui/Plotting/PlotHelper.py |
Adds helper to fetch active Matplotlib figures by plot/data ids. |
src/sas/qtgui/Perspectives/SizeDistribution/SizeDistributionPerspective.py |
Implements report generation + plot image collection for Size Distribution. |
src/sas/qtgui/Perspectives/Fitting/ReportPageLogic.py |
Refactors image collection to use the new PlotHelper utility. |
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py |
Switches to shared parameter formatting helper for reports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds PDF reports for the Size distribution perspective.
This also factors out parameter formatting from Corfunc, and getting plot images from Fitting perspectives to be used here.
Fixes #3258
How Has This Been Tested?
Manually ran and created reports.
Review Checklist:
Documentation
Installers
Licensing