6 Commits

Author SHA1 Message Date
Malin
5efb2c25ea feat: add rows_processed/rows_skipped diagnostics to health + refresh endpoints
Helps diagnose whether the product cap is from EAN filtering or a downstream limit.
health and refresh now return: product_count, rows_processed, rows_skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:01:03 +01:00
Malin
3b167cd396 fix: drop read_only=True to avoid openpyxl dimension truncation
openpyxl in read_only mode stops iterating at the sheet's cached <dimension ref>
attribute in the XML. If MTZ extended the Excel beyond the original row range,
those rows were silently ignored (hence always ~4000 products regardless of the
real count). Removing read_only=True forces openpyxl to read all actual data rows.
The file is already in BytesIO so there is no I/O penalty.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:51:08 +01:00
Malin
8d75fcd060 fix: skip products with blank or non-numeric EAN codes 2026-03-20 11:35:46 +01:00
Malin
162e77c1c3 fix: safe int/float helpers for dirty Excel data (min_box_qty, stock, etc.) 2026-03-20 11:04:52 +01:00
Malin
95cbf8d25d fix: handle string EAN codes in Excel (not just integers) 2026-03-20 11:02:40 +01:00
Malin
db7c31260b feat: initial MTZ Excel-to-JSON API wrapper 2026-03-20 10:31:19 +01:00