diff --git a/Dockerfile b/Dockerfile index f8393006..fe0e0d78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ FROM tensorflow/tensorflow:latest-gpu LABEL maintainer="code@adamltyson.com" -RUN pip install cellfinder +RUN pip install brainglobe-workflows CMD ["bash"] diff --git a/MANIFEST.in b/MANIFEST.in index c7354c00..80cc9480 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,8 +6,8 @@ exclude *.yml exclude Dockerfile exclude *.ini -recursive-include cellfinder *.py -include cellfinder/config/* +recursive-include brainglobe-workflows *.py +include brainglobe-workflows/config/* global-include *.pxd diff --git a/README.md b/README.md index b831d0dc..5998243b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ [![Website](https://img.shields.io/website?up_message=online&url=https%3A%2F%2Fbrainglobe.info)](https://brainglobe.info/documentation/cellfinder/index.html) [![Twitter](https://img.shields.io/twitter/follow/brain_globe?style=social)](https://twitter.com/brain_globe) -# Cellfinder +# Brainglobe Workflows + Whole-brain cell detection, registration and analysis. **N.B. If you want to just use the cell detection part of cellfinder, please diff --git a/brainglobe-workflows/__init__.py b/brainglobe-workflows/__init__.py new file mode 100644 index 00000000..9f726d43 --- /dev/null +++ b/brainglobe-workflows/__init__.py @@ -0,0 +1,7 @@ +from importlib.metadata import metadata + +__version__ = metadata("brainglobe_workflows")["version"] +__author__ = metadata("brainglobe_workflows")["author-email"] +__license__ = metadata("brainglobe_workflows")["license"] + +del metadata diff --git a/cellfinder/analyse/__init__.py b/brainglobe-workflows/analyse/__init__.py similarity index 100% rename from cellfinder/analyse/__init__.py rename to brainglobe-workflows/analyse/__init__.py diff --git a/cellfinder/analyse/analyse.py b/brainglobe-workflows/analyse/analyse.py similarity index 99% rename from cellfinder/analyse/analyse.py rename to brainglobe-workflows/analyse/analyse.py index 17133241..266dab4f 100644 --- a/cellfinder/analyse/analyse.py +++ b/brainglobe-workflows/analyse/analyse.py @@ -18,7 +18,7 @@ from brainglobe_utils.general.system import ensure_directory_exists from brainglobe_utils.pandas.misc import sanitise_df -from cellfinder.export.export import export_points +from brainglobe_workflows.export.export import export_points class Point: diff --git a/cellfinder/export/__init__.py b/brainglobe-workflows/export/__init__.py similarity index 100% rename from cellfinder/export/__init__.py rename to brainglobe-workflows/export/__init__.py diff --git a/cellfinder/export/abc4d.py b/brainglobe-workflows/export/abc4d.py similarity index 100% rename from cellfinder/export/abc4d.py rename to brainglobe-workflows/export/abc4d.py diff --git a/cellfinder/export/brainrender.py b/brainglobe-workflows/export/brainrender.py similarity index 100% rename from cellfinder/export/brainrender.py rename to brainglobe-workflows/export/brainrender.py diff --git a/cellfinder/export/export.py b/brainglobe-workflows/export/export.py similarity index 58% rename from cellfinder/export/export.py rename to brainglobe-workflows/export/export.py index 1701f8a5..3b495b7f 100644 --- a/cellfinder/export/export.py +++ b/brainglobe-workflows/export/export.py @@ -1,5 +1,5 @@ -from cellfinder.export.abc4d import export_points as abc4d_export -from cellfinder.export.brainrender import export_points as brainrender_export +from brainglobe_workflows.export.abc4d import export_points as abc4d_export +from brainglobe_workflows.export.brainrender import export_points as brainrender_export def export_points( diff --git a/cellfinder/extract/__init__.py b/brainglobe-workflows/extract/__init__.py similarity index 100% rename from cellfinder/extract/__init__.py rename to brainglobe-workflows/extract/__init__.py diff --git a/cellfinder/extract/extract_cubes.py b/brainglobe-workflows/extract/extract_cubes.py similarity index 99% rename from cellfinder/extract/extract_cubes.py rename to brainglobe-workflows/extract/extract_cubes.py index 54a0b8b3..d3b5763c 100644 --- a/cellfinder/extract/extract_cubes.py +++ b/brainglobe-workflows/extract/extract_cubes.py @@ -22,8 +22,8 @@ from tifffile import tifffile from tqdm import tqdm -from cellfinder.tools import image_processing as img_tools -from cellfinder.tools import system +from brainglobe_workflows.tools import image_processing as img_tools +from brainglobe_workflows.tools import system class StackSizeError(Exception): diff --git a/cellfinder/figures/__init__.py b/brainglobe-workflows/figures/__init__.py similarity index 100% rename from cellfinder/figures/__init__.py rename to brainglobe-workflows/figures/__init__.py diff --git a/cellfinder/figures/figures.py b/brainglobe-workflows/figures/figures.py similarity index 87% rename from cellfinder/figures/figures.py rename to brainglobe-workflows/figures/figures.py index 59380542..13b2f21c 100644 --- a/cellfinder/figures/figures.py +++ b/brainglobe-workflows/figures/figures.py @@ -1,6 +1,6 @@ import logging -from cellfinder.figures import heatmap +from brainglobe_workflows.figures import heatmap def run(args, atlas, downsampled_shape): diff --git a/cellfinder/figures/heatmap.py b/brainglobe-workflows/figures/heatmap.py similarity index 100% rename from cellfinder/figures/heatmap.py rename to brainglobe-workflows/figures/heatmap.py diff --git a/cellfinder/main.py b/brainglobe-workflows/main.py similarity index 97% rename from cellfinder/main.py rename to brainglobe-workflows/main.py index 42046e39..067003e1 100644 --- a/cellfinder/main.py +++ b/brainglobe-workflows/main.py @@ -44,7 +44,7 @@ def main(): suppress_tf_logging(tf_suppress_log_messages) from brainreg.main import main as register - from cellfinder.tools import prep + from brainglobe_workflows.tools import prep start_time = datetime.now() args, arg_groups, what_to_run, atlas = prep.prep_cellfinder_general() @@ -105,9 +105,9 @@ def run_all(args, what_to_run, atlas): from cellfinder_core.tools import prep from cellfinder_core.tools.IO import read_with_dask - from cellfinder.analyse import analyse - from cellfinder.figures import figures - from cellfinder.tools.prep import ( + from brainglobe_workflows.analyse import analyse + from brainglobe_workflows.figures import figures + from brainglobe_workflows.tools.prep import ( prep_candidate_detection, prep_channel_specific_general, ) diff --git a/cellfinder/tools/__init__.py b/brainglobe-workflows/tools/__init__.py similarity index 100% rename from cellfinder/tools/__init__.py rename to brainglobe-workflows/tools/__init__.py diff --git a/cellfinder/tools/image_processing.py b/brainglobe-workflows/tools/image_processing.py similarity index 100% rename from cellfinder/tools/image_processing.py rename to brainglobe-workflows/tools/image_processing.py diff --git a/cellfinder/tools/parser.py b/brainglobe-workflows/tools/parser.py similarity index 99% rename from cellfinder/tools/parser.py rename to brainglobe-workflows/tools/parser.py index e44f9162..ff428780 100644 --- a/cellfinder/tools/parser.py +++ b/brainglobe-workflows/tools/parser.py @@ -24,7 +24,7 @@ ) from cellfinder_core.tools.source_files import source_custom_config_cellfinder -from cellfinder import __version__ +from brainglobe_workflows import __version__ # TODO: Gradually move all paths as strings to Path objects diff --git a/cellfinder/tools/prep.py b/brainglobe-workflows/tools/prep.py similarity index 98% rename from cellfinder/tools/prep.py rename to brainglobe-workflows/tools/prep.py index f52b5368..0a862ee5 100644 --- a/cellfinder/tools/prep.py +++ b/brainglobe-workflows/tools/prep.py @@ -17,10 +17,10 @@ from brainreg.paths import Paths as BrainRegPaths from fancylog import fancylog -import cellfinder as program_for_log -import cellfinder.tools.parser as parser -from cellfinder.tools import system, tools -from cellfinder.tools.parser import cellfinder_parser +import brainglobe_workflows as program_for_log +import brainglobe_workflows.tools.parser as parser +from brainglobe_workflows.tools import system, tools +from brainglobe_workflows.tools.parser import cellfinder_parser def get_arg_groups(args, parser): diff --git a/cellfinder/tools/system.py b/brainglobe-workflows/tools/system.py similarity index 100% rename from cellfinder/tools/system.py rename to brainglobe-workflows/tools/system.py diff --git a/cellfinder/tools/tools.py b/brainglobe-workflows/tools/tools.py similarity index 100% rename from cellfinder/tools/tools.py rename to brainglobe-workflows/tools/tools.py diff --git a/cellfinder/__init__.py b/cellfinder/__init__.py deleted file mode 100644 index dece5176..00000000 --- a/cellfinder/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from importlib.metadata import metadata - -__version__ = metadata("cellfinder")["version"] -__author__ = metadata("cellfinder")["author-email"] -__license__ = metadata("cellfinder")["license"] - -del metadata diff --git a/environment.yml b/environment.yml index 0691db0a..222174be 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ -name: cellfinder +name: brainglobe-workflows dependencies: - python=3.10 - cudatoolkit - cudnn - pip: - - cellfinder + - brainglobe-workflows diff --git a/pyproject.toml b/pyproject.toml index e589b61f..cd17afb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "cellfinder" +name = "brainglobe-workflows" description = "Automated 3D cell detection and registration of whole-brain images" readme = "README.md" license = { file = "LICENSE" } @@ -40,7 +40,7 @@ dependencies = [ dynamic = ["version"] [project.scripts] -cellfinder = "cellfinder.main:main" +cellfinder = "brainglobe_workflows.main:main" [project.optional-dependencies] dev = [ @@ -55,8 +55,8 @@ dev = [ napari = ["napari[pyside2]", "brainglobe-napari-io", "cellfinder-napari"] [project.urls] -source = "https://github.com/brainglobe/cellfinder" -bug_tracker = "https://github.com/brainglobe/cellfinder/issues" +source = "https://github.com/brainglobe/brainglobe-workflows" +bug_tracker = "https://github.com/brainglobe/brainglobe-workflows/issues" homepage = "https://brainglobe.info" documentation = "https://brainglobe.info/documentation/cellfinder" [build-system] @@ -82,7 +82,7 @@ include-package-data = true zip-safe = false [tool.setuptools.packages.find] -include = ["cellfinder"] +include = ["brainglobe-workflows"] exclude = ["tests", "resources"] [tool.setuptools_scm] diff --git a/pytest.ini b/pytest.ini index 769170c1..084521dc 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts = --cov=cellfinder +addopts = --cov=brainglobe-workflows markers = slow: marks tests as slow (deselect with '-m "not slow"') serial diff --git a/tests/tests/test_integration/test_detection.py b/tests/tests/test_integration/test_detection.py index e4cd5e26..52f180d3 100644 --- a/tests/tests/test_integration/test_detection.py +++ b/tests/tests/test_integration/test_detection.py @@ -5,7 +5,7 @@ import brainglobe_utils.IO.cells as cell_io import pytest -from cellfinder.main import main as cellfinder_run +from brainglobe_workflows.main import main as cellfinder_run data_dir = os.path.join( os.getcwd(), "tests", "data", "integration", "detection" diff --git a/tests/tests/test_integration/test_extract.py b/tests/tests/test_integration/test_extract.py index 1116ee58..06786bbd 100644 --- a/tests/tests/test_integration/test_extract.py +++ b/tests/tests/test_integration/test_extract.py @@ -11,7 +11,7 @@ from brainglobe_utils.IO.cells import get_cells from tifffile import tifffile -import cellfinder.extract.extract_cubes as extract_cubes +import brainglobe_workflows.extract.extract_cubes as extract_cubes data_dir = os.path.join("tests", "data") diff --git a/tests/tests/test_integration/test_registration.py b/tests/tests/test_integration/test_registration.py index cc6d66f7..27c05921 100644 --- a/tests/tests/test_integration/test_registration.py +++ b/tests/tests/test_integration/test_registration.py @@ -7,7 +7,7 @@ import pytest from imio.load import load_any -from cellfinder.main import main as cellfinder_run +from brainglobe_workflows.main import main as cellfinder_run data_dir = os.path.join( os.getcwd(), diff --git a/tests/tests/test_unit/test_tools/test_image_processing.py b/tests/tests/test_unit/test_tools/test_image_processing.py index 788fa01d..0b7ed182 100644 --- a/tests/tests/test_unit/test_tools/test_image_processing.py +++ b/tests/tests/test_unit/test_tools/test_image_processing.py @@ -2,7 +2,7 @@ import numpy as np -from cellfinder.tools import image_processing as img_tools +from brainglobe_workflows.tools import image_processing as img_tools def test_crop_center_2d(): diff --git a/tests/tests/test_unit/test_tools/test_prep.py b/tests/tests/test_unit/test_tools/test_prep.py index 404b5703..9c8f6a35 100644 --- a/tests/tests/test_unit/test_tools/test_prep.py +++ b/tests/tests/test_unit/test_tools/test_prep.py @@ -3,7 +3,7 @@ import pytest from brainglobe_utils.general.exceptions import CommandLineInputError -from cellfinder.tools import prep +from brainglobe_workflows.tools import prep # import shutil diff --git a/tests/tests/test_unit/test_tools/test_system.py b/tests/tests/test_unit/test_tools/test_system.py index 480036d1..b33ec10d 100644 --- a/tests/tests/test_unit/test_tools/test_system.py +++ b/tests/tests/test_unit/test_tools/test_system.py @@ -6,7 +6,7 @@ from brainglobe_utils.general.exceptions import CommandLineInputError from brainglobe_utils.general.system import ensure_directory_exists -import cellfinder.tools.system as system +import brainglobe_workflows.tools.system as system data_dir = Path("tests", "data") background_im_dir = os.path.join(data_dir, "background") diff --git a/tests/tests/test_unit/test_tools/test_tools_general.py b/tests/tests/test_unit/test_tools/test_tools_general.py index 61cce44e..70f7fd55 100644 --- a/tests/tests/test_unit/test_tools/test_tools_general.py +++ b/tests/tests/test_unit/test_tools/test_tools_general.py @@ -3,7 +3,7 @@ import numpy as np import pytest -import cellfinder.tools.tools as tools +import brainglobe_workflows.tools.tools as tools a = [1, "a", 10, 30] b = [30, 10, "c", "d"]