From ea99ac76551257e49bbf249955c4018e28143910 Mon Sep 17 00:00:00 2001 From: Trent Hauck Date: Tue, 2 Jan 2024 09:00:33 -0800 Subject: [PATCH] docs: add link to docs for dep warning --- README.md | 2 +- python/biobear/deprecated.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8ef49c9..4079cfe 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ This will print: ### Using a Session w/ Exon -BioBear also exposes a session object that can be used with [exon][] to work with files directly in SQL, then eventually convert them to a DataFrame if needed. +BioBear exposes a session object that can be used with [exon][] to work with files directly in SQL, then eventually convert them to a DataFrame if needed. See the [BioBear Docs][documentation] for more information, but in short, you can use the session like this: diff --git a/python/biobear/deprecated.py b/python/biobear/deprecated.py index dc8e20a..913ef54 100644 --- a/python/biobear/deprecated.py +++ b/python/biobear/deprecated.py @@ -22,11 +22,10 @@ def deprecated(cls): @functools.wraps(orig_init) def new_init(self, *args, **kwargs): - warnings.warn( - f"{cls.__name__} is deprecated, use a table function via the session", - category=DeprecationWarning, - stacklevel=2, - ) + # pylint: disable=line-too-long + error_msg = f"{cls.__name__} is being deprecated, use a table function via the session.\nSee https://www.wheretrue.dev/docs/exon/exondb/api-reference/table-functions for more info." + + warnings.warn(error_msg, category=DeprecationWarning, stacklevel=2) orig_init(self, *args, **kwargs) cls.__init__ = new_init