• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rero / rero-ils / 27526538123
91%
staging: 91%

Build:
Build:
LAST BUILD BRANCH: rep-copyright-headers
DEFAULT BRANCH: staging
Ran 15 Jun 2026 07:06AM UTC
Jobs 1
Files 610
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jun 2026 05:43AM UTC coverage: 91.263% (-0.05%) from 91.311%
27526538123

push

github

Garfield-fr
refactor: normalize monetary amounts to two decimal places

Floating-point drift (e.g. 145.000000089) in financial fields
caused silent precision errors. All monetary amounts are now
normalized to exactly two decimal places on write using
Decimal arithmetic.

* Add NormalizeAmountExtension to extensions.py: on pre_create/pre_commit,
  validates that each monetary value is within 1e-9 of a two-decimal number
  (raises ValidationError for values like 0.545 or 2.23333, preserving the
  behavior of the former DecimalAmountExtension) and silently normalizes
  float-drift residuals (e.g. 145.000000089) to exactly two decimal places
* Register NormalizeAmountExtension in AcqAccount,
  AcqOrderLine, AcqReceiptLine, AcqReceipt, PatronTransaction,
  PatronTransactionEvent, CircPolicy, PatronType and Item
* Fix arithmetic in acq_accounts (remaining_balance,
  get_exceedance, transfer_fund), acq_receipt_lines
  (total_amount) and acq_receipts (total_amount) to return
  values rounded to 2dp
* Guard total_amount against None in update_parent_patron_transaction
  to avoid TypeError when a patron transaction has no total_amount yet
* Add Alembic migration b3a1f2c9d0e7: normalizes all existing
  monetary fields in DB to two decimal places (idempotent
  upgrade and downgrade)

Co-Authored-by: Peter Weber <peter.weber@rero.ch>

64 of 64 new or added lines in 10 files covered. (100.0%)

25 existing lines in 2 files now uncovered.

24180 of 26495 relevant lines covered (91.26%)

0.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
17
56.79
-6.48% rero_ils/modules/extensions.py
8
94.66
-0.19% rero_ils/modules/ext.py
Jobs
ID Job ID Ran Files Coverage
1 27526538123.1 15 Jun 2026 07:06AM UTC 610
91.26
GitHub Action Run
Source Files on build 27526538123
  • Tree
  • List 610
  • Changed 12
  • Source Changed 12
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27526538123
  • cf240ee8 on github
  • Prev Build on ils-dev (#27265238948)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc