diff --git a/brainglobe_benchmarks/cellfinder.py b/brainglobe_benchmarks/cellfinder_core.py similarity index 96% rename from brainglobe_benchmarks/cellfinder.py rename to brainglobe_benchmarks/cellfinder_core.py index e471aad7..8b1f6959 100644 --- a/brainglobe_benchmarks/cellfinder.py +++ b/brainglobe_benchmarks/cellfinder_core.py @@ -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: diff --git a/tests/test_integration/__init__.py b/brainglobe_workflows/cellfinder_core/__init__.py similarity index 100% rename from tests/test_integration/__init__.py rename to brainglobe_workflows/cellfinder_core/__init__.py diff --git a/brainglobe_workflows/cellfinder.py b/brainglobe_workflows/cellfinder_core/cellfinder_core.py similarity index 98% rename from brainglobe_workflows/cellfinder.py rename to brainglobe_workflows/cellfinder_core/cellfinder_core.py index ec6dfa60..93670279 100644 --- a/brainglobe_workflows/cellfinder.py +++ b/brainglobe_workflows/cellfinder_core/cellfinder_core.py @@ -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] diff --git a/brainglobe_workflows/utils.py b/brainglobe_workflows/cellfinder_core/utils.py similarity index 97% rename from brainglobe_workflows/utils.py rename to brainglobe_workflows/cellfinder_core/utils.py index 4b3bdac3..717ca7e9 100644 --- a/brainglobe_workflows/utils.py +++ b/brainglobe_workflows/cellfinder_core/utils.py @@ -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" diff --git a/tests/test_integration/brainglobe_benchmarks/__init__.py b/tests/cellfinder_core/__init__.py similarity index 100% rename from tests/test_integration/brainglobe_benchmarks/__init__.py rename to tests/cellfinder_core/__init__.py diff --git a/tests/conftest.py b/tests/cellfinder_core/conftest.py similarity index 94% rename from tests/conftest.py rename to tests/cellfinder_core/conftest.py index 83e05553..7e115705 100644 --- a/tests/conftest.py +++ b/tests/cellfinder_core/conftest.py @@ -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() @@ -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") diff --git a/tests/test_integration/brainglobe_workflows/__init__.py b/tests/cellfinder_core/test_integration/__init__.py similarity index 100% rename from tests/test_integration/brainglobe_workflows/__init__.py rename to tests/cellfinder_core/test_integration/__init__.py diff --git a/tests/test_unit/__init__.py b/tests/cellfinder_core/test_integration/brainglobe_benchmarks/__init__.py similarity index 100% rename from tests/test_unit/__init__.py rename to tests/cellfinder_core/test_integration/brainglobe_benchmarks/__init__.py diff --git a/tests/test_integration/brainglobe_benchmarks/test_cellfinder.py b/tests/cellfinder_core/test_integration/brainglobe_benchmarks/test_cellfinder.py similarity index 100% rename from tests/test_integration/brainglobe_benchmarks/test_cellfinder.py rename to tests/cellfinder_core/test_integration/brainglobe_benchmarks/test_cellfinder.py diff --git a/tests/test_unit/brainglobe_benchmarks/__init__.py b/tests/cellfinder_core/test_integration/brainglobe_workflows/__init__.py similarity index 100% rename from tests/test_unit/brainglobe_benchmarks/__init__.py rename to tests/cellfinder_core/test_integration/brainglobe_workflows/__init__.py diff --git a/tests/test_integration/brainglobe_workflows/test_cellfinder.py b/tests/cellfinder_core/test_integration/brainglobe_workflows/test_cellfinder.py similarity index 98% rename from tests/test_integration/brainglobe_workflows/test_cellfinder.py rename to tests/cellfinder_core/test_integration/brainglobe_workflows/test_cellfinder.py index 1f179b7b..ae4798fc 100644 --- a/tests/test_integration/brainglobe_workflows/test_cellfinder.py +++ b/tests/cellfinder_core/test_integration/brainglobe_workflows/test_cellfinder.py @@ -5,7 +5,7 @@ import pytest -from brainglobe_workflows.cellfinder import main +from brainglobe_workflows.cellfinder_core.cellfinder_core import main @pytest.mark.parametrize( diff --git a/tests/test_unit/brainglobe_workflows/__init__.py b/tests/cellfinder_core/test_unit/__init__.py similarity index 100% rename from tests/test_unit/brainglobe_workflows/__init__.py rename to tests/cellfinder_core/test_unit/__init__.py diff --git a/tests/cellfinder_core/test_unit/brainglobe_benchmarks/__init__.py b/tests/cellfinder_core/test_unit/brainglobe_benchmarks/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/cellfinder_core/test_unit/brainglobe_workflows/__init__.py b/tests/cellfinder_core/test_unit/brainglobe_workflows/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_unit/brainglobe_workflows/conftest.py b/tests/cellfinder_core/test_unit/brainglobe_workflows/conftest.py similarity index 69% rename from tests/test_unit/brainglobe_workflows/conftest.py rename to tests/cellfinder_core/test_unit/brainglobe_workflows/conftest.py index ae85bc53..13d6b859 100644 --- a/tests/test_unit/brainglobe_workflows/conftest.py +++ b/tests/cellfinder_core/test_unit/brainglobe_workflows/conftest.py @@ -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 diff --git a/tests/test_unit/brainglobe_workflows/test_cellfinder.py b/tests/cellfinder_core/test_unit/brainglobe_workflows/test_cellfinder.py similarity index 96% rename from tests/test_unit/brainglobe_workflows/test_cellfinder.py rename to tests/cellfinder_core/test_unit/brainglobe_workflows/test_cellfinder.py index ddb4c706..08d4db38 100644 --- a/tests/test_unit/brainglobe_workflows/test_cellfinder.py +++ b/tests/cellfinder_core/test_unit/brainglobe_workflows/test_cellfinder.py @@ -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() @@ -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 diff --git a/tests/test_unit/brainglobe_workflows/test_utils.py b/tests/cellfinder_core/test_unit/brainglobe_workflows/test_utils.py similarity index 93% rename from tests/test_unit/brainglobe_workflows/test_utils.py rename to tests/cellfinder_core/test_unit/brainglobe_workflows/test_utils.py index 2ec8d19e..bf2a76cf 100644 --- a/tests/test_unit/brainglobe_workflows/test_utils.py +++ b/tests/cellfinder_core/test_unit/brainglobe_workflows/test_utils.py @@ -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,