Skip to content

Commit

Permalink
Merge pull request #80 from BlueBrain/fix-mech-dir-check
Browse files Browse the repository at this point in the history
Fix mechanisms directory check in Luigi Task
  • Loading branch information
ilkilic authored Nov 2, 2023
2 parents 2eff3e1 + 135b89d commit 2bea553
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bluepyemodel/tasks/emodel_creation/optimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,13 @@ def output(self):
architectures = ["x86_64", "i686", "powerpc", "umac"]

# Detect the first existing architecture
arch_dir = None
arch_dir = "x86_64" # default
for arch in architectures:
dir_to_check = mechanisms_directory.parents[0] / arch
if dir_to_check.exists() and dir_to_check.is_dir():
arch_dir = dir_to_check
break

if arch_dir is None:
raise ValueError("No valid architecture directory found")

for filepath in glob.glob(f"{str(mechanisms_directory)}/*.mod"):
compile_path = mechanisms_directory.parents[0] / arch_dir / f"{Path(filepath).stem}.o"
targets.append(luigi.LocalTarget(compile_path))
Expand Down

0 comments on commit 2bea553

Please sign in to comment.