From ea07406a28cc08a3714ac15c1784d0cfe016cf45 Mon Sep 17 00:00:00 2001 From: Will Graham <32364977+willGraham01@users.noreply.github.com> Date: Wed, 3 Jan 2024 10:23:42 +0000 Subject: [PATCH] Prepare for retirement (#226) * Add on-import deprecation warning * Add note in README about deprecation * pytest to ignore deprecaton warning on import --- README.md | 9 +++++++++ src/cellfinder_core/__init__.py | 7 +++++++ tox.ini | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf505ceb..e90b48c9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +# This package has moved! + +`cellfinder-core` has merged with it's napari plugin and is now available as a [single package called `cellfinder`](https://github.com/brainglobe/cellfinder). +We recommend you uninstall `cellfinder-core` and instead use the functionality provided in the `cellfinder` package. + +These changes are part of our [wider restructuring](https://brainglobe.info/blog/version1/version_1_announcement.html) of the BrainGlobe suite of tools and analysis pipelines, which you can [keep up to date with on our blog](https://brainglobe.info/blog/index.html). + +--- + [![Python Version](https://img.shields.io/pypi/pyversions/cellfinder-core.svg)](https://pypi.org/project/cellfinder-core) [![PyPI](https://img.shields.io/pypi/v/cellfinder-core.svg)](https://pypi.org/project/cellfinder-core) [![Downloads](https://pepy.tech/badge/cellfinder-core)](https://pepy.tech/project/cellfinder-core) diff --git a/src/cellfinder_core/__init__.py b/src/cellfinder_core/__init__.py index 746b2d2b..81eb7d42 100644 --- a/src/cellfinder_core/__init__.py +++ b/src/cellfinder_core/__init__.py @@ -1,3 +1,10 @@ +from warnings import warn + +warn( + f"cellfinder-core has merged with it's napari plugin and is now available as a combined package. To remain up to date, please install cellfinder: https://github.com/brainglobe/cellfinder", + DeprecationWarning, +) + from importlib.metadata import PackageNotFoundError, version try: diff --git a/tox.ini b/tox.ini index 3f00afe3..00811f0b 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ python = 3.10: py310 [testenv] -commands = python -m pytest -v --color=yes +commands = python -m pytest -v --color=yes -W ignore::DeprecationWarning deps = pytest pytest-cov