Skip to content

Commit

Permalink
Rename package to brainglobe-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Sep 1, 2023
1 parent a9f6060 commit 73fe4c9
Show file tree
Hide file tree
Showing 33 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tensorflow/tensorflow:latest-gpu
LABEL maintainer="[email protected]"
RUN pip install cellfinder
RUN pip install brainglobe-workflows
CMD ["bash"]
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions brainglobe-workflows/__init__.py
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from cellfinder.figures import heatmap
from brainglobe_workflows.figures import heatmap


def run(args, atlas, downsampled_shape):
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions cellfinder/main.py → brainglobe-workflows/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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,
)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions cellfinder/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: cellfinder
name: brainglobe-workflows
dependencies:
- python=3.10
- cudatoolkit
- cudnn
- pip:
- cellfinder
- brainglobe-workflows
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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" }
Expand Down Expand Up @@ -40,7 +40,7 @@ dependencies = [
dynamic = ["version"]

[project.scripts]
cellfinder = "cellfinder.main:main"
cellfinder = "brainglobe_workflows.main:main"

[project.optional-dependencies]
dev = [
Expand All @@ -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]
Expand All @@ -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]
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pytest]
addopts = --cov=cellfinder
addopts = --cov=brainglobe-workflows
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
serial
2 changes: 1 addition & 1 deletion tests/tests/test_integration/test_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_integration/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_integration/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_unit/test_tools/test_image_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_unit/test_tools/test_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_unit/test_tools/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_unit/test_tools/test_tools_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 73fe4c9

Please sign in to comment.