From 1633ca50bc17349c7a06c5ece79fb6a26b33a57d Mon Sep 17 00:00:00 2001 From: mferrera Date: Mon, 20 Nov 2023 14:39:15 +0100 Subject: [PATCH] CLN: Install `_cxtgeo` in the root module Previously the C module was installed in a public module of the same name due the difficulty of adjusting the installation location in the now previous scikit-build package. This makes it properly private. --- .flake8 | 2 +- .gitignore | 1 - .pylintrc | 6 +++--- pyproject.toml | 2 +- src/xtgeo/__init__.py | 2 +- src/xtgeo/common/calc.py | 3 +-- src/xtgeo/common/constants.py | 6 +++--- src/xtgeo/common/sys.py | 2 +- src/xtgeo/cube/_cube_export.py | 3 +-- src/xtgeo/cube/_cube_import.py | 2 +- src/xtgeo/cube/_cube_utils.py | 3 +-- src/xtgeo/cxtgeo/__init__.py | 1 - src/xtgeo/grid3d/_grid3d_fence.py | 2 +- src/xtgeo/grid3d/_grid3d_utils.py | 3 +-- src/xtgeo/grid3d/_grid_etc1.py | 2 +- src/xtgeo/grid3d/_grid_hybrid.py | 2 +- src/xtgeo/grid3d/_grid_refine.py | 2 +- src/xtgeo/grid3d/_grid_roxapi.py | 3 +-- src/xtgeo/grid3d/_gridprop_lowlevel.py | 2 +- src/xtgeo/grid3d/_gridprop_op1.py | 2 +- src/xtgeo/grid3d/_roff_grid.py | 2 +- src/xtgeo/surface/_regsurf_cube.py | 2 +- src/xtgeo/surface/_regsurf_cube_window_v2.py | 2 +- src/xtgeo/surface/_regsurf_export.py | 2 +- src/xtgeo/surface/_regsurf_grid3d.py | 2 +- src/xtgeo/surface/_regsurf_import.py | 2 +- src/xtgeo/surface/_regsurf_lowlevel.py | 2 +- src/xtgeo/surface/_regsurf_oper.py | 3 +-- src/xtgeo/well/_well_oper.py | 2 +- src/xtgeo/well/_wellmarkers.py | 2 +- src/xtgeo/well/well1.py | 2 +- src/xtgeo/xyz/_xyz_data.py | 3 +-- src/xtgeo/xyz/_xyz_lowlevel.py | 2 +- src/xtgeo/xyz/_xyz_oper.py | 2 +- tests/test_common/test_calc.py | 2 +- tests/test_common/test_cxtgeo_lowlevel.py | 2 +- tests/test_etc/test_clib_errors.py | 2 +- tests/test_grid3d/test_grid_roff.py | 2 +- tests/test_surface/test_surf_xyz_from_ij.py | 2 +- 39 files changed, 41 insertions(+), 50 deletions(-) delete mode 100644 src/xtgeo/cxtgeo/__init__.py diff --git a/.flake8 b/.flake8 index f44d282a4..3ce54b227 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,4 @@ [flake8] max-line-length = 88 ignore = E402, W503, E203, C901 -exclude = docs/conf.py, src/xtgeo/cxtgeo/*.py, .eggs, tests/**/snapshots, _theversion.py +exclude = docs/conf.py, .eggs, tests/**/snapshots, _theversion.py diff --git a/.gitignore b/.gitignore index 7d52ff7c0..fb76bf185 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,6 @@ target/ # pyenv python configuration file .python-version src/xtgeo/_theversion.py -src/xtgeo/cxtgeo/cxtgeo* # other .venv* diff --git a/.pylintrc b/.pylintrc index 7797e69f3..301eb0d89 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,7 +1,7 @@ # PYLINT: General settings for XTGeo [MASTER] -ignore=src/xtgeo/cxtgeo, src/xtgeo/clib, src/xtgeo/_theversion.py, setup.py -extension-pkg-whitelist=xtgeo.cxtgeo._cxtgeo, _cxtgeo, numpy, matplotlib +ignore=src/xtgeo/clib, src/xtgeo/_theversion.py +extension-pkg-whitelist=xtgeo._cxtgeo, _cxtgeo, numpy, matplotlib [BASIC] good-names=logger, version, xtg, i, j, k, x, y, z, _ @@ -11,7 +11,7 @@ argument-rgx=^[a-z_][_a-z0-9]+((_[a-z0-9]+)*)?$ dummy-variables-rgx=^_+[a-z0-9]*?$|dummy [TYPECHECK] -generated-members=np.*, numpy.*, pd.*, pandas.*, cxtgeo.*, matplotlib.*, xtgeo.* +generated-members=np.*, numpy.*, pd.*, pandas.*, matplotlib.*, xtgeo.* [FORMAT] max-line-length=88 diff --git a/pyproject.toml b/pyproject.toml index e34380ed1..eb88b05fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ cmake.minimum-version = "3.15.3" cmake.verbose = true metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" sdist.include = ["src/xtgeo/_theversion.py"] -wheel.install-dir = "xtgeo/cxtgeo" +wheel.install-dir = "xtgeo" [project] name = "xtgeo" diff --git a/src/xtgeo/__init__.py b/src/xtgeo/__init__.py index c2a092c46..8b37d7bb9 100644 --- a/src/xtgeo/__init__.py +++ b/src/xtgeo/__init__.py @@ -79,6 +79,7 @@ def _xprint(msg): # _xprint("Import matplotlib etc...DONE") +from xtgeo._cxtgeo import XTGeoCLibError from xtgeo.common import XTGeoDialog from xtgeo.common.constants import UNDEF, UNDEF_INT, UNDEF_INT_LIMIT, UNDEF_LIMIT from xtgeo.common.exceptions import ( @@ -90,7 +91,6 @@ def _xprint(msg): WellNotFoundError, ) from xtgeo.common.sys import _XTGeoFile -from xtgeo.cxtgeo._cxtgeo import XTGeoCLibError _xprint("Import common... done") diff --git a/src/xtgeo/common/calc.py b/src/xtgeo/common/calc.py index 9c3f9be82..7b91fc96f 100644 --- a/src/xtgeo/common/calc.py +++ b/src/xtgeo/common/calc.py @@ -7,9 +7,8 @@ import numpy as np -from xtgeo import XTGeoCLibError +from xtgeo import XTGeoCLibError, _cxtgeo from xtgeo.common import XTGeoDialog, null_logger -from xtgeo.cxtgeo import _cxtgeo xtg = XTGeoDialog() logger = null_logger(__name__) diff --git a/src/xtgeo/common/constants.py b/src/xtgeo/common/constants.py index f22df3d7b..751035b5c 100644 --- a/src/xtgeo/common/constants.py +++ b/src/xtgeo/common/constants.py @@ -2,7 +2,7 @@ """Module for basic XTGeo constants""" # align with cxtgeo libxtg.h! -import xtgeo.cxtgeo._cxtgeo as cx +from xtgeo import _cxtgeo M_PI = 3.14159265358979323846 PI = M_PI @@ -19,8 +19,8 @@ UNDEF_MAP_IRAPB = 1e30 UNDEF_MAP_IRAPA = 9999900.0000 -MAXKEYWORDS = cx.MAXKEYWORDS # maximum keywords for ECL and ROFF scanning -MAXDATES = cx.MAXDATES # maximum keywords for ECL scanning +MAXKEYWORDS = _cxtgeo.MAXKEYWORDS # maximum keywords for ECL and ROFF scanning +MAXDATES = _cxtgeo.MAXDATES # maximum keywords for ECL scanning # for XYZ data, restricted to float32 and int32 UNDEF_CONT = UNDEF diff --git a/src/xtgeo/common/sys.py b/src/xtgeo/common/sys.py index 7aefbc777..067081309 100644 --- a/src/xtgeo/common/sys.py +++ b/src/xtgeo/common/sys.py @@ -19,7 +19,7 @@ import h5py import numpy as np -from xtgeo.cxtgeo import _cxtgeo +from xtgeo import _cxtgeo from . import null_logger from ._xyz_enum import _AttrType diff --git a/src/xtgeo/cube/_cube_export.py b/src/xtgeo/cube/_cube_export.py index b0468c4bf..7809b4f0d 100644 --- a/src/xtgeo/cube/_cube_export.py +++ b/src/xtgeo/cube/_cube_export.py @@ -7,8 +7,7 @@ import segyio import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo -from xtgeo import XTGeoCLibError +from xtgeo import XTGeoCLibError, _cxtgeo from xtgeo.common import XTGeoDialog, null_logger logger = null_logger(__name__) diff --git a/src/xtgeo/cube/_cube_import.py b/src/xtgeo/cube/_cube_import.py index 82d1aae5e..1a2576959 100644 --- a/src/xtgeo/cube/_cube_import.py +++ b/src/xtgeo/cube/_cube_import.py @@ -41,7 +41,7 @@ import xtgeo import xtgeo.common.calc as xcalc import xtgeo.common.sys as xsys -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import XTGeoDialog, null_logger xtg = XTGeoDialog() diff --git a/src/xtgeo/cube/_cube_utils.py b/src/xtgeo/cube/_cube_utils.py index 9e427e948..453d5647e 100644 --- a/src/xtgeo/cube/_cube_utils.py +++ b/src/xtgeo/cube/_cube_utils.py @@ -4,8 +4,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo -from xtgeo import XTGeoCLibError +from xtgeo import XTGeoCLibError, _cxtgeo from xtgeo.common import null_logger from xtgeo.common.calc import _swap_axes diff --git a/src/xtgeo/cxtgeo/__init__.py b/src/xtgeo/cxtgeo/__init__.py deleted file mode 100644 index 8b1378917..000000000 --- a/src/xtgeo/cxtgeo/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/xtgeo/grid3d/_grid3d_fence.py b/src/xtgeo/grid3d/_grid3d_fence.py index 0fab64f22..b90de9488 100644 --- a/src/xtgeo/grid3d/_grid3d_fence.py +++ b/src/xtgeo/grid3d/_grid3d_fence.py @@ -4,7 +4,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger from xtgeo.grid3d import _gridprop_lowlevel as gl from xtgeo.surface import _regsurf_lowlevel as rl diff --git a/src/xtgeo/grid3d/_grid3d_utils.py b/src/xtgeo/grid3d/_grid3d_utils.py index 840794faf..8b7b22c42 100644 --- a/src/xtgeo/grid3d/_grid3d_utils.py +++ b/src/xtgeo/grid3d/_grid3d_utils.py @@ -7,8 +7,7 @@ import pandas as pd -import xtgeo.cxtgeo._cxtgeo as _cxtgeo -from xtgeo import XTGeoCLibError +from xtgeo import XTGeoCLibError, _cxtgeo from xtgeo.common import null_logger from xtgeo.common.constants import MAXDATES, MAXKEYWORDS diff --git a/src/xtgeo/grid3d/_grid_etc1.py b/src/xtgeo/grid3d/_grid_etc1.py index ba90a80c1..de4ae6b47 100644 --- a/src/xtgeo/grid3d/_grid_etc1.py +++ b/src/xtgeo/grid3d/_grid_etc1.py @@ -12,7 +12,7 @@ from packaging.version import parse as versionparse import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger from xtgeo.common.calc import find_flip from xtgeo.xyz.polygons import Polygons diff --git a/src/xtgeo/grid3d/_grid_hybrid.py b/src/xtgeo/grid3d/_grid_hybrid.py index 5a3b06ed7..6996d99ac 100644 --- a/src/xtgeo/grid3d/_grid_hybrid.py +++ b/src/xtgeo/grid3d/_grid_hybrid.py @@ -1,7 +1,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger logger = null_logger(__name__) diff --git a/src/xtgeo/grid3d/_grid_refine.py b/src/xtgeo/grid3d/_grid_refine.py index 6d1f060dd..44f396199 100644 --- a/src/xtgeo/grid3d/_grid_refine.py +++ b/src/xtgeo/grid3d/_grid_refine.py @@ -4,7 +4,7 @@ import numpy as np -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import XTGeoDialog, null_logger xtg = XTGeoDialog() diff --git a/src/xtgeo/grid3d/_grid_roxapi.py b/src/xtgeo/grid3d/_grid_roxapi.py index 9cb834f88..3ca1dc205 100644 --- a/src/xtgeo/grid3d/_grid_roxapi.py +++ b/src/xtgeo/grid3d/_grid_roxapi.py @@ -7,8 +7,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo -from xtgeo import RoxUtils +from xtgeo import RoxUtils, _cxtgeo from xtgeo.common import XTGeoDialog, null_logger xtg = XTGeoDialog() diff --git a/src/xtgeo/grid3d/_gridprop_lowlevel.py b/src/xtgeo/grid3d/_gridprop_lowlevel.py index a94c04166..b36d3ed43 100644 --- a/src/xtgeo/grid3d/_gridprop_lowlevel.py +++ b/src/xtgeo/grid3d/_gridprop_lowlevel.py @@ -5,7 +5,7 @@ import numpy.ma as ma import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger logger = null_logger(__name__) diff --git a/src/xtgeo/grid3d/_gridprop_op1.py b/src/xtgeo/grid3d/_gridprop_op1.py index 9db25e67d..c346ddf12 100644 --- a/src/xtgeo/grid3d/_gridprop_op1.py +++ b/src/xtgeo/grid3d/_gridprop_op1.py @@ -7,7 +7,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import XTGeoDialog, null_logger from xtgeo.grid3d import _gridprop_lowlevel as gl diff --git a/src/xtgeo/grid3d/_roff_grid.py b/src/xtgeo/grid3d/_roff_grid.py index 71f9bed68..089dd29f9 100644 --- a/src/xtgeo/grid3d/_roff_grid.py +++ b/src/xtgeo/grid3d/_roff_grid.py @@ -9,7 +9,7 @@ import numpy as np import roffio -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo if TYPE_CHECKING: from xtgeo.grid3d import Grid diff --git a/src/xtgeo/surface/_regsurf_cube.py b/src/xtgeo/surface/_regsurf_cube.py index 5c3d48ed7..4ad91b8e7 100644 --- a/src/xtgeo/surface/_regsurf_cube.py +++ b/src/xtgeo/surface/_regsurf_cube.py @@ -5,7 +5,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger logger = null_logger(__name__) diff --git a/src/xtgeo/surface/_regsurf_cube_window_v2.py b/src/xtgeo/surface/_regsurf_cube_window_v2.py index b6cdd413f..f0f6f27ba 100644 --- a/src/xtgeo/surface/_regsurf_cube_window_v2.py +++ b/src/xtgeo/surface/_regsurf_cube_window_v2.py @@ -5,7 +5,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger logger = null_logger(__name__) diff --git a/src/xtgeo/surface/_regsurf_export.py b/src/xtgeo/surface/_regsurf_export.py index e09cfac9d..9e677fd72 100644 --- a/src/xtgeo/surface/_regsurf_export.py +++ b/src/xtgeo/surface/_regsurf_export.py @@ -12,7 +12,7 @@ import numpy as np import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # pylint: disable=import-error +from xtgeo import _cxtgeo from xtgeo.common import null_logger from xtgeo.common.constants import UNDEF_MAP_IRAPA, UNDEF_MAP_IRAPB diff --git a/src/xtgeo/surface/_regsurf_grid3d.py b/src/xtgeo/surface/_regsurf_grid3d.py index effd66b8a..502c29750 100644 --- a/src/xtgeo/surface/_regsurf_grid3d.py +++ b/src/xtgeo/surface/_regsurf_grid3d.py @@ -6,7 +6,7 @@ import numpy.ma as ma import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger from xtgeo.grid3d import _gridprop_lowlevel diff --git a/src/xtgeo/surface/_regsurf_import.py b/src/xtgeo/surface/_regsurf_import.py index 56caada9f..63e93aab5 100644 --- a/src/xtgeo/surface/_regsurf_import.py +++ b/src/xtgeo/surface/_regsurf_import.py @@ -11,7 +11,7 @@ import xtgeo import xtgeo.common.sys as xsys -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # pylint: disable=no-name-in-module +from xtgeo import _cxtgeo from xtgeo.common import XTGeoDialog, null_logger from xtgeo.common.constants import UNDEF_MAP_IRAPA, UNDEF_MAP_IRAPB from xtgeo.surface._zmap_parser import parse_zmap diff --git a/src/xtgeo/surface/_regsurf_lowlevel.py b/src/xtgeo/surface/_regsurf_lowlevel.py index f25d3e423..311cc778a 100644 --- a/src/xtgeo/surface/_regsurf_lowlevel.py +++ b/src/xtgeo/surface/_regsurf_lowlevel.py @@ -1,6 +1,6 @@ """RegularSurface utilities (low level)""" -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import XTGeoDialog xtg = XTGeoDialog() diff --git a/src/xtgeo/surface/_regsurf_oper.py b/src/xtgeo/surface/_regsurf_oper.py index 76507b378..deeb22564 100644 --- a/src/xtgeo/surface/_regsurf_oper.py +++ b/src/xtgeo/surface/_regsurf_oper.py @@ -10,8 +10,7 @@ from matplotlib.path import Path as MPath import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # type: ignore -from xtgeo import XTGeoCLibError +from xtgeo import XTGeoCLibError, _cxtgeo from xtgeo.common import XTGeoDialog, null_logger from xtgeo.xyz import Polygons diff --git a/src/xtgeo/well/_well_oper.py b/src/xtgeo/well/_well_oper.py index 704a3a2fe..1801ccbf4 100644 --- a/src/xtgeo/well/_well_oper.py +++ b/src/xtgeo/well/_well_oper.py @@ -6,7 +6,7 @@ import pandas as pd import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # type: ignore +from xtgeo import _cxtgeo from xtgeo.common import constants as const from xtgeo.common import null_logger from xtgeo.common._xyz_enum import _AttrType diff --git a/src/xtgeo/well/_wellmarkers.py b/src/xtgeo/well/_wellmarkers.py index 3fdb91c3f..d4c695060 100644 --- a/src/xtgeo/well/_wellmarkers.py +++ b/src/xtgeo/well/_wellmarkers.py @@ -9,7 +9,7 @@ import xtgeo import xtgeo.common.constants as const -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # type: ignore +from xtgeo import _cxtgeo from xtgeo.common import null_logger logger = null_logger(__name__) diff --git a/src/xtgeo/well/well1.py b/src/xtgeo/well/well1.py index a5f9b882d..59ac6e6a1 100644 --- a/src/xtgeo/well/well1.py +++ b/src/xtgeo/well/well1.py @@ -12,7 +12,7 @@ import xtgeo import xtgeo.common.constants as const -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # type: ignore +from xtgeo import _cxtgeo # type: ignore from xtgeo.common import _AttrType, null_logger from xtgeo.xyz import _xyz_data # type: ignore[attr-defined] diff --git a/src/xtgeo/xyz/_xyz_data.py b/src/xtgeo/xyz/_xyz_data.py index c0b6c46ef..055638862 100644 --- a/src/xtgeo/xyz/_xyz_data.py +++ b/src/xtgeo/xyz/_xyz_data.py @@ -42,10 +42,9 @@ from joblib import hash as jhash import xtgeo.common.constants as const +from xtgeo import XTGeoCLibError, _cxtgeo from xtgeo.common import null_logger from xtgeo.common.sys import _convert_carr_double_np, _get_carray -from xtgeo.cxtgeo import _cxtgeo -from xtgeo.cxtgeo._cxtgeo import XTGeoCLibError # type: ignore[attr-defined] from ..common._xyz_enum import _AttrName, _AttrType, _XYZType diff --git a/src/xtgeo/xyz/_xyz_lowlevel.py b/src/xtgeo/xyz/_xyz_lowlevel.py index 9b9b0cbed..ad1a81d68 100644 --- a/src/xtgeo/xyz/_xyz_lowlevel.py +++ b/src/xtgeo/xyz/_xyz_lowlevel.py @@ -4,7 +4,7 @@ import numpy as np -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import null_logger logger = null_logger(__name__) diff --git a/src/xtgeo/xyz/_xyz_oper.py b/src/xtgeo/xyz/_xyz_oper.py index 1fa879d48..1a68d020a 100644 --- a/src/xtgeo/xyz/_xyz_oper.py +++ b/src/xtgeo/xyz/_xyz_oper.py @@ -9,7 +9,7 @@ from scipy.interpolate import UnivariateSpline, interp1d import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.common import XTGeoDialog, null_logger xtg = XTGeoDialog() diff --git a/tests/test_common/test_calc.py b/tests/test_common/test_calc.py index 7afd4e8a8..fd804bccf 100644 --- a/tests/test_common/test_calc.py +++ b/tests/test_common/test_calc.py @@ -7,7 +7,7 @@ import xtgeo import xtgeo.common.calc as xcalc -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo xtg = xtgeo.XTGeoDialog() logger = xtg.basiclogger(__name__) diff --git a/tests/test_common/test_cxtgeo_lowlevel.py b/tests/test_common/test_cxtgeo_lowlevel.py index 7e81bf81e..82922e4cf 100644 --- a/tests/test_common/test_cxtgeo_lowlevel.py +++ b/tests/test_common/test_cxtgeo_lowlevel.py @@ -3,7 +3,7 @@ import pytest import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo xtg = xtgeo.XTGeoDialog() logger = xtg.basiclogger(__name__) diff --git a/tests/test_etc/test_clib_errors.py b/tests/test_etc/test_clib_errors.py index 03b659718..83fe071d7 100644 --- a/tests/test_etc/test_clib_errors.py +++ b/tests/test_etc/test_clib_errors.py @@ -6,7 +6,7 @@ import pytest import xtgeo -from xtgeo.cxtgeo import _cxtgeo +from xtgeo import _cxtgeo @pytest.fixture() diff --git a/tests/test_grid3d/test_grid_roff.py b/tests/test_grid3d/test_grid_roff.py index 019f540ed..80491c494 100644 --- a/tests/test_grid3d/test_grid_roff.py +++ b/tests/test_grid3d/test_grid_roff.py @@ -11,7 +11,7 @@ from hypothesis.extra.numpy import arrays from numpy.testing import assert_allclose -import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo import _cxtgeo from xtgeo.grid3d import Grid from xtgeo.grid3d._grid_import_roff import handle_deprecated_xtgeo_roff_file from xtgeo.grid3d._roff_grid import RoffGrid diff --git a/tests/test_surface/test_surf_xyz_from_ij.py b/tests/test_surface/test_surf_xyz_from_ij.py index 87183f708..deccc3fb4 100644 --- a/tests/test_surface/test_surf_xyz_from_ij.py +++ b/tests/test_surface/test_surf_xyz_from_ij.py @@ -2,7 +2,7 @@ import pytest import xtgeo -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # type: ignore +from xtgeo import _cxtgeo class Surface: