|
1 | | -import json |
2 | | -from pathlib import Path, PureWindowsPath |
3 | | -import warnings |
4 | | - |
5 | 1 | from allotropy.allotrope.models.adm.binding_affinity_analyzer.wd._2024._12.binding_affinity_analyzer import ( |
6 | 2 | Model, |
7 | 3 | ) |
@@ -36,24 +32,8 @@ class CytivaBiacoreT200ControlParser(VendorParser[MapperData, Model]): |
36 | 32 | def create_data(self, named_file_contents: NamedFileContents) -> MapperData: |
37 | 33 | base_data = DictData(decode_data(named_file_contents)) |
38 | 34 | data = Data.create(base_data) |
39 | | - mapper_data = MapperData( |
| 35 | + return MapperData( |
40 | 36 | metadata=create_metadata(data, named_file_contents), |
41 | 37 | measurement_groups=create_measurement_groups(data), |
42 | 38 | calculated_data=create_calculated_data(data), |
43 | 39 | ) |
44 | | - try: |
45 | | - unread = base_data.get_unread_deep() |
46 | | - original_path = named_file_contents.original_file_path |
47 | | - # Derive file stem robustly for both POSIX and Windows-style paths |
48 | | - stem = ( |
49 | | - PureWindowsPath(original_path).stem |
50 | | - if "\\" in original_path and "/" not in original_path |
51 | | - else Path(original_path).stem |
52 | | - ) |
53 | | - out_name = f"{stem}data_unread_2.json" |
54 | | - with open(out_name, "w", encoding="utf-8") as f: |
55 | | - json.dump(unread, f, ensure_ascii=False, indent=2) |
56 | | - except Exception as e: |
57 | | - # Best-effort debug artifact; do not break parsing on failure |
58 | | - warnings.warn(f"Failed to write unread debug file: {e!s}", stacklevel=1) |
59 | | - return mapper_data |
0 commit comments