Skip to content

Commit

Permalink
rename cellfinder workflow to avoid circular import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Dec 16, 2023
1 parent 66fa60a commit 3703c4a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
8 changes: 3 additions & 5 deletions benchmarks/cellfinder_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
from cellfinder_core.main import main as cellfinder_run
from cellfinder_core.tools.IO import read_with_dask

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


class TimeBenchmarkPrepGIN:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ napari = [
"Source Code" = "https://github.com/brainglobe/brainglobe-workflows"

[project.scripts]
cellfinder-workflow = "brainglobe_workflows.cellfinder_core.cellfinder_core:main_app_wrapper"
cellfinder-workflow = "brainglobe_workflows.cellfinder_core.cellfinder:main_app_wrapper"
cellfinder = "brainglobe_workflows.cellfinder_brainreg.main:main"

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion tests/cellfinder_core/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pooch
import pytest

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

Expand Down
4 changes: 2 additions & 2 deletions tests/cellfinder_core/test_integration/test_cellfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pytest

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


@pytest.mark.parametrize(
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_script(
Path(__file__).resolve().parents[3]
/ "brainglobe_workflows"
/ "cellfinder_core"
/ "cellfinder_core.py"
/ "cellfinder.py"
)
subprocess_input = [
sys.executable,
Expand Down
10 changes: 3 additions & 7 deletions tests/cellfinder_core/test_unit/test_cellfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
import pooch
import pytest

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


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

return DEFAULT_JSON_CONFIG_PATH_CELLFINDER

Expand Down

0 comments on commit 3703c4a

Please sign in to comment.