From a6b9a584e0e118b55917f090f9e628ae3a21fee3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Fri, 6 Sep 2024 12:58:28 +0000 Subject: [PATCH 1/2] Fix importing robot file. --- aurora/inventory/samples/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aurora/inventory/samples/importer.py b/aurora/inventory/samples/importer.py index ab95e8d7..9ac453c7 100644 --- a/aurora/inventory/samples/importer.py +++ b/aurora/inventory/samples/importer.py @@ -255,7 +255,7 @@ def _parse_sample(self, base: dict, df: pd.Series) -> BatterySample: "id": df["id"], "specs": { "manufacturer": base["manufacturer"], - "case": df["Casing Type"], + "case": str(df["Casing Type"]), "composition": { "description": base["description"], "anode": { From f9d16daa562397bc987f9e6ea616d61338c10c1c Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Fri, 6 Sep 2024 12:58:44 +0000 Subject: [PATCH 2/2] Show codes and computers when getting the code list --- aurora/experiment/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aurora/experiment/model.py b/aurora/experiment/model.py index 9f14666d..1b7a3ce7 100644 --- a/aurora/experiment/model.py +++ b/aurora/experiment/model.py @@ -36,13 +36,14 @@ def __init__( def get_codes(self) -> list[str]: """docstring""" - return orm.QueryBuilder().append( + qb = orm.QueryBuilder().append( orm.Code, filters={ "attributes.input_plugin": "aurora.cycler", }, project=["label"], - ).all(flat=True) + ) + return [f"{code.label}@{code.computer.label}" for code in qb.all()] # TODO make async! def submit(