Skip to content

Commit

Permalink
update metadata key names in mechanism (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkilic authored Dec 8, 2023
1 parent cafd56b commit d784eaa
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions bluepyemodel/model/model_configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,21 @@ def get_gene_based_configuration(self):
version = None
for k in nexus_keys:
if k["name"] == m["name"]:
version = k.get("modelid", None)
version = k.get("modelid") if "modelid" in k else k.get("modelId", None)

temp_entry = m.get("temperature", None)
if isinstance(temp_entry, dict) and "value" in temp_entry:
temperature = temp_entry.get("value")
else:
temperature = temp_entry

self.configuration.add_mechanism(
m["name"],
locations=m["location"],
stochastic=m.get("stochastic", None),
version=version,
temperature=m.get("temperature", None),
ljp_corrected=m.get("ljp_corrected", None),
temperature=temperature,
ljp_corrected=m.get("ljp_corrected")
if "ljp_corrected" in m
else m.get("isLjpCorrected", None),
)

0 comments on commit d784eaa

Please sign in to comment.