diff --git a/brainglobe_workflows/cellfinder_core/cellfinder_core.py b/brainglobe_workflows/cellfinder_core/cellfinder_core.py index 65a94257..d449a557 100644 --- a/brainglobe_workflows/cellfinder_core/cellfinder_core.py +++ b/brainglobe_workflows/cellfinder_core/cellfinder_core.py @@ -437,27 +437,12 @@ def main( return cfg -def main_app_wrapper(): - """Parse command line arguments and - run cellfinder setup and workflow - - This function is used to define an entry-point, - that allows the user to run the cellfinder workflow - for a given input config file as: - `cellfinder-workflow --config `. - - If no input config file is provided, the default is used. - - """ +if __name__ == "__main__": # parse CLI arguments args = config_parser( - sys.argv[1:], # sys.argv[0] is the script name + sys.argv[1:], str(DEFAULT_JSON_CONFIG_PATH_CELLFINDER), ) # run setup and workflow _ = main(args.config) - - -if __name__ == "__main__": - main_app_wrapper() diff --git a/pyproject.toml b/pyproject.toml index 809eed3d..7d5e4154 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,6 @@ napari = ["napari[pyqt5]", "brainglobe-napari-io", "cellfinder[napari]>=1.0.0"] "Source Code" = "https://github.com/brainglobe/brainglobe-workflows" [project.scripts] -cellfinder-workflow = "brainglobe_workflows.cellfinder_core.cellfinder_core:main_app_wrapper" brainmapper = "brainglobe_workflows.brainmapper.main:main" [build-system] diff --git a/tests/cellfinder_core/test_integration/test_cellfinder.py b/tests/cellfinder_core/test_integration/test_cellfinder.py index 9af0c0b0..4dec6b68 100644 --- a/tests/cellfinder_core/test_integration/test_cellfinder.py +++ b/tests/cellfinder_core/test_integration/test_cellfinder.py @@ -1,4 +1,3 @@ -import subprocess from pathlib import Path from typing import Optional @@ -50,21 +49,3 @@ def test_main_w_inputs( # check output files exist assert Path(cfg._detected_cells_path).is_file() - - -def test_entry_point_help(): - """ - Smoke test the cellfinder workflow entry point by checking - help is printed out successfully - """ - - # define CLI input - subprocess_input = ["cellfinder-workflow", "--help"] - - # run workflow - subprocess_output = subprocess.run( - subprocess_input, - ) - - # check returncode - assert subprocess_output.returncode == 0