Skip to content

added pretty representation of Bayesian sampling analysis#354

Open
rozyczko wants to merge 5 commits into
bayesianfrom
bayesian_pretty_plots
Open

added pretty representation of Bayesian sampling analysis#354
rozyczko wants to merge 5 commits into
bayesianfrom
bayesian_pretty_plots

Conversation

@rozyczko
Copy link
Copy Markdown
Member

Shamelessly stolen from diffraction-lib

Display Layer Implementation

  • Added a new display subpackage with the following modules and classes:
    • fit_display.py: Implements FitDisplay for rendering tables summarizing classical and Bayesian fit results, including parameter correlations.
    • fitter_display.py: Implements FitterDisplay, a facade for MultiFitter, grouping fit and posterior result displays.
    • posterior_display.py: Implements PosteriorDisplay for visualizing posterior distributions, pairwise relationships, posterior predictive reflectivity, and SLD profiles.
    • Updated display/__init__.py to expose these classes.

Development and Build Configuration

  • Added matplotlib, pandas, rich, and scipy as development dependencies in pyproject.toml to support plotting and rich table rendering in the new display layer.
  • Updated .prettierignore to ignore docs/_build/.

Linting and Code Quality

  • Adjusted Ruff linting configuration in pyproject.toml to ignore E402 (module-import-not-at-top-of-file) in docs/** to accommodate notebook cell imports.

@rozyczko rozyczko added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] high Should be prioritized soon labels May 21, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['chore', 'fix', 'bugfix', 'bug', 'enhancement', 'feature', 'dependencies', 'documentation']

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 64.54849% with 212 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.41%. Comparing base (d112d8d) to head (c2359a2).

Files with missing lines Patch % Lines
src/easyreflectometry/analysis/bayesian.py 14.78% 121 Missing ⚠️
src/easyreflectometry/project.py 16.41% 56 Missing ⚠️
src/easyreflectometry/fitting.py 16.66% 15 Missing ⚠️
src/easyreflectometry/display/posterior_display.py 91.33% 13 Missing ⚠️
src/easyreflectometry/display/fit_display.py 97.70% 3 Missing ⚠️
src/easyreflectometry/display/project_display.py 94.73% 2 Missing ⚠️
src/easyreflectometry/display/tables.py 94.11% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           bayesian     #354       +/-   ##
=============================================
+ Coverage      0.00%   37.41%   +37.41%     
=============================================
  Files            42       54       +12     
  Lines          2871     3707      +836     
=============================================
+ Hits              0     1387     +1387     
+ Misses         2871     2320      -551     
Flag Coverage Δ
integration 0.00% <0.00%> (ø)
unittests 37.41% <64.54%> (+37.41%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easyreflectometry/__init__.py 83.33% <100.00%> (+83.33%) ⬆️
src/easyreflectometry/display/__init__.py 100.00% <100.00%> (ø)
src/easyreflectometry/display/fitter_display.py 100.00% <100.00%> (ø)
src/easyreflectometry/display/project_display.py 94.73% <94.73%> (ø)
src/easyreflectometry/display/tables.py 94.11% <94.11%> (ø)
src/easyreflectometry/display/fit_display.py 97.70% <97.70%> (ø)
src/easyreflectometry/display/posterior_display.py 91.33% <91.33%> (ø)
src/easyreflectometry/fitting.py 16.15% <16.66%> (+16.15%) ⬆️
src/easyreflectometry/project.py 24.62% <16.41%> (+24.62%) ⬆️
src/easyreflectometry/analysis/bayesian.py 19.77% <14.78%> (+19.77%) ⬆️

... and 39 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[priority] high Should be prioritized soon [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant