Skip to content

Commit 0eacd1a

Browse files
fix: Surface previously skipped columns as custom info in NovaBio Flex2 parser (#1236)
## Summary - `Sample Time`, `PCO2 @ Temp`, `PO2 @ Temp`, and `pH @ Temp` were incorrectly marked as `unused_keys` in the NovaBio Flex2 parser (introduced in #1070) - These fields are not duplicates of already-mapped ASM fields — they were skipped by mistake during the PR review categorization - Removed them from `unused_keys` so they now flow through to `custom_info` in the output - `Operator` and `Osm` remain suppressed since they are consumed elsewhere (as `analyst` and `osmolality` respectively) ## Test plan - [x] All 13 NovaBio Flex2 tests pass - [x] discover_vendor tests pass - [x] Lint clean (ruff, black, mypy) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5fe6a6b commit 0eacd1a

4 files changed

Lines changed: 339 additions & 223 deletions

File tree

src/allotropy/parsers/novabio_flex2/novabio_flex2_structure.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ def create(cls, units: SeriesData, data: SeriesData) -> Sample:
8989
cell_density_dilution = cell_density_dilution.split(":")[0]
9090

9191
unused_keys = {
92-
"Sample Time",
93-
"PCO2 @ Temp",
94-
"PO2 @ Temp",
95-
"pH @ Temp",
9692
"Operator",
9793
"Osm",
9894
}

tests/parsers/novabio_flex2/testdata/SampleResults2022-06-28_142558.json

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
{
22
"$asm.manifest": "http://purl.allotrope.org/manifests/solution-analyzer/BENCHLING/2024/09/solution-analyzer.manifest",
33
"solution analyzer aggregate document": {
4+
"data system document": {
5+
"ASM file identifier": "SampleResults2022-06-28_142558.json",
6+
"data system instance identifier": "N/A",
7+
"ASM converter name": "allotropy_novabio_flex2",
8+
"ASM converter version": "0.1.138",
9+
"file name": "SampleResults2022-06-28_142558.csv",
10+
"software name": "NovaBio Flex",
11+
"UNC path": "tests/parsers/novabio_flex2/testdata/SampleResults2022-06-28_142558.csv"
12+
},
13+
"device system document": {
14+
"model number": "Flex2",
15+
"product manufacturer": "Nova Biomedical"
16+
},
417
"solution analyzer document": [
518
{
619
"measurement aggregate document": {
@@ -9,13 +22,13 @@
922
"device control aggregate document": {
1023
"device control document": [
1124
{
12-
"device type": "solution-analyzer",
1325
"detection type": "metabolite-detection",
26+
"device type": "solution-analyzer",
1427
"custom information document": {
15-
"Vessel Pressure (psi)": 0.0,
16-
"Sparging O2%": 20.9,
1728
"Chemistry Flow Time": 6.67,
18-
"pH / Gas Flow Time": 3.65
29+
"Vessel Pressure (psi)": 0.0,
30+
"pH / Gas Flow Time": 3.65,
31+
"Sparging O2%": 20.9
1932
}
2033
}
2134
]
@@ -27,9 +40,13 @@
2740
"batch identifier": "BATCH_123",
2841
"description": "Spent Media",
2942
"custom information document": {
30-
"Vessel ID": "3L Bioreactor",
43+
"Cell Type": "Workhog",
44+
"Sample Time": "24-6-2022 14:34:52",
45+
"pH @ Temp": 7.4,
3146
"Chemistry Dilution Ratio": "1:1",
32-
"Cell Type": "Workhog"
47+
"Vessel ID": "3L Bioreactor",
48+
"PCO2 @ Temp": 46.8,
49+
"PO2 @ Temp": 191.6
3350
}
3451
},
3552
"analyte aggregate document": {
@@ -104,13 +121,13 @@
104121
"device control aggregate document": {
105122
"device control document": [
106123
{
107-
"device type": "solution-analyzer",
108124
"detection type": "blood-gas-detection",
125+
"device type": "solution-analyzer",
109126
"custom information document": {
110-
"Vessel Pressure (psi)": 0.0,
111-
"Sparging O2%": 20.9,
112127
"Chemistry Flow Time": 6.67,
113-
"pH / Gas Flow Time": 3.65
128+
"Vessel Pressure (psi)": 0.0,
129+
"pH / Gas Flow Time": 3.65,
130+
"Sparging O2%": 20.9
114131
}
115132
}
116133
]
@@ -122,9 +139,13 @@
122139
"batch identifier": "BATCH_123",
123140
"description": "Spent Media",
124141
"custom information document": {
125-
"Vessel ID": "3L Bioreactor",
142+
"Cell Type": "Workhog",
143+
"Sample Time": "24-6-2022 14:34:52",
144+
"pH @ Temp": 7.4,
126145
"Chemistry Dilution Ratio": "1:1",
127-
"Cell Type": "Workhog"
146+
"Vessel ID": "3L Bioreactor",
147+
"PCO2 @ Temp": 46.8,
148+
"PO2 @ Temp": 191.6
128149
}
129150
},
130151
"pO2": {
@@ -148,13 +169,13 @@
148169
"device control aggregate document": {
149170
"device control document": [
150171
{
151-
"device type": "solution-analyzer",
152172
"detection type": "ph-detection",
173+
"device type": "solution-analyzer",
153174
"custom information document": {
154-
"Vessel Pressure (psi)": 0.0,
155-
"Sparging O2%": 20.9,
156175
"Chemistry Flow Time": 6.67,
157-
"pH / Gas Flow Time": 3.65
176+
"Vessel Pressure (psi)": 0.0,
177+
"pH / Gas Flow Time": 3.65,
178+
"Sparging O2%": 20.9
158179
}
159180
}
160181
]
@@ -166,9 +187,13 @@
166187
"batch identifier": "BATCH_123",
167188
"description": "Spent Media",
168189
"custom information document": {
169-
"Vessel ID": "3L Bioreactor",
190+
"Cell Type": "Workhog",
191+
"Sample Time": "24-6-2022 14:34:52",
192+
"pH @ Temp": 7.4,
170193
"Chemistry Dilution Ratio": "1:1",
171-
"Cell Type": "Workhog"
194+
"Vessel ID": "3L Bioreactor",
195+
"PCO2 @ Temp": 46.8,
196+
"PO2 @ Temp": 191.6
172197
}
173198
},
174199
"pH": {
@@ -185,19 +210,6 @@
185210
},
186211
"analyst": "ANALYST1"
187212
}
188-
],
189-
"data system document": {
190-
"ASM file identifier": "SampleResults2022-06-28_142558.json",
191-
"data system instance identifier": "N/A",
192-
"file name": "SampleResults2022-06-28_142558.csv",
193-
"UNC path": "tests/parsers/novabio_flex2/testdata/SampleResults2022-06-28_142558.csv",
194-
"ASM converter name": "allotropy_novabio_flex2",
195-
"ASM converter version": "0.1.105",
196-
"software name": "NovaBio Flex"
197-
},
198-
"device system document": {
199-
"model number": "Flex2",
200-
"product manufacturer": "Nova Biomedical"
201-
}
213+
]
202214
}
203215
}

0 commit comments

Comments
 (0)