Skip to content

feat: Global Instrument Category schema mappers - implement Custom Information Aggregate Document/Document Structure#1123

Draft
joshua-benchling wants to merge 29 commits intomainfrom
jherna/update_schema_mappers_to_custom_information_document
Draft

feat: Global Instrument Category schema mappers - implement Custom Information Aggregate Document/Document Structure#1123
joshua-benchling wants to merge 29 commits intomainfrom
jherna/update_schema_mappers_to_custom_information_document

Conversation

@joshua-benchling
Copy link
Copy Markdown
Collaborator

Added add_custom_information_aggregate_document method to properly map flat dictionaries to ASM's CustomInformationAggregateDocument structure with validation against nested data structures.

@joshua-benchling joshua-benchling requested review from a team and slopez-b as code owners November 19, 2025 16:17
@joshua-benchling joshua-benchling marked this pull request as draft November 19, 2025 16:25
- Created new converter function to map custom info to CustomInformationAggregateDocument
- Validates against nested dicts/lists (except TQuantityValue-like objects)
- Handles TQuantityValue dataclasses by separating value and unit into distinct fields
- Dynamically adds custom_information_aggregate_document to any aggregate document
- Sorts custom information items by datum_label for consistent ordering
- Includes custom unstructure hook for proper JSON serialization
…tom info

- Updated benchling/_2024/_12/binding_affinity_analyzer.py to use add_custom_information_aggregate_document
- Applied to data_system_document, device_system_document, measurement_aggregate_document,
  device_control_document, sample_document, and report_point_document_item custom information
- Updated test expectations for cytiva_biacore_insight, cytiva_biacore_t200_control, and
  cytiva_biacore_t200_evaluation parsers
…ured custom info

- Updated cell_counting.py to use add_custom_information_aggregate_document
- Imported CustomInformationAggregateDocument and CustomInformationDocumentItem from rec._2024._09
- Applied to device_system_document, data_system_document, measurement_aggregate_document,
  device_control_document, measurement_document, and sample_document custom information
- Updated test expectations for beckman_vi_cell_blu parser

**Breaking change:** Migrated from flat custom_information_document to structured
custom_information_aggregate_document format with sorted datum labels for consistency
…ustom info

- Updated cell_counting.py to use add_custom_information_aggregate_document
- Applied to device_system_document, data_system_document, measurement_aggregate_document,
  device_control_document, measurement_document, image_aggregate_document, sample_document,
  and processed_data_aggregate_document custom information
- Updated test expectations for revvity_matrix and chemometec_nucleoview parsers

**Breaking change:** Migrated from flat custom_information_document to structured
custom_information_aggregate_document format with sorted datum labels for consistency
…tured custom info

- Updated flow_cytometry.py to use add_custom_information_aggregate_document
- Applied to flow_cytometry_aggregate_document, flow_cytometry_document_item, measurement_aggregate_document,
  measurement_document_item, device_control_document, processed_data_document_item, data_processing_document,
  data_region_document_item, vertex_document_item, population_document_item, compensation_matrix_document_item,
  matrix_document_item, statistics_document_item, statistic_dimension_document_item, and sample_document custom information
- Updated test expectations for flowjo and bd_biosciences_facsdiva parsers

**Breaking change:** Migrated custom information to structured format with sorted datum labels for consistency
…tured custom info

- Updated liquid_handler.py to use add_custom_information_aggregate_document
- Applied to liquid_handler_aggregate_document, device_system_document, measurement_aggregate_document,
  device_control_document, and measurement_document_item custom information
- Updated test expectations for beckman_coulter_biomek and beckman_echo_plate_reformat parsers

**Breaking change:** Migrated custom information to structured format with sorted datum labels for consistency
…use structured custom info

- Updated multi_analyte_profiling.py to use add_custom_information_aggregate_document
- Applied to device_system_document, measurement_aggregate_document, sample_document,
  device_control_document, analyte_document, and measurement_document custom information
- Updated test expectations for luminex_xponent, luminex_intelliflex, and biorad_bioplex_manager parsers

**Breaking change:** Migrated custom information to structured format with sorted datum labels for consistency
…custom info

- Updated dpcr.py to use add_custom_information_aggregate_document
- Imported CustomInformationAggregateDocument and CustomInformationDocumentItem from rec._2024._09
- Applied to dpcr_aggregate_document, measurement_aggregate_document, measurement_document,
  sample_document, device_control_document, and processed_data_aggregate_document custom information
- Updated test expectations for qiacuity_dpcr and appbio_absolute_q parsers
…custom info

