Skip to content

Commit

Permalink
Merge pull request #3 from brainglobe/update-package-name
Browse files Browse the repository at this point in the history
Update metadata
  • Loading branch information
willGraham01 authored Sep 1, 2023
2 parents a9f6060 + e4ad056 commit ae5396f
Show file tree
Hide file tree
Showing 32 changed files with 43 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
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,7 @@
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
12 changes: 6 additions & 6 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,10 +55,10 @@ 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"
documentation = "https://brainglobe.info/documentation/brainglobe-workflows"
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
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 ae5396f

Please sign in to comment.