aligns chained requests test with main.py (debug mode)
This commit is contained in:
@@ -174,14 +174,14 @@ if __name__=="__main__":
|
||||
eT = eT[0]
|
||||
except Exception:
|
||||
print("Usage: i|item|items|i[ELABID] for items, e|experiment|experiments|e[ELABID] for experiments.")
|
||||
pass
|
||||
continue
|
||||
match eT:
|
||||
case "items" | "i" | "item":
|
||||
entryType = "items"
|
||||
case "experiments" | "e" | "exp" | "experiment":
|
||||
entryType = "experiments"
|
||||
case _:
|
||||
pass
|
||||
continue
|
||||
# This will probably be reworked in production
|
||||
try:
|
||||
elabid = elabid
|
||||
@@ -198,10 +198,9 @@ if __name__=="__main__":
|
||||
item = Entrypoint(data)
|
||||
elif data.get("category_title") in ["PLD Target", "Substrate"]:
|
||||
item = Material(data)
|
||||
print(item.get_compound_formula())
|
||||
print(item.get_compound_formula(apikey))
|
||||
else:
|
||||
raise Exception("The selected item or experiment is not in one of the following categories: [Sample, PLD Target, Substrate, PLD Deposition].")
|
||||
result = item.__dict__
|
||||
result.pop("extra")
|
||||
print(result)
|
||||
# print(json.dumps(chain.sample_data))
|
||||
# print(json.dumps(chain.linked_experiments))
|
||||
# print(chain.batch_elabid)
|
||||
print(result)
|
||||
Reference in New Issue
Block a user