Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cellfinder test fix #400

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading