Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename cellfinder_core to cellfinder #95

Merged
merged 4 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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