Skip to content

feat: Agilent OpenLab CDS - report sample type - #1273

Merged
nathan-stender merged 2 commits into
mainfrom
feat/openlab-cds-sample-type
Sep 28, 2026
Merged

nathan-stender merged 2 commits into
mainfrom
feat/openlab-cds-sample-type

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

A customer asked to retrieve sample type from OpenLab CDS result sets. It turns out we already read it — but only mapped two of the four values OpenLab emits, so the rest were silently dropped.

SAMPLE_ROLE_TYPE mapped only Blank and Sample. Calibration and Control rows fell through and were reported with a null sample role type. This is visible in the fixtures already on main: the Luxo expected JSON has 12 null sample role type values (4 Calibration samples x 3 signals).

This PR:

  • Maps Calibration -> calibration_sample_role and Control -> control_sample_role.
  • Reports the raw OpenLab value as a "sample type" entry in the sample custom information document, so a type with no ASM equivalent is surfaced rather than dropped.

The customer's real file contains Sample, Blank, Calibration, and Control — 4 of its 11 samples were losing their type before this change.

Expected JSON changes (intentional)

Per the repo convention, existing expected JSON is not edited to make a change pass — this is a deliberate behavior change, regenerated with --overwrite:

  • 18x "sample role type" newly populated with "calibration sample role" (previously null)
  • New "sample type" custom info key: 18x Calibration, 15x Blank, 12x Sample
  • ASM converter version strings refreshed (cosmetic; overridden at comparison time by testing/utils.py)

No existing non-null value changed.

Test fixture

Sirius-control-2023-09-01 07-52-44-04-00.rslt (33 KB) is derived from the existing anonymized Sirius fixture, not from a customer export — the only change is flipping one sample's <Type>Calibration</Type> to <Type>Control</Type> in the .acaml. 4 of its 5 members are byte-identical to the source fixture. No new customer data is introduced.

Verified it is real coverage: removing the Control mapping makes only this fixture fail (sample role type removed from dictionary); restoring it passes.

Testing

  • hatch run lint clean (black 798 files, mypy 795 source files)
  • hatch run test_all.py3.10:pytest tests/ — 1522 passed (+2 from the new fixture)

🤖 Generated with Claude Code

The sequence table's sample type (SampleSetup -> DAParam -> Type) was only
mapped for "Blank" and "Sample". "Calibration" and "Control" rows fell through
the mapping and were reported with a null sample role type, silently dropping
the value.

- Map "Calibration" and "Control" to their ASM sample role types.
- Report the raw OpenLab value as "sample type" sample custom information, so
  types with no ASM equivalent are not dropped.

Adds Sirius-control fixture, derived from the existing Sirius fixture, to cover
the Control type.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nathan-stender
nathan-stender merged commit 58de28b into main Sep 28, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the feat/openlab-cds-sample-type branch September 28, 2026 15:12
nathan-stender added a commit that referenced this pull request Sep 28, 2026
### Added

- Agilent OpenLab CDS - report sample type (#1273)
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.

2 participants