diff --git a/.gitignore b/.gitignore index 2383537c..17f81f32 100644 --- a/.gitignore +++ b/.gitignore @@ -133,5 +133,3 @@ pip-wheel-metadata/ .asv/ benchmarks/results/* benchmarks/html/* -# ignore bare repository cloned by asv -brainglobe-workflows diff --git a/benchmarks/cellfinder_core.py b/benchmarks/cellfinder.py similarity index 98% rename from benchmarks/cellfinder_core.py rename to benchmarks/cellfinder.py index e8b6852a..e3fc06a4 100644 --- a/benchmarks/cellfinder_core.py +++ b/benchmarks/cellfinder.py @@ -8,11 +8,11 @@ from cellfinder.core.tools.IO import read_with_dask from cellfinder.core.tools.prep import prep_models -from brainglobe_workflows.cellfinder_core.cellfinder_core import ( +from brainglobe_workflows.cellfinder.cellfinder import ( CellfinderConfig, run_workflow_from_cellfinder_run, ) -from brainglobe_workflows.cellfinder_core.cellfinder_core import ( +from brainglobe_workflows.cellfinder.cellfinder import ( setup as setup_cellfinder_workflow, ) from brainglobe_workflows.utils import DEFAULT_JSON_CONFIG_PATH_CELLFINDER diff --git a/brainglobe_workflows/cellfinder_core/__init__.py b/brainglobe_workflows/cellfinder/__init__.py similarity index 100% rename from brainglobe_workflows/cellfinder_core/__init__.py rename to brainglobe_workflows/cellfinder/__init__.py diff --git a/brainglobe_workflows/cellfinder_core/cellfinder_core.py b/brainglobe_workflows/cellfinder/cellfinder.py similarity index 97% rename from brainglobe_workflows/cellfinder_core/cellfinder_core.py rename to brainglobe_workflows/cellfinder/cellfinder.py index d449a557..6a0789c5 100644 --- a/brainglobe_workflows/cellfinder_core/cellfinder_core.py +++ b/brainglobe_workflows/cellfinder/cellfinder.py @@ -3,17 +3,13 @@ It receives as an (optional) command line input the path to a configuration json file, that holds the values of the required parameters for the workflow. + python brainglobe_workflows/cellfinder.py --config path/to/config.json + If no input json file is passed as a configuration, the default configuration defined at brainglobe_workflows/cellfinder/default_config.json is used. -Example usage: - - to pass a custom configuration, run (from the cellfinder_main.py - parent directory): - python cellfinder_core.py --config path/to/input/config.json - - to use the default configuration, run - python cellfinder_core.py - + python brainglobe_workflows/cellfinder.py """ @@ -81,7 +77,7 @@ class CellfinderConfig: # install path: default path for downloaded and output data _install_path: Pathlike = ( - Path.home() / ".brainglobe" / "workflows" / "cellfinder_core" + Path.home() / ".brainglobe" / "workflows" / "cellfinder" ) # input data paths diff --git a/brainglobe_workflows/utils.py b/brainglobe_workflows/utils.py index 9f1eb8d5..30658643 100644 --- a/brainglobe_workflows/utils.py +++ b/brainglobe_workflows/utils.py @@ -74,7 +74,7 @@ def config_parser( To launch the cellfinder workflow with default parameters, run: `cellfinder-workflow`. The default parameters are those specifed in brainglobe_workflows/ - cellfinder_core/configs/cellfinder.json. + cellfinder/configs/cellfinder.json. To launch the cellfinder workflow with a specific set of input diff --git a/tests/cellfinder_core/conftest.py b/tests/cellfinder_core/conftest.py index f683d617..9914a160 100644 --- a/tests/cellfinder_core/conftest.py +++ b/tests/cellfinder_core/conftest.py @@ -85,7 +85,7 @@ def GIN_default_location() -> Path: Path.home() / ".brainglobe" / "workflows" - / "cellfinder_core" + / "cellfinder" / "cellfinder_test_data" ) diff --git a/tests/cellfinder_core/test_integration/test_cellfinder.py b/tests/cellfinder_core/test_integration/test_cellfinder.py index 4dec6b68..40d1b6a7 100644 --- a/tests/cellfinder_core/test_integration/test_cellfinder.py +++ b/tests/cellfinder_core/test_integration/test_cellfinder.py @@ -11,7 +11,7 @@ def test_main(): """ # import inside the test function so that required functions are # monkeypatched first - from brainglobe_workflows.cellfinder_core.cellfinder_core import main + from brainglobe_workflows.cellfinder.cellfinder import main # run main cfg = main() @@ -42,7 +42,7 @@ def test_main_w_inputs( request : pytest.FixtureRequest Pytest fixture to enable requesting fixtures by name """ - from brainglobe_workflows.cellfinder_core.cellfinder_core import main + from brainglobe_workflows.cellfinder.cellfinder import main # run main cfg = main(str(request.getfixturevalue(input_config))) diff --git a/tests/cellfinder_core/test_unit/test_cellfinder.py b/tests/cellfinder_core/test_unit/test_cellfinder.py index e300c743..11136c01 100644 --- a/tests/cellfinder_core/test_unit/test_cellfinder.py +++ b/tests/cellfinder_core/test_unit/test_cellfinder.py @@ -200,7 +200,7 @@ def test_add_input_paths( Pytest fixture to enable requesting fixtures by name """ - from brainglobe_workflows.cellfinder_core.cellfinder_core import ( + from brainglobe_workflows.cellfinder.cellfinder import ( CellfinderConfig, ) @@ -245,7 +245,7 @@ def test_read_cellfinder_config( Pytest fixture to enable requesting fixtures by name """ - from brainglobe_workflows.cellfinder_core.cellfinder_core import ( + from brainglobe_workflows.cellfinder.cellfinder import ( read_cellfinder_config, ) @@ -318,10 +318,10 @@ def test_setup( request : pytest.FixtureRequest Pytest fixture to enable requesting fixtures by name """ - from brainglobe_workflows.cellfinder_core.cellfinder_core import ( + from brainglobe_workflows.cellfinder.cellfinder import ( CellfinderConfig, ) - from brainglobe_workflows.cellfinder_core.cellfinder_core import ( + from brainglobe_workflows.cellfinder.cellfinder import ( setup as setup_workflow, ) @@ -358,10 +358,10 @@ def test_run_workflow_from_cellfinder_run( request : pytest.FixtureRequest Pytest fixture to enable requesting fixtures by name """ - from brainglobe_workflows.cellfinder_core.cellfinder_core import ( + from brainglobe_workflows.cellfinder.cellfinder import ( run_workflow_from_cellfinder_run, ) - from brainglobe_workflows.cellfinder_core.cellfinder_core import ( + from brainglobe_workflows.cellfinder.cellfinder import ( setup as setup_workflow, )