Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
Change-Id: I39c4bb0a282d5b573ee23c3a17010c8e0217a496
  • Loading branch information
Jaquier Aurélien Tristan committed Oct 1, 2024
1 parent f74bf5f commit 8b8bc02
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
9 changes: 5 additions & 4 deletions bluepyemodel/emodel_pipeline/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ def plot_bAP(
"the emodel is bad and cannot even compute curent threshold."
)
return fig, ax

if 0 in apical_distances:
apical_x_fit, apical_y_fit = bAP_fit(apical_feature, apical_distances, apical_values)
if 0 in basal_distances:
Expand Down Expand Up @@ -1677,10 +1677,11 @@ def plot_sinespec(

if voltage_key not in responses or current_key not in responses:
logger.warning(
f"Could not find sinespec responses for emodel {model.emodel_metadata.emodel} "
f"with seed {model.seed}. "
"Could not find sinespec responses %s for emodel with seed %s. "
"This is most probably due to a bad model unable to compute threshold. "
"Skipping Sinespec plot."
"Skipping Sinespec plot.",
model.emodel_metadata.emodel,
model.seed,
)
return fig, axs

Expand Down
15 changes: 8 additions & 7 deletions bluepyemodel/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,23 @@ def multi_locations(section_name, additional_multiloc_map):
if additional_multiloc_map is not None:
multiloc_map.update(additional_multiloc_map)

seclist_locations = [
seclist_locations = [
ephys.locations.NrnSeclistLocation(sec, seclist_name=sec)
for sec in multiloc_map.get(section_name, [section_name])
]

for sec_loc in seclist_locations:
# all and myelinated are also accepted
if (
sec_loc.seclist_name not in multiloc_map["allact"] and
sec_loc.seclist_name != "all" and
sec_loc.seclist_name != "myelinated"
sec_loc.seclist_name not in multiloc_map["allact"]
and sec_loc.seclist_name != "all"
and sec_loc.seclist_name != "myelinated"
):
logger.warning(
f"Section location {sec_loc.seclist_name} "
f"not in expected locations {multiloc_map['allact']}. "
"This might make the cell crash at run time."
"Section location %s not in expected locations %s. "
"This might make the cell crash at run time.",
sec_loc.seclist_name,
multiloc_map["allact"],
)

return seclist_locations
Expand Down
4 changes: 2 additions & 2 deletions bluepyemodel/tasks/luigi_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs):
species=self.species,
brain_region=self.brain_region,
iteration_tag=self.iteration_tag,
**EmodelAPIConfig().api_args
**EmodelAPIConfig().api_args,
)

def get_mapper(self):
Expand Down Expand Up @@ -112,7 +112,7 @@ def __init__(
species=species,
brain_region=brain_region,
iteration_tag=iteration_tag,
**EmodelAPIConfig().api_args
**EmodelAPIConfig().api_args,
)


Expand Down

0 comments on commit 8b8bc02

Please sign in to comment.