Commit 4592311
fix(open-data): parse and write ISF ratios with the invariant culture
Ratios were parsed and written with the current culture. On a comma-decimal
machine that corrupts the dataset in both directions:
- de-DE parses "2.1" as 21, so a ratio is silently ten times too large.
- fr-CH fails the parse outright, so the row is dropped.
- Export-Csv writes the value back as "2,1", which breaks every consumer:
the Optimization Engine's externaldata(... Ratio:double) and the Power BI
partitions typed as number.
CI runs on ubuntu-latest and is unaffected, but the README documents running
the generator by hand, so a contributor in a comma-decimal locale would
publish a corrupt file. Both parse sites and the write path now pin
InvariantCulture, with a regression test that drives the generator under
de-DE and asserts the round trip.
Also corrects the SKU count in the changelog: it still said 2,574 from
before the zero-ratio row was dropped, against 2,573 actually published.
Reported by Copilot review on #2308 (the parse side; the write side turned
up while verifying it).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 77949cd commit 4592311
3 files changed
Lines changed: 37 additions & 5 deletions
File tree
- docs-mslearn/toolkit
- src
- powershell/Tests/Unit
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
170 | 196 | | |
171 | 197 | | |
172 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
336 | | - | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| |||
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
345 | | - | |
| 346 | + | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| |||
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
516 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
0 commit comments