Skip to content

Add opt-in exact decimal comparison - #1

Merged
Master-626 merged 1 commit into
mainfrom
feat/exact-decimal-comparison
Nov 9, 2026
Merged

Master-626 merged 1 commit into
mainfrom
feat/exact-decimal-comparison

Conversation

@Master-626

Copy link
Copy Markdown
Owner

Summary

  • Add --exact-decimals to compare and report, plus exact_decimals=True to the Python loaders. Default binary-float behavior stays unchanged.
  • Preserve exact JSON numbers in terminal, JSON and HTML output while keeping integers, decimals and booleans distinct. Decimal spellings such as 1.0 and 1e0 remain numerically equivalent.
  • Cover rounding, underflow, large exponents, nested values, strict parsing, caller Decimal contexts and safe serialization. Document compatibility and downstream parsing requirements in English and Chinese.
  • Extend CI to Windows/macOS alongside Linux Python 3.8, 3.10, 3.12 and 3.14, with an isolated installed-console-script smoke test.

Validation

  • Local Python 3.12: 161 tests passed, 99.4% coverage.
  • Prior core-change checks passed on Python 3.8 and an installed wheel on Python 3.13.
  • Ruff, formatting, sdist/wheel build and installed CLI default/exact JSON/exact HTML smoke tests passed.
  • Branch CI must pass before merge.

Keep default float semantics, preserve Decimal values in JSON and HTML,
and exercise installed wheels across Linux, Windows and macOS.
@Master-626
Master-626 marked this pull request as ready for review November 9, 2026 06:17
@Master-626
Master-626 merged commit 75ee750 into main Nov 9, 2026
12 checks passed
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.

1 participant