From d5f9a5a55350fb2db94892284fc9e1f884b7e14c Mon Sep 17 00:00:00 2001 From: mferrera Date: Mon, 2 Oct 2023 08:04:34 +0200 Subject: [PATCH] CLN: Lint with isort --- src/xtgeo/common/__init__.py | 12 ++++-------- src/xtgeo/cube/__init__.py | 4 +++- src/xtgeo/cube/_cube_export.py | 6 +++--- src/xtgeo/grid3d/__init__.py | 2 +- src/xtgeo/grid3d/_grid3d_fence.py | 2 +- src/xtgeo/grid3d/_grid_etc1.py | 3 ++- src/xtgeo/grid3d/_grid_refine.py | 3 ++- src/xtgeo/grid3d/_grid_wellzone.py | 1 + src/xtgeo/grid3d/_gridprop_import_roff.py | 1 + src/xtgeo/grid3d/_gridprop_op1.py | 2 +- src/xtgeo/grid3d/_gridprops_import_eclrun.py | 3 ++- src/xtgeo/metadata/__init__.py | 3 +-- src/xtgeo/plot/__init__.py | 3 ++- src/xtgeo/plot/xtmap.py | 5 +++-- src/xtgeo/surface/_regsurf_cube_window_v2.py | 1 + src/xtgeo/surface/_regsurf_import.py | 1 + src/xtgeo/well/__init__.py | 6 +++--- src/xtgeo/well/_blockedwell_roxapi.py | 2 +- src/xtgeo/well/_blockedwells_roxapi.py | 1 + src/xtgeo/well/_wellmarkers.py | 3 ++- src/xtgeo/well/_wells_utils.py | 4 ++-- src/xtgeo/xyz/_xyz_lowlevel.py | 3 ++- tests/conftest.py | 3 +-- tests/test_common/test_calc.py | 1 + tests/test_cube/test_cube.py | 3 ++- tests/test_cube/test_cube_deprecations.py | 1 + tests/test_etc/test_etc_make_avg_maps.py | 1 + tests/test_grid3d/eclrun_fixtures.py | 1 + tests/test_grid3d/test_ecl_inte_head.py | 1 + tests/test_grid3d/test_eclrun.py | 1 + tests/test_grid3d/test_grid.py | 3 ++- tests/test_grid3d/test_grid_bytesio.py | 1 + tests/test_grid3d/test_grid_ecl_grid.py | 5 +++-- tests/test_grid3d/test_grid_egrid.py | 3 ++- tests/test_grid3d/test_grid_grdecl.py | 3 ++- tests/test_grid3d/test_grid_property_grdecl.py | 3 ++- tests/test_grid3d/test_grid_vs_points.py | 1 + tests/test_grid3d/test_grid_xtgformats_io.py | 3 ++- tests/test_grid3d/test_gridprop_import_eclrun.py | 3 ++- tests/test_plot/test_colortables.py | 1 + tests/test_surface/test_forks.py | 1 + tests/test_surface/test_regular_surface_vs_points.py | 1 + tests/test_surface/test_surf_xyz_from_ij.py | 5 +++-- tests/test_surface/test_zmap_spec.py | 1 + tests/test_well/conftest.py | 1 + tests/test_well/test_blockedwell.py | 1 + tests/test_well/test_blockedwells.py | 1 + tests/test_well/test_well.py | 2 +- tests/test_well/test_well_deprecations.py | 3 ++- tests/test_well/test_well_to_points.py | 1 + tests/test_well/test_well_vs_grid.py | 1 + tests/test_well/test_well_vs_surface.py | 1 + tests/test_well/test_wells.py | 1 + tests/test_xyz/test_points.py | 3 ++- tests/test_xyz/test_points_from_surface.py | 1 + tests/test_xyz/test_points_from_wells.py | 1 + tests/test_xyz/test_points_vs_other.py | 1 + tests/test_xyz/test_xyz_deprecated.py | 3 ++- tests/test_xyz/test_xyz_roxapi_mock.py | 3 ++- 59 files changed, 92 insertions(+), 49 deletions(-) diff --git a/src/xtgeo/common/__init__.py b/src/xtgeo/common/__init__.py index 377fdc73d..049094384 100644 --- a/src/xtgeo/common/__init__.py +++ b/src/xtgeo/common/__init__.py @@ -2,12 +2,8 @@ """The XTGeo common package""" -# flake8: noqa -from xtgeo.common.xtgeo_dialog import XTGeoDialog -from xtgeo.common.xtgeo_dialog import XTGDescription -from xtgeo.common.xtgeo_dialog import XTGShowProgress - -from xtgeo.common.sys import _XTGeoFile -from xtgeo.common.sys import inherit_docstring - from xtgeo.common.exceptions import WellNotFoundError +from xtgeo.common.sys import _XTGeoFile, inherit_docstring + +# flake8: noqa +from xtgeo.common.xtgeo_dialog import XTGDescription, XTGeoDialog, XTGShowProgress diff --git a/src/xtgeo/cube/__init__.py b/src/xtgeo/cube/__init__.py index 97282e5f7..65e839891 100644 --- a/src/xtgeo/cube/__init__.py +++ b/src/xtgeo/cube/__init__.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- """The XTGeo cube package.""" -from xtgeo.cube.cube1 import Cube # type: ignore # noqa # pylint: disable=undefined-variable +from xtgeo.cube.cube1 import ( # type: ignore # noqa # pylint: disable=undefined-variable + Cube, +) diff --git a/src/xtgeo/cube/_cube_export.py b/src/xtgeo/cube/_cube_export.py index 93c8db608..d258e8ebd 100644 --- a/src/xtgeo/cube/_cube_export.py +++ b/src/xtgeo/cube/_cube_export.py @@ -1,15 +1,15 @@ """Export Cube data via SegyIO library or XTGeo CLIB.""" +import json import shutil import struct -import json -import numpy as np +import numpy as np import segyio import xtgeo import xtgeo.cxtgeo._cxtgeo as _cxtgeo -from xtgeo.common import XTGeoDialog from xtgeo import XTGeoCLibError +from xtgeo.common import XTGeoDialog xtg = XTGeoDialog() diff --git a/src/xtgeo/grid3d/__init__.py b/src/xtgeo/grid3d/__init__.py index ca4e7325f..0bee383ca 100644 --- a/src/xtgeo/grid3d/__init__.py +++ b/src/xtgeo/grid3d/__init__.py @@ -11,5 +11,5 @@ from ._ecl_grid import GridRelative, Units from .grid import Grid -from .grid_property import GridProperty from .grid_properties import GridProperties +from .grid_property import GridProperty diff --git a/src/xtgeo/grid3d/_grid3d_fence.py b/src/xtgeo/grid3d/_grid3d_fence.py index 9e945ed75..426b93203 100644 --- a/src/xtgeo/grid3d/_grid3d_fence.py +++ b/src/xtgeo/grid3d/_grid3d_fence.py @@ -4,9 +4,9 @@ import numpy as np import xtgeo +import xtgeo.cxtgeo._cxtgeo as _cxtgeo from xtgeo.grid3d import _gridprop_lowlevel as gl from xtgeo.surface import _regsurf_lowlevel as rl -import xtgeo.cxtgeo._cxtgeo as _cxtgeo xtg = xtgeo.common.XTGeoDialog() logger = xtg.functionlogger(__name__) diff --git a/src/xtgeo/grid3d/_grid_etc1.py b/src/xtgeo/grid3d/_grid_etc1.py index 000a98e5d..ec6ade8a7 100644 --- a/src/xtgeo/grid3d/_grid_etc1.py +++ b/src/xtgeo/grid3d/_grid_etc1.py @@ -2,13 +2,14 @@ from collections import OrderedDict from copy import deepcopy -from packaging.version import parse as versionparse from math import atan2, degrees from typing import Tuple import numpy as np import numpy.ma as ma import pandas as pd +from packaging.version import parse as versionparse + import xtgeo import xtgeo.cxtgeo._cxtgeo as _cxtgeo from xtgeo.common import XTGeoDialog diff --git a/src/xtgeo/grid3d/_grid_refine.py b/src/xtgeo/grid3d/_grid_refine.py index 0c82cebdc..39d221239 100644 --- a/src/xtgeo/grid3d/_grid_refine.py +++ b/src/xtgeo/grid3d/_grid_refine.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- """Private module for refinement of a grid.""" from collections import OrderedDict + import numpy as np -from xtgeo.common import XTGeoDialog import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo.common import XTGeoDialog xtg = XTGeoDialog() diff --git a/src/xtgeo/grid3d/_grid_wellzone.py b/src/xtgeo/grid3d/_grid_wellzone.py index a346ba1f6..fa9c45ce4 100644 --- a/src/xtgeo/grid3d/_grid_wellzone.py +++ b/src/xtgeo/grid3d/_grid_wellzone.py @@ -1,6 +1,7 @@ """Private module for grid vs well zonelog checks.""" import numpy as np + import xtgeo xtg = xtgeo.common.XTGeoDialog() diff --git a/src/xtgeo/grid3d/_gridprop_import_roff.py b/src/xtgeo/grid3d/_gridprop_import_roff.py index 550e2e620..30f009eba 100644 --- a/src/xtgeo/grid3d/_gridprop_import_roff.py +++ b/src/xtgeo/grid3d/_gridprop_import_roff.py @@ -4,6 +4,7 @@ import warnings import numpy as np + import xtgeo from ._roff_parameter import RoffParameter diff --git a/src/xtgeo/grid3d/_gridprop_op1.py b/src/xtgeo/grid3d/_gridprop_op1.py index 6c81d0cba..c768532f2 100644 --- a/src/xtgeo/grid3d/_gridprop_op1.py +++ b/src/xtgeo/grid3d/_gridprop_op1.py @@ -4,9 +4,9 @@ import numpy as np import xtgeo +import xtgeo.cxtgeo._cxtgeo as _cxtgeo from xtgeo.common import XTGeoDialog from xtgeo.grid3d import _gridprop_lowlevel as gl -import xtgeo.cxtgeo._cxtgeo as _cxtgeo xtg = XTGeoDialog() diff --git a/src/xtgeo/grid3d/_gridprops_import_eclrun.py b/src/xtgeo/grid3d/_gridprops_import_eclrun.py index 3a5843760..f3daf3bd5 100644 --- a/src/xtgeo/grid3d/_gridprops_import_eclrun.py +++ b/src/xtgeo/grid3d/_gridprops_import_eclrun.py @@ -1,8 +1,9 @@ from copy import deepcopy from typing import List, Tuple, Union -import xtgeo from typing_extensions import Literal + +import xtgeo from xtgeo.common.constants import MAXKEYWORDS from . import _grid3d_utils as utils diff --git a/src/xtgeo/metadata/__init__.py b/src/xtgeo/metadata/__init__.py index 99529fffa..ffd35178b 100644 --- a/src/xtgeo/metadata/__init__.py +++ b/src/xtgeo/metadata/__init__.py @@ -2,5 +2,4 @@ # flake8: noqa """XTGeo metadata package.""" -from xtgeo.metadata.metadata import MetaDataRegularSurface -from xtgeo.metadata.metadata import MetaDataRegularCube +from xtgeo.metadata.metadata import MetaDataRegularCube, MetaDataRegularSurface diff --git a/src/xtgeo/plot/__init__.py b/src/xtgeo/plot/__init__.py index c27f7bbd4..b967ebbef 100644 --- a/src/xtgeo/plot/__init__.py +++ b/src/xtgeo/plot/__init__.py @@ -2,9 +2,10 @@ """The XTGeo plot package""" +from xtgeo.plot.grid3d_slice import Grid3DSlice + # flake8: noqa from xtgeo.plot.xsection import XSection from xtgeo.plot.xtmap import Map -from xtgeo.plot.grid3d_slice import Grid3DSlice # from ._colortables import random, random40, xtgeocolors, colorsfromfile diff --git a/src/xtgeo/plot/xtmap.py b/src/xtgeo/plot/xtmap.py index 7a170071c..778db6a9b 100644 --- a/src/xtgeo/plot/xtmap.py +++ b/src/xtgeo/plot/xtmap.py @@ -1,13 +1,14 @@ """Module for map plots of surfaces, using matplotlib.""" -import matplotlib.pyplot as plt import matplotlib.patches as mplp -from matplotlib import ticker +import matplotlib.pyplot as plt import numpy as np import numpy.ma as ma +from matplotlib import ticker from xtgeo.common import XTGeoDialog + from .baseplot import BasePlot xtg = XTGeoDialog() diff --git a/src/xtgeo/surface/_regsurf_cube_window_v2.py b/src/xtgeo/surface/_regsurf_cube_window_v2.py index 987fc8b39..b189ad00f 100644 --- a/src/xtgeo/surface/_regsurf_cube_window_v2.py +++ b/src/xtgeo/surface/_regsurf_cube_window_v2.py @@ -3,6 +3,7 @@ import numpy as np + import xtgeo import xtgeo.cxtgeo._cxtgeo as _cxtgeo from xtgeo.common import XTGeoDialog diff --git a/src/xtgeo/surface/_regsurf_import.py b/src/xtgeo/surface/_regsurf_import.py index 813336541..a05f472b8 100644 --- a/src/xtgeo/surface/_regsurf_import.py +++ b/src/xtgeo/surface/_regsurf_import.py @@ -8,6 +8,7 @@ import h5py import numpy as np import numpy.ma as ma + import xtgeo import xtgeo.common.sys as xsys import xtgeo.cxtgeo._cxtgeo as _cxtgeo # pylint: disable=no-name-in-module diff --git a/src/xtgeo/well/__init__.py b/src/xtgeo/well/__init__.py index 1ad210128..c1c2affd8 100644 --- a/src/xtgeo/well/__init__.py +++ b/src/xtgeo/well/__init__.py @@ -2,9 +2,9 @@ """The XTGeo well package""" +from .blocked_well import BlockedWell +from .blocked_wells import BlockedWells + # flake8: noqa from .well1 import Well from .wells import Wells - -from .blocked_well import BlockedWell -from .blocked_wells import BlockedWells diff --git a/src/xtgeo/well/_blockedwell_roxapi.py b/src/xtgeo/well/_blockedwell_roxapi.py index d86c56dc2..f824d7ccd 100644 --- a/src/xtgeo/well/_blockedwell_roxapi.py +++ b/src/xtgeo/well/_blockedwell_roxapi.py @@ -9,8 +9,8 @@ import pandas as pd from xtgeo.common import XTGeoDialog -from xtgeo.roxutils import RoxUtils from xtgeo.common.exceptions import WellNotFoundError +from xtgeo.roxutils import RoxUtils try: import roxar diff --git a/src/xtgeo/well/_blockedwells_roxapi.py b/src/xtgeo/well/_blockedwells_roxapi.py index a6a76ba0a..b50863c06 100644 --- a/src/xtgeo/well/_blockedwells_roxapi.py +++ b/src/xtgeo/well/_blockedwells_roxapi.py @@ -4,6 +4,7 @@ from xtgeo.common import XTGeoDialog from xtgeo.roxutils import RoxUtils + from .blocked_well import BlockedWell xtg = XTGeoDialog() diff --git a/src/xtgeo/well/_wellmarkers.py b/src/xtgeo/well/_wellmarkers.py index 43924a827..dbd069789 100644 --- a/src/xtgeo/well/_wellmarkers.py +++ b/src/xtgeo/well/_wellmarkers.py @@ -3,13 +3,14 @@ from collections import OrderedDict + import numpy as np import pandas as pd import xtgeo +import xtgeo.common.constants as const import xtgeo.cxtgeo._cxtgeo as _cxtgeo from xtgeo.common import XTGeoDialog -import xtgeo.common.constants as const xtg = XTGeoDialog() logger = xtg.functionlogger(__name__) diff --git a/src/xtgeo/well/_wells_utils.py b/src/xtgeo/well/_wells_utils.py index 8b60887dc..b82c2f153 100644 --- a/src/xtgeo/well/_wells_utils.py +++ b/src/xtgeo/well/_wells_utils.py @@ -3,12 +3,12 @@ import logging + import numpy as np import pandas as pd import shapely.geometry as sg -from xtgeo.common import XTGeoDialog -from xtgeo.common import XTGShowProgress +from xtgeo.common import XTGeoDialog, XTGShowProgress logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) diff --git a/src/xtgeo/xyz/_xyz_lowlevel.py b/src/xtgeo/xyz/_xyz_lowlevel.py index 8b90b9e1d..d646c5cb1 100644 --- a/src/xtgeo/xyz/_xyz_lowlevel.py +++ b/src/xtgeo/xyz/_xyz_lowlevel.py @@ -3,8 +3,9 @@ import numpy as np -from xtgeo.common import XTGeoDialog + import xtgeo.cxtgeo._cxtgeo as _cxtgeo +from xtgeo.common import XTGeoDialog xtg = XTGeoDialog() diff --git a/tests/conftest.py b/tests/conftest.py index 2e1243ab1..4630b01e7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- """Conftest functions""" -from packaging.version import parse as versionparse - import pandas as pd import pytest +from packaging.version import parse as versionparse class Helpers: diff --git a/tests/test_common/test_calc.py b/tests/test_common/test_calc.py index e651f1ec7..7afd4e8a8 100644 --- a/tests/test_common/test_calc.py +++ b/tests/test_common/test_calc.py @@ -4,6 +4,7 @@ import numpy as np import pytest + import xtgeo import xtgeo.common.calc as xcalc import xtgeo.cxtgeo._cxtgeo as _cxtgeo diff --git a/tests/test_cube/test_cube.py b/tests/test_cube/test_cube.py index b2fdb16c7..9ba5c25ce 100644 --- a/tests/test_cube/test_cube.py +++ b/tests/test_cube/test_cube.py @@ -5,8 +5,9 @@ import numpy as np import pytest import segyio -import xtgeo from hypothesis import HealthCheck, given, settings + +import xtgeo from xtgeo.common import XTGeoDialog from xtgeo.cube import Cube from xtgeo.cube._cube_import import ( diff --git a/tests/test_cube/test_cube_deprecations.py b/tests/test_cube/test_cube_deprecations.py index 6caa48da4..3b1b15605 100644 --- a/tests/test_cube/test_cube_deprecations.py +++ b/tests/test_cube/test_cube_deprecations.py @@ -1,4 +1,5 @@ import pytest + import xtgeo diff --git a/tests/test_etc/test_etc_make_avg_maps.py b/tests/test_etc/test_etc_make_avg_maps.py index c26a18764..2337f1153 100644 --- a/tests/test_etc/test_etc_make_avg_maps.py +++ b/tests/test_etc/test_etc_make_avg_maps.py @@ -2,6 +2,7 @@ import numpy as np import pytest + import xtgeo from xtgeo.common import XTGeoDialog from xtgeo.surface import RegularSurface diff --git a/tests/test_grid3d/eclrun_fixtures.py b/tests/test_grid3d/eclrun_fixtures.py index 0846af879..5bca994ef 100644 --- a/tests/test_grid3d/eclrun_fixtures.py +++ b/tests/test_grid3d/eclrun_fixtures.py @@ -1,6 +1,7 @@ from os.path import join import pytest + import xtgeo diff --git a/tests/test_grid3d/test_ecl_inte_head.py b/tests/test_grid3d/test_ecl_inte_head.py index 2415e895b..210866ebb 100644 --- a/tests/test_grid3d/test_ecl_inte_head.py +++ b/tests/test_grid3d/test_ecl_inte_head.py @@ -1,5 +1,6 @@ import numpy as np import pytest + from xtgeo.grid3d._ecl_inte_head import InteHead, Phases from xtgeo.grid3d._ecl_output_file import Simulator, TypeOfGrid, UnitSystem diff --git a/tests/test_grid3d/test_eclrun.py b/tests/test_grid3d/test_eclrun.py index 9d968f7fe..1dc000df1 100644 --- a/tests/test_grid3d/test_eclrun.py +++ b/tests/test_grid3d/test_eclrun.py @@ -3,6 +3,7 @@ import numpy as np import pytest + import xtgeo # pylint: disable=wildcard-import, unused-wildcard-import diff --git a/tests/test_grid3d/test_grid.py b/tests/test_grid3d/test_grid.py index 904219c3c..002d14fea 100644 --- a/tests/test_grid3d/test_grid.py +++ b/tests/test_grid3d/test_grid.py @@ -6,8 +6,9 @@ import numpy as np import pytest -import xtgeo from hypothesis import given + +import xtgeo from xtgeo.common import XTGeoDialog from xtgeo.grid3d import Grid diff --git a/tests/test_grid3d/test_grid_bytesio.py b/tests/test_grid3d/test_grid_bytesio.py index bc52012d6..f3c22b1be 100644 --- a/tests/test_grid3d/test_grid_bytesio.py +++ b/tests/test_grid3d/test_grid_bytesio.py @@ -6,6 +6,7 @@ import io import numpy as np + import xtgeo from xtgeo.common import XTGeoDialog diff --git a/tests/test_grid3d/test_grid_ecl_grid.py b/tests/test_grid3d/test_grid_ecl_grid.py index 64e121a5b..02c78748e 100644 --- a/tests/test_grid3d/test_grid_ecl_grid.py +++ b/tests/test_grid3d/test_grid_ecl_grid.py @@ -1,11 +1,12 @@ import hypothesis.strategies as st import numpy as np import pytest +from hypothesis import HealthCheck, assume, given, settings +from numpy.testing import assert_allclose + import xtgeo import xtgeo.grid3d._egrid as xtg_egrid import xtgeo.grid3d._grdecl_grid as ggrid -from hypothesis import HealthCheck, assume, given, settings -from numpy.testing import assert_allclose from xtgeo.grid3d._ecl_grid import ( inverse_transform_xtgeo_coord_by_mapaxes, transform_xtgeo_coord_by_mapaxes, diff --git a/tests/test_grid3d/test_grid_egrid.py b/tests/test_grid3d/test_grid_egrid.py index adcb309a8..531ed86b0 100644 --- a/tests/test_grid3d/test_grid_egrid.py +++ b/tests/test_grid3d/test_grid_egrid.py @@ -5,9 +5,10 @@ import hypothesis.strategies as st import numpy as np import pytest +from hypothesis import HealthCheck, assume, given, settings + import xtgeo as xtg import xtgeo.grid3d._egrid as xtge -from hypothesis import HealthCheck, assume, given, settings from .egrid_generator import ( egrids, diff --git a/tests/test_grid3d/test_grid_grdecl.py b/tests/test_grid3d/test_grid_grdecl.py index 45cc118ca..6fa87c181 100644 --- a/tests/test_grid3d/test_grid_grdecl.py +++ b/tests/test_grid3d/test_grid_grdecl.py @@ -5,10 +5,11 @@ import hypothesis.strategies as st import numpy as np import pytest +from hypothesis import HealthCheck, assume, given, settings + import xtgeo import xtgeo.grid3d._ecl_grid as ecl_grid import xtgeo.grid3d._grdecl_grid as ggrid -from hypothesis import HealthCheck, assume, given, settings from xtgeo.grid3d import Grid from xtgeo.grid3d._grdecl_format import open_grdecl from xtgeo.grid3d._grid_import_ecl import grid_from_ecl_grid diff --git a/tests/test_grid3d/test_grid_property_grdecl.py b/tests/test_grid3d/test_grid_property_grdecl.py index d6d686951..4725f27e5 100644 --- a/tests/test_grid3d/test_grid_property_grdecl.py +++ b/tests/test_grid3d/test_grid_property_grdecl.py @@ -4,9 +4,10 @@ import hypothesis.strategies as st import numpy as np import pytest -import xtgeo from hypothesis import HealthCheck, assume, given, settings from numpy.testing import assert_allclose + +import xtgeo from xtgeo.grid3d._gridprop_import_grdecl import read_grdecl_3d_property from .grid_generator import xtgeo_grids as grids diff --git a/tests/test_grid3d/test_grid_vs_points.py b/tests/test_grid3d/test_grid_vs_points.py index dcbd8786f..d4a9f2d17 100644 --- a/tests/test_grid3d/test_grid_vs_points.py +++ b/tests/test_grid3d/test_grid_vs_points.py @@ -2,6 +2,7 @@ import pandas as pd import pytest + import xtgeo xtg = xtgeo.common.XTGeoDialog() diff --git a/tests/test_grid3d/test_grid_xtgformats_io.py b/tests/test_grid3d/test_grid_xtgformats_io.py index ebebbd547..e3a1e3b40 100644 --- a/tests/test_grid3d/test_grid_xtgformats_io.py +++ b/tests/test_grid3d/test_grid_xtgformats_io.py @@ -6,9 +6,10 @@ import hypothesis.strategies as st import numpy as np import pytest -import xtgeo from hypothesis import HealthCheck, given, settings from numpy.testing import assert_allclose + +import xtgeo from xtgeo.common import XTGeoDialog xtg = XTGeoDialog() diff --git a/tests/test_grid3d/test_gridprop_import_eclrun.py b/tests/test_grid3d/test_gridprop_import_eclrun.py index e84056111..a4b07382c 100644 --- a/tests/test_grid3d/test_gridprop_import_eclrun.py +++ b/tests/test_grid3d/test_gridprop_import_eclrun.py @@ -8,9 +8,10 @@ import hypothesis.strategies as st import numpy as np import pytest +from hypothesis import HealthCheck, assume, given, settings + import xtgeo import xtgeo.grid3d._find_gridprop_in_eclrun as xtg_im_ecl -from hypothesis import HealthCheck, assume, given, settings from xtgeo.grid3d._ecl_inte_head import InteHead from xtgeo.grid3d._ecl_logi_head import LogiHead from xtgeo.grid3d._ecl_output_file import Phases diff --git a/tests/test_plot/test_colortables.py b/tests/test_plot/test_colortables.py index 26818afcc..87dfe4be1 100644 --- a/tests/test_plot/test_colortables.py +++ b/tests/test_plot/test_colortables.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import sys + import xtgeo.plot._colortables as ct from xtgeo.common import XTGeoDialog diff --git a/tests/test_surface/test_forks.py b/tests/test_surface/test_forks.py index 624422d34..6ccbc56dd 100644 --- a/tests/test_surface/test_forks.py +++ b/tests/test_surface/test_forks.py @@ -1,6 +1,7 @@ # coding: utf-8 import subprocess + import xtgeo xtg = xtgeo.common.XTGeoDialog() diff --git a/tests/test_surface/test_regular_surface_vs_points.py b/tests/test_surface/test_regular_surface_vs_points.py index 576345e37..1c607467c 100644 --- a/tests/test_surface/test_regular_surface_vs_points.py +++ b/tests/test_surface/test_regular_surface_vs_points.py @@ -1,6 +1,7 @@ from os.path import join import pytest + import xtgeo from xtgeo.common import XTGeoDialog from xtgeo.surface import RegularSurface diff --git a/tests/test_surface/test_surf_xyz_from_ij.py b/tests/test_surface/test_surf_xyz_from_ij.py index d3f170061..87183f708 100644 --- a/tests/test_surface/test_surf_xyz_from_ij.py +++ b/tests/test_surface/test_surf_xyz_from_ij.py @@ -1,7 +1,8 @@ +import numpy as np import pytest -import xtgeo.cxtgeo._cxtgeo as _cxtgeo # type: ignore + import xtgeo -import numpy as np +import xtgeo.cxtgeo._cxtgeo as _cxtgeo # type: ignore class Surface: diff --git a/tests/test_surface/test_zmap_spec.py b/tests/test_surface/test_zmap_spec.py index 52df5457e..225286bc1 100644 --- a/tests/test_surface/test_zmap_spec.py +++ b/tests/test_surface/test_zmap_spec.py @@ -2,6 +2,7 @@ from pathlib import Path import pytest + import xtgeo from xtgeo.surface._zmap_parser import ZMAPFormatException, ZMAPSurface, parse_zmap diff --git a/tests/test_well/conftest.py b/tests/test_well/conftest.py index c9f374bc6..800df50b5 100644 --- a/tests/test_well/conftest.py +++ b/tests/test_well/conftest.py @@ -1,4 +1,5 @@ import pytest + import xtgeo diff --git a/tests/test_well/test_blockedwell.py b/tests/test_well/test_blockedwell.py index 3fe3a0ad2..629dd4035 100644 --- a/tests/test_well/test_blockedwell.py +++ b/tests/test_well/test_blockedwell.py @@ -4,6 +4,7 @@ from os.path import join import pytest + import xtgeo from xtgeo.common import XTGeoDialog diff --git a/tests/test_well/test_blockedwells.py b/tests/test_well/test_blockedwells.py index 024b6db0a..cf0340ebb 100644 --- a/tests/test_well/test_blockedwells.py +++ b/tests/test_well/test_blockedwells.py @@ -4,6 +4,7 @@ from os.path import join import pytest + import xtgeo from xtgeo.common import XTGeoDialog from xtgeo.well import BlockedWells diff --git a/tests/test_well/test_well.py b/tests/test_well/test_well.py index 9bfea8f3d..48d476218 100644 --- a/tests/test_well/test_well.py +++ b/tests/test_well/test_well.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- +import sys from collections import OrderedDict from os.path import join import numpy as np import pandas as pd import pytest -import sys import xtgeo from xtgeo.common import XTGeoDialog diff --git a/tests/test_well/test_well_deprecations.py b/tests/test_well/test_well_deprecations.py index eecde0c4e..3dc47c783 100644 --- a/tests/test_well/test_well_deprecations.py +++ b/tests/test_well/test_well_deprecations.py @@ -1,6 +1,7 @@ import pytest -import xtgeo from packaging import version + +import xtgeo from xtgeo import Well from xtgeo import version as xtgeo_version diff --git a/tests/test_well/test_well_to_points.py b/tests/test_well/test_well_to_points.py index 7568c4aed..3fa4f3460 100644 --- a/tests/test_well/test_well_to_points.py +++ b/tests/test_well/test_well_to_points.py @@ -1,4 +1,5 @@ import pytest + import xtgeo from xtgeo.common import XTGeoDialog diff --git a/tests/test_well/test_well_vs_grid.py b/tests/test_well/test_well_vs_grid.py index 5265c88ab..f9b2c83bc 100644 --- a/tests/test_well/test_well_vs_grid.py +++ b/tests/test_well/test_well_vs_grid.py @@ -4,6 +4,7 @@ from os.path import join import pytest + import xtgeo from xtgeo.common import XTGeoDialog diff --git a/tests/test_well/test_well_vs_surface.py b/tests/test_well/test_well_vs_surface.py index 98405673b..6d749d690 100644 --- a/tests/test_well/test_well_vs_surface.py +++ b/tests/test_well/test_well_vs_surface.py @@ -4,6 +4,7 @@ from os.path import join import pytest + import xtgeo xtg = xtgeo.common.XTGeoDialog() diff --git a/tests/test_well/test_wells.py b/tests/test_well/test_wells.py index 169a60e37..e9ed8e151 100644 --- a/tests/test_well/test_wells.py +++ b/tests/test_well/test_wells.py @@ -4,6 +4,7 @@ from os.path import join import pytest + import xtgeo from xtgeo.common import XTGeoDialog from xtgeo.well import Wells diff --git a/tests/test_xyz/test_points.py b/tests/test_xyz/test_points.py index 680c7884e..5070ff69f 100644 --- a/tests/test_xyz/test_points.py +++ b/tests/test_xyz/test_points.py @@ -4,9 +4,10 @@ import numpy as np import pandas as pd import pytest -import xtgeo from hypothesis import given, settings from hypothesis import strategies as st + +import xtgeo from xtgeo.xyz import Points PFILE = pathlib.Path("points/eme/1/emerald_10_random.poi") diff --git a/tests/test_xyz/test_points_from_surface.py b/tests/test_xyz/test_points_from_surface.py index 8775e5d03..7a1a27a21 100644 --- a/tests/test_xyz/test_points_from_surface.py +++ b/tests/test_xyz/test_points_from_surface.py @@ -1,6 +1,7 @@ import pathlib import pandas as pd + import xtgeo SURFACE = pathlib.Path("surfaces/reek/1/topreek_rota.gri") diff --git a/tests/test_xyz/test_points_from_wells.py b/tests/test_xyz/test_points_from_wells.py index a4f8025eb..7433bd206 100644 --- a/tests/test_xyz/test_points_from_wells.py +++ b/tests/test_xyz/test_points_from_wells.py @@ -2,6 +2,7 @@ import pathlib import pytest + import xtgeo from xtgeo.xyz import Points diff --git a/tests/test_xyz/test_points_vs_other.py b/tests/test_xyz/test_points_vs_other.py index e8db32aea..8d5d67211 100644 --- a/tests/test_xyz/test_points_vs_other.py +++ b/tests/test_xyz/test_points_vs_other.py @@ -1,6 +1,7 @@ import pathlib import pytest + import xtgeo SFILE1A = pathlib.Path("surfaces/reek/1/topupperreek.gri") diff --git a/tests/test_xyz/test_xyz_deprecated.py b/tests/test_xyz/test_xyz_deprecated.py index c5bd9e9e0..800e5f2bf 100644 --- a/tests/test_xyz/test_xyz_deprecated.py +++ b/tests/test_xyz/test_xyz_deprecated.py @@ -4,8 +4,9 @@ import pandas as pd import pytest -import xtgeo from packaging import version + +import xtgeo from xtgeo import version as xtgeo_version PFILE1A = pathlib.Path("polygons/reek/1/top_upper_reek_faultpoly.zmap") diff --git a/tests/test_xyz/test_xyz_roxapi_mock.py b/tests/test_xyz/test_xyz_roxapi_mock.py index 40339793a..fc3882c2b 100644 --- a/tests/test_xyz/test_xyz_roxapi_mock.py +++ b/tests/test_xyz/test_xyz_roxapi_mock.py @@ -5,9 +5,10 @@ import numpy as np import pandas as pd import pytest -import xtgeo from pandas.testing import assert_frame_equal +import xtgeo + @pytest.fixture def point_set():