Skip to content

Commit

Permalink
docs: add link to docs for dep warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tshauck committed Jan 2, 2024
1 parent 9188962 commit ea99ac7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
9 changes: 4 additions & 5 deletions python/biobear/deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea99ac7

Please sign in to comment.