Skip to content

Commit 8abe012

Browse files
joshua-benchlingnathan-stender
authored andcommitted
feat: Mabtech Apex - support files with different plate info (#1099)
1 parent 9eb3b67 commit 8abe012

3 files changed

Lines changed: 7154 additions & 2 deletions

File tree

src/allotropy/parsers/mabtech_apex/mabtech_apex_reader.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ def __init__(self, raw_contents: dict[str, pd.DataFrame]) -> None:
3333
self.data = self._get_data(contents)
3434

3535
def _get_plate_info(self, contents: dict[str, pd.DataFrame]) -> SeriesData:
36+
sheet_df = None
37+
for name in ["Plate Information", "Plate Info"]:
38+
if name in contents:
39+
sheet_df = contents[name]
40+
break
3641
sheet = (
3742
assert_not_none(
38-
contents.get("Plate Information"),
39-
msg="Unable to find 'Plate Information' sheet.",
43+
sheet_df,
44+
msg="Unable to find 'Plate Information' or 'Plate Info' sheet.",
4045
)
4146
.dropna(axis=1, how="all")
4247
.T

0 commit comments

Comments
 (0)