Skip to content

Commit

Permalink
Prepare for migration (#261)
Browse files Browse the repository at this point in the history
* Throw deprecation warning on import

* Update README with migration warning

* Force dependencies <1.0.0 of brainglobe packages

* Tell tox to ignore our own deprecation warning

* Update cellfinder/__init__.py

Co-authored-by: Alessandro Felder <alessandrofelder@users.noreply.github.com>

---------

Co-authored-by: Alessandro Felder <alessandrofelder@users.noreply.github.com>
  • Loading branch information
willGraham01 and alessandrofelder committed Dec 13, 2023
1 parent e292847 commit b813051
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Cellfinder has moved!

As part of [our BrainGlobe version 1 update](https://brainglobe.info/blog/version1/version_1_announcement.html), the `cellfinder` workflow that can be run from the command line [has moved into `brainglobe-workflows`](https://github.com/brainglobe/brainglobe-workflows).
Please head over to that package to install an up-to-date version of `cellfinder`.

You can keep up to date with the version 1 rollout by [visiting our blog page](https://brainglobe.info/blog/index.html), or joining us [over on Zulip](https://brainglobe.zulipchat.com).

---

[![Python Version](https://img.shields.io/pypi/pyversions/cellfinder.svg)](https://pypi.org/project/cellfinder)
[![PyPI](https://img.shields.io/pypi/v/cellfinder.svg)](https://pypi.org/project/cellfinder)
[![Downloads](https://pepy.tech/badge/cellfinder)](https://pepy.tech/project/cellfinder)
Expand Down
7 changes: 7 additions & 0 deletions cellfinder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import warnings

warnings.warn(
"cellfinder (the command line tool) has migrated. Please use brainglobe-workflows instead: https://github.com/brainglobe/brainglobe-workflows",
DeprecationWarning,
)

from importlib.metadata import metadata

__version__ = metadata("cellfinder")["version"]
Expand Down
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ classifiers = [
]
dependencies = [
"brainreg>=1.0.0",
"cellfinder-core>=0.2.4",
"cellfinder-core>=0.2.4,<1.0.0",
"configobj",
"fancylog>=0.0.7",
"imio",
"brainglobe-utils>=0.2.5",
"brainglobe-utils>=0.2.5,<1.0.0",
"multiprocessing-logging>=0.3.4",
"natsort",
"numpy",
Expand All @@ -52,7 +52,11 @@ dev = [
"pre-commit",
"setuptools_scm",
]
napari = ["napari[pyside2]", "brainglobe-napari-io", "cellfinder-napari"]
napari = [
"napari[pyside2]",
"brainglobe-napari-io<1.0.0",
"cellfinder-napari<1.0.0",
]

[project.urls]
source = "https://github.com/brainglobe/cellfinder"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ INPUT_COREDEV =
true: coredev

[testenv]
commands = pytest {toxinidir} -v --cov=./ --cov-report=xml
commands = pytest {toxinidir} -v --cov=./ --cov-report=xml -W ignore::DeprecationWarning
deps =
pytest-cov
pytest
Expand Down

0 comments on commit b813051

Please sign in to comment.