Skip to content

Commit

Permalink
DEP: Issue deprecation warning for xtgeo.plot
Browse files Browse the repository at this point in the history
This also removes the default top-level import so a deprecation
warning is not issued.
  • Loading branch information
mferrera committed Nov 29, 2023
1 parent 7267887 commit e317fce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/xtgeo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ def _xprint(msg):

_xprint("Import various XTGeo modules... xyz...")

if not ROXAR:
from xtgeo.plot import baseplot, grid3d_slice, xsection, xtmap

_xprint("Import various XTGeo modules... plots...")

_xprint("Import various XTGeo modules...DONE")

# some function wrappers to initiate objects from imports
Expand Down
11 changes: 9 additions & 2 deletions src/xtgeo/plot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
"""The XTGeo plot package"""
# flake8: noqa

import warnings

from xtgeo.plot.grid3d_slice import Grid3DSlice

# flake8: noqa
from xtgeo.plot.xsection import XSection
from xtgeo.plot.xtmap import Map

warnings.warn(
"xtgeo.plot is deprecated and will be removed in xtgeo 4.0. "
"This functionality now lives in the `xtgeoviz` package.",
DeprecationWarning,
stacklevel=2,
)

0 comments on commit e317fce

Please sign in to comment.