Skip to content

Commit

Permalink
rename cellfinder workflow to cellfinder_core (to separate from cellf…
Browse files Browse the repository at this point in the history
…inder-brainreg CLI while keeping backwards comp) WIP
  • Loading branch information
sfmig committed Dec 14, 2023
1 parent 466667c commit 98b46d2
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
from cellfinder_core.main import main as cellfinder_run
from cellfinder_core.tools.IO import read_with_dask

from brainglobe_workflows.cellfinder import (
from brainglobe_workflows.cellfinder_core.cellfinder_core import (
CellfinderConfig,
run_workflow_from_cellfinder_run,
)
from brainglobe_workflows.cellfinder import setup as setup_cellfinder_workflow
from brainglobe_workflows.utils import DEFAULT_JSON_CONFIG_PATH_CELLFINDER
from brainglobe_workflows.cellfinder_core.cellfinder_core import (
setup as setup_cellfinder_workflow,
)
from brainglobe_workflows.cellfinder_core.utils import (
DEFAULT_JSON_CONFIG_PATH_CELLFINDER,
)


class TimeBenchmarkPrepGIN:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
from cellfinder_core.tools.IO import read_with_dask
from cellfinder_core.train.train_yml import depth_type

from brainglobe_workflows.utils import (
from brainglobe_workflows.cellfinder_core.utils import (
DEFAULT_JSON_CONFIG_PATH_CELLFINDER,
config_parser,
setup_logger,
)
from brainglobe_workflows.utils import __name__ as LOGGER_NAME
from brainglobe_workflows.cellfinder_core.utils import __name__ as LOGGER_NAME

Pathlike = Union[str, os.PathLike]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from typing import List

DEFAULT_JSON_CONFIGS_PATH = Path(__file__).resolve().parent / "configs"
DEFAULT_JSON_CONFIGS_PATH = Path(__file__).resolve().parents[1] / "configs"

DEFAULT_JSON_CONFIG_PATH_CELLFINDER = (
DEFAULT_JSON_CONFIGS_PATH / "cellfinder.json"
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions tests/conftest.py → tests/cellfinder_core/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import pooch
import pytest

from brainglobe_workflows.cellfinder import read_cellfinder_config
from brainglobe_workflows.cellfinder_core.cellfinder_core import (
read_cellfinder_config,
)


@pytest.fixture()
Expand All @@ -18,7 +20,7 @@ def input_configs_dir() -> Path:
Path
Test data directory path
"""
return Path(__file__).parent / "data"
return Path(__file__).parents[1] / "data"


@pytest.fixture(scope="session")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pytest

from brainglobe_workflows.cellfinder import main
from brainglobe_workflows.cellfinder_core.cellfinder_core import main


@pytest.mark.parametrize(
Expand Down
File renamed without changes.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def custom_logger_name() -> str:
str
Name of custom logger
"""
from brainglobe_workflows.utils import __name__ as logger_name
from brainglobe_workflows.cellfinder_core.utils import (
__name__ as logger_name,
)

return logger_name
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
import pooch
import pytest

from brainglobe_workflows.cellfinder import (
from brainglobe_workflows.cellfinder_core.cellfinder_core import (
CellfinderConfig,
add_signal_and_background_files,
read_cellfinder_config,
run_workflow_from_cellfinder_run,
setup_workflow,
)
from brainglobe_workflows.cellfinder import setup as setup_full
from brainglobe_workflows.utils import setup_logger
from brainglobe_workflows.cellfinder_core.cellfinder_core import (
setup as setup_full,
)
from brainglobe_workflows.cellfinder_core.utils import setup_logger


@pytest.fixture()
Expand All @@ -27,7 +29,9 @@ def default_input_config_cellfinder() -> Path:
Path to default input config
"""
from brainglobe_workflows.utils import DEFAULT_JSON_CONFIG_PATH_CELLFINDER
from brainglobe_workflows.cellfinder_core.utils import (
DEFAULT_JSON_CONFIG_PATH_CELLFINDER,
)

return DEFAULT_JSON_CONFIG_PATH_CELLFINDER

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from brainglobe_workflows.utils import (
from brainglobe_workflows.cellfinder_core.utils import (
DEFAULT_JSON_CONFIG_PATH_CELLFINDER,
config_parser,
setup_logger,
Expand Down

0 comments on commit 98b46d2

Please sign in to comment.