Skip to content

Commit

Permalink
Cellfinder test fix (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Apr 12, 2024
1 parent de73504 commit daa13e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cellfinder/core/download/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import shutil
import tarfile
import urllib.request
from pathlib import Path

from brainglobe_utils.general.config import get_config_obj
from brainglobe_utils.general.system import disk_free_gb
Expand Down Expand Up @@ -124,5 +125,8 @@ def write_model_to_config(new_model_path, orig_config, custom_config):
data[i] = line.replace(
f"model_path = '{orig_path}", f"model_path = '{new_model_path}"
)

custom_config_path = Path(custom_config)
custom_config_path.parent.mkdir(parents=True, exist_ok=True)
with open(custom_config, "w") as out_conf:
out_conf.writelines(data)

0 comments on commit daa13e2

Please sign in to comment.