- Updated qpcr.py to use add_custom_information_aggregate_document
- Imported CustomInformationAggregateDocument and CustomInformationDocumentItem from rec._2024._09
- Applied to qpcr_aggregate_document, measurement_aggregate_document, measurement_document_item,
  sample_document, data_processing_document, and processed_data_aggregate_document custom information
- Note: No parsers currently use this schema mapper, so no test data changes
… info

- Updated qpcr.py to use add_custom_information_aggregate_document
- Applied to qpcr_aggregate_document, measurement_aggregate_document, measurement_document_item,
  sample_document, data_processing_document, and processed_data_aggregate_document custom information
- Updated test expectations for appbio_quantstudio, appbio_quantstudio_designandanalysis,
  and cfxmaestro parsers
…stom info

- Updated plate_reader.py to use add_custom_information_aggregate_document
- Applied to data_system_document, measurement_aggregate_document, plate_reader_document_item,
  device_control_document, measurement_document, sample_document, and calculated_data_document_item custom information
- Updated test expectations for bmg_mars, perkin_elmer_envision, msd_workbench,
  bmg_labtech_smart_control, tecan_magellan, and methodical_mind parsers
…ructured custom info

- Updated spectrophotometry.py to use add_custom_information_aggregate_document
- Imported CustomInformationAggregateDocument and CustomInformationDocumentItem from rec._2024._09
- Applied to device_system_document, measurement_aggregate_document, measurement_document,
  device_control_document, processed_data_aggregate_document, and sample_document custom information
- Updated test expectations for thermo_fisher_nanodrop_eight, thermo_fisher_nanodrop_8000,
  thermo_fisher_nanodrop_one, thermo_fisher_genesys30, thermo_fisher_genesys_on_board,
  thermo_fisher_qubit_flex, and thermo_fisher_visionlite parsers
- Updated test expectations for beckman_vi_cell_xr, chemometec_nc_view, and roche_cedex_hires
- These parsers use the cell_counting/rec/_2024/_09 schema mapper already migrated to structured custom info
- Test data now reflects the new CustomInformationAggregateDocument structure
- Updated test expectations for thermo_fisher_qubit4 parser
- This parser uses the spectrophotometry/benchling/_2023/_12 schema mapper already migrated
- Test data now reflects the new CustomInformationAggregateDocument structure
- Note: Uses different test file naming convention (to_allotropy_test.py vs to_allotrope_test.py)
…ructured custom info

- Updated solution_analyzer.py to use add_custom_information_aggregate_document
- Applied to solution_analyzer_aggregate_document, device_system_document, data_system_document,
  measurement_aggregate_document, measurement_document, device_control_document, sample_document,
  and processed_data_document_item custom information
- Updated test expectations for novabio_flex2 parser
…ed custom info

- Updated solution_analyzer.py to use add_custom_information_aggregate_document
- Applied to solution_analyzer_aggregate_document, device_system_document, data_system_document,
  measurement_aggregate_document, measurement_document, device_control_document, sample_document,
  analyte_document, processed_data_document_item, and distribution_document_item custom information
- Updated test expectations for beckman_pharmspec and roche_cedex_bioht parsers
…ation_aggregate_document

- Updated schema mapper to use add_custom_information_aggregate_document for all custom information fields
- Applied to data_system_document, plate_reader_document, device_control_document, measurement_document, sample_document, and peak custom info
- Fixed missing custom info wrapping in profile_data_cube_measurement_document method
- Fixed argument order in luminescence_measurement_document return statement
- Updated test expectations for unchained_labs_lunatic_stunner (8 files), thermo_skanit (3 files), moldev_softmax_pro (22 files), and agilent_gen5 (30 files) parsers
- 63 test files updated with structural changes to custom information format
- Restored 15 files with only version changes to avoid unnecessary diffs
- All 94 tests passing
…ation_aggregate_document

- Updated schema mapper to use add_custom_information_aggregate_document for all custom information fields
- Applied to data_system_document, plate_reader_document, device_control_document, measurement_document, sample_document, and peak custom info
- Fixed missing custom info wrapping in profile_data_cube_measurement_document method
- Fixed argument order in luminescence_measurement_document return statement
- Updated test expectations for unchained_labs_lunatic_stunner (8 files), thermo_skanit (3 files), moldev_softmax_pro (22 files), and agilent_gen5 (30 files) parsers
- 63 test files updated with structural changes to custom information format
- Restored 15 files with only version changes to avoid unnecessary diffs
- All 94 tests passing
Copy link
Copy Markdown
Collaborator

@nathan-stender nathan-stender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting to remove from my review request review - code looks good - we agreed this will be broken up into per-parser PRs

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