Commit 7fc86d0
fix(chemistry): treat trailing letters in SamplePointID as a sample point
A PointID ending in letters is a sample point, never a base well id:
WL-0434A is a sample point on well WL-0434. The ingest treated the whole
value as the base, so a workbook naming WL-0434A either failed to
resolve a well (the common case, since wells are named WL-0434) or, if
such a Thing existed, appended a second letter and produced WL-0434AA.
Split the supplied PointID into base and suffix, resolve the well from
the base, and compare any supplied letter against the next free
incrementor. The computed letter wins because it cannot collide with an
existing sample point, but a disagreement is now reported so a human can
reconcile it. Lowercase endings are not incrementors, so a well legitimately
named "Test Well" is unaffected.
Reporting a disagreement needed a non-fatal channel: validation_errors
aborts the file, which is too blunt for a letter that is merely
unexpected. Add a warnings list to the payload, surfaced by the CLI and
counted in the manifest's existing validation_errors_or_warnings field,
leaving the exit code at 0.
Verified against a real LIMS export (NMT_260503): 104 rows, 98 imported
after collapsing Fe/Mn/Sr duplicate methods, loading as WL-0433A and
WL-0434A rather than WL-0433AA/WL-0434AA.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent beeb4ad commit 7fc86d0
3 files changed
Lines changed: 119 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
| 994 | + | |
994 | 995 | | |
995 | 996 | | |
996 | 997 | | |
| |||
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
1049 | 1056 | | |
1050 | 1057 | | |
1051 | 1058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
365 | 382 | | |
366 | 383 | | |
367 | 384 | | |
| |||
496 | 513 | | |
497 | 514 | | |
498 | 515 | | |
| 516 | + | |
| 517 | + | |
499 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
500 | 532 | | |
501 | 533 | | |
502 | 534 | | |
| |||
549 | 581 | | |
550 | 582 | | |
551 | 583 | | |
552 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
553 | 597 | | |
554 | 598 | | |
555 | 599 | | |
| |||
585 | 629 | | |
586 | 630 | | |
587 | 631 | | |
| 632 | + | |
588 | 633 | | |
589 | 634 | | |
590 | 635 | | |
| |||
595 | 640 | | |
596 | 641 | | |
597 | 642 | | |
| 643 | + | |
598 | 644 | | |
599 | | - | |
| 645 | + | |
| 646 | + | |
600 | 647 | | |
601 | 648 | | |
602 | 649 | | |
| |||
606 | 653 | | |
607 | 654 | | |
608 | 655 | | |
| 656 | + | |
609 | 657 | | |
610 | 658 | | |
611 | 659 | | |
612 | 660 | | |
613 | 661 | | |
614 | 662 | | |
| 663 | + | |
| 664 | + | |
615 | 665 | | |
616 | 666 | | |
617 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
207 | 267 | | |
208 | 268 | | |
209 | 269 | | |
| |||
0 commit comments