Skip to content

Commit

Permalink
Rename cellfinder_core to cellfinder (#95)
Browse files Browse the repository at this point in the history
* rename benchmarks module

* rename cellfinder_core refs to cellfinder only

* fix line length

* Merge branch 'main' into smg/rename_cellfinder_workflow
  • Loading branch information
sfmig committed May 2, 2024
1 parent e175ec8 commit 918ac9f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 22 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,3 @@ pip-wheel-metadata/
.asv/
benchmarks/results/*
benchmarks/html/*
# ignore bare repository cloned by asv
brainglobe-workflows
4 changes: 2 additions & 2 deletions benchmarks/cellfinder_core.py → benchmarks/cellfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion brainglobe_workflows/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 @@ -85,7 +85,7 @@ def GIN_default_location() -> Path:
Path.home()
/ ".brainglobe"
/ "workflows"
/ "cellfinder_core"
/ "cellfinder"
/ "cellfinder_test_data"
)

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 @@ -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()
Expand Down Expand Up @@ -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)))
Expand Down
12 changes: 6 additions & 6 deletions tests/cellfinder_core/test_unit/test_cellfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down Expand Up @@ -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,
)

Expand Down Expand Up @@ -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,
)

Expand Down Expand Up @@ -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,
)

Expand Down

0 comments on commit 918ac9f

Please sign in to comment.