Skip to content

Adds PDF report for Size Distribution#3965

Open
jellybean2004 wants to merge 6 commits into
mainfrom
SD_report
Open

Adds PDF report for Size Distribution#3965
jellybean2004 wants to merge 6 commits into
mainfrom
SD_report

Conversation

@jellybean2004
Copy link
Copy Markdown
Member

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

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing

  • The introduced changes comply with SasView license (BSD 3-Clause)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() (and supports_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.

Comment thread src/sas/qtgui/Plotting/PlotHelper.py Outdated
Comment thread src/sas/qtgui/Perspectives/Fitting/ReportPageLogic.py Outdated
Comment thread src/sas/qtgui/Perspectives/SizeDistribution/SizeDistributionPerspective.py Outdated
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

Successfully merging this pull request may close these issues.

Create report for Pore Size Distribution

2 participants