Skip to content

feat: Migrate plate_reader parsers to REC 2026/03 schema#1179

Open
nathan-stender wants to merge 4 commits into
mainfrom
migrate-plate-reader-rec-2026-03
Open

feat: Migrate plate_reader parsers to REC 2026/03 schema#1179
nathan-stender wants to merge 4 commits into
mainfrom
migrate-plate-reader-rec-2026-03

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

Migrates all 10 plate_reader parsers to REC 2026/03 schema:

  • From 2024/06: bmg_labtech_smart_control, bmg_mars, methodical_mind, msd_workbench, perkin_elmer_envision, tecan_magellan
  • From 2025/03: agilent_gen5, moldev_softmax_pro, thermo_skanit, unchained_labs_lunatic_stunner

Changes

New files

  • 2026/03 schema mapper: src/allotropy/allotrope/schema_mappers/adm/plate_reader/rec/_2026/_03/plate_reader.py
  • Downloaded schemas: schemas/adm/{plate-reader,core,absorbance,fluorescence,luminescence,optical-imaging}/REC/2026/03/
  • Generated models: models/adm/{plate_reader,core,absorbance,fluorescence,luminescence,optical_imaging}/rec/_2026/_03/
  • Updated shared definitions: quantity_values.py, units.py (new unit types from 2026/03 QUDT)

Import path updates (38 source files)

All parser *_parser.py, *_structure.py, constants.py, calcdocs, and test files updated from rec._2024._06 or rec._2025._03 to rec._2026._03.

Structural code changes

  • bmg_labtech_smart_control, bmg_mars, perkin_elmer_envision, tecan_magellan: Moved analytical_method_identifier and/or experimental_data_identifier from MeasurementGroup to individual Measurement level (schema change)
  • unchained_labs_lunatic_stunner: concentration_factor now uses add_custom_information_document instead of data_processing_document dict (type changed from dict[str, Any] to typed DataProcessingDocument in 2026/03)
  • plate_reader mapper: DeviceSystemDocument imported as PlateReaderDeviceSystemDocument alias (2026/03 makes device_identifier and model_number required)

Bug fix

  • agilent_gen5: Fixed pre-existing bug where fluorescence/luminescence spectrum data cubes incorrectly used absorbance concept ("absorbance") and unit ("mAU") — now correctly uses "fluorescence"/"RFU" or "luminescence"/"RLU" based on read mode.

Known limitation

  • Luminescence spectral scan test (luminescence/spectral_scan.txt) moved to exclude/ and marked xfail — the 2026/03 plate_reader schema has no luminescence_spectrum_data_cube field, so luminescence spectrum measurements cannot be validated. This is a pre-existing schema limitation, not introduced by this migration.

JSON test data audit (111 files)

All 111 JSON test output files were regenerated. Changes are:

Change Scope Description
Manifest URL All 111 files REC/2024/06 or REC/2025/03REC/2026/03
ASM converter version All 111 files Various → 0.1.118
Key ordering All 111 files JSON keys reordered to follow 2026/03 schema definition order (e.g., data system document and device system document before plate reader document; detection type before device type; measures before dimensions in data cubes)
Field location moves tecan_magellan, perkin_elmer_envision, bmg_mars, bmg_labtech_smart_control analytical_method_identifier and/or experimental_data_identifier moved from measurement aggregate document to measurement document
custom_information_document location perkin_elmer_envision, bmg_mars custom information document moved from inside measurement aggregate document to plate reader document level
data_processing_document → custom_information_document unchained_labs_lunatic_stunner (3 files) data processing document wrapper replaced by custom information document for concentration factor
Spectrum data cube fix agilent_gen5 (2 files) Fluorescence spectrum cubes: concept absorbancefluorescence, unit mAURFU

No changes to measurement values, sample identifiers, well locations, plate identifiers, timestamps, or data cube numeric arrays.

Test plan

  • hatch run test:test tests/parsers/{all 10 parsers}/ — 207 passed, 1 xfailed
  • hatch run lint — clean
  • hatch run lint:typing — clean
  • Pre-push hook (770 tests) — all pass

🤖 Generated with Claude Code

nathan-stender and others added 2 commits April 16, 2026 18:28
Migrate all 10 plate_reader parsers from REC 2024/06 and REC 2025/03 to
REC 2026/03. This includes downloading the 2026/03 schema + dependencies,
generating model code, creating the 2026/03 schema mapper, and updating
all parser imports.

Parsers migrated from 2024/06:
- bmg_labtech_smart_control
- bmg_mars
- methodical_mind
- msd_workbench
- perkin_elmer_envision
- tecan_magellan

Parsers migrated from 2025/03:
- agilent_gen5
- moldev_softmax_pro
- thermo_skanit
- unchained_labs_lunatic_stunner

Structural changes in the migration:
- analytical_method_identifier and experimental_data_identifier moved
  from MeasurementGroup to individual Measurement level
- data_processing_document replaced by custom_information_document for
  concentration_factor in unchained_labs_lunatic_stunner
- DeviceSystemDocument now has required device_identifier and model_number
  fields (aliased import as PlateReaderDeviceSystemDocument)
- Fixed pre-existing bug in agilent_gen5 where fluorescence spectrum data
  cubes incorrectly used absorbance concept/unit (mAU) instead of
  fluorescence (RFU)
- Moved luminescence spectral_scan test to xfail: 2026/03 schema has no
  luminescence spectrum data cube field (pre-existing limitation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…der 2026/03

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners April 16, 2026 22:30
nathan-stender and others added 2 commits April 16, 2026 20:02
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restores the compact single-line format for numeric arrays in data cube
structures that was lost during JSON key reordering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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