Skip to content

refactor printout formatter#358

Merged
rozyczko merged 1 commit into
developfrom
summary_update_2
May 22, 2026
Merged

refactor printout formatter#358
rozyczko merged 1 commit into
developfrom
summary_update_2

Conversation

@rozyczko
Copy link
Copy Markdown
Member

This pull request updates the numeric formatting logic in the summary.py module to provide more consistent and flexible display of numerical values in summary tables. The main change is the introduction of a new _format_value function that replaces the previous _format_error function, allowing for configurable significant figures and improved formatting for both values and errors.

Numeric formatting improvements:

  • Replaced the _format_error function with a new _format_value function, which formats any numeric value (not just errors) with a configurable number of significant figures, falling back to exponential notation for long strings and always displaying zero as '0.0'.
  • Updated the _sample_section method to use _format_value for both parameter values (3 significant figures) and errors (2 significant figures), ensuring consistent formatting in the sample summary.
  • Updated the _experiments_section method to use _format_value for experiment range minimum and maximum values (2 significant figures), improving the clarity and consistency of experiment data display.

@rozyczko rozyczko added [scope] enhancement Adds/improves features (major.MINOR.patch) chore Chore changes to the code [priority] highest Urgent. Needs attention ASAP labels May 22, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (74e9a5b) to head (0f830ed).

Files with missing lines Patch % Lines
src/easyreflectometry/summary/summary.py 0.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop    #358   +/-   ##
=======================================
  Coverage     0.00%   0.00%           
=======================================
  Files           40      40           
  Lines         2742    2742           
=======================================
  Misses        2742    2742           
Flag Coverage Δ
integration 0.00% <0.00%> (ø)
unittests 0.00% <0.00%> (ø)

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

Files with missing lines Coverage Δ
src/easyreflectometry/summary/summary.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rozyczko rozyczko merged commit 7e73364 into develop May 22, 2026
63 checks passed
@rozyczko rozyczko deleted the summary_update_2 branch May 22, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore changes to the code [priority] highest Urgent. Needs attention ASAP [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant