Skip to content

Commit

Permalink
Mark as deprecated and add import warning
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Nov 1, 2023
1 parent 5ac5dc4 commit e6bf8e2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# This package is deprecated!

Please use [`brainglobe-segmentation` instead](https://github.com/brainglobe/brainglobe-segmentation).

The old README can be found below.

---

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

warnings.warn(
"brainreg-segment is deprecated. Please use brainglobe-segmentation instead: https://github.com/brainglobe/brainglobe-segmentation",
DeprecationWarning,
)

from importlib.metadata import PackageNotFoundError, version
from . import *

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ deps =
pyqt5
magicgui

commands = pytest -v --color=yes --cov=brainreg_segment --cov-report=xml
commands = pytest -v --color=yes --cov=brainreg_segment --cov-report=xml -W ignore::DeprecationWarning

0 comments on commit e6bf8e2

Please sign in to comment.