From f31e9c552ab0c30c1b1dd414f72be0fa7f629b86 Mon Sep 17 00:00:00 2001 From: Erich Suter Date: Mon, 19 Aug 2024 14:26:42 +0200 Subject: [PATCH] TYP: fix ruff issues after ruff update --- tests/test_scripts/test_grid3d_aggregate_map.py | 1 + tests/test_scripts/test_grid3d_average_map1.py | 3 ++- tests/test_scripts/test_grid3d_average_map2.py | 3 ++- tests/test_scripts/test_grid3d_average_map4.py | 3 ++- tests/test_scripts/test_grid3d_average_map_dataio1a.py | 1 + tests/test_scripts/test_grid3d_contacts1.py | 3 ++- tests/test_scripts/test_grid3d_hc_thickness1.py | 3 ++- tests/test_scripts/test_grid3d_hc_thickness2.py | 3 ++- tests/test_scripts/test_grid3d_hc_thickness3.py | 3 ++- tests/test_scripts/test_grid3d_hc_thickness4.py | 3 ++- tests/test_scripts/test_grid3d_hc_thickness_dataio1a.py | 3 ++- tests/test_scripts/test_grid3d_hc_thickness_dataio1b.py | 3 ++- tests/test_scripts/test_grid3d_hc_thickness_dataio1c.py | 3 ++- tests/test_scripts/test_grid3d_migration_time.py | 1 + tests/test_submodules/test_grid_aggregate.py | 1 + 15 files changed, 26 insertions(+), 11 deletions(-) diff --git a/tests/test_scripts/test_grid3d_aggregate_map.py b/tests/test_scripts/test_grid3d_aggregate_map.py index 93939ae..b737474 100644 --- a/tests/test_scripts/test_grid3d_aggregate_map.py +++ b/tests/test_scripts/test_grid3d_aggregate_map.py @@ -2,6 +2,7 @@ import pytest import xtgeo + from grid3d_maps.aggregate import grid3d_aggregate_map diff --git a/tests/test_scripts/test_grid3d_average_map1.py b/tests/test_scripts/test_grid3d_average_map1.py index 5b55374..c6058d0 100644 --- a/tests/test_scripts/test_grid3d_average_map1.py +++ b/tests/test_scripts/test_grid3d_average_map1.py @@ -3,10 +3,11 @@ import shutil from pathlib import Path -import grid3d_maps.avghc.grid3d_average_map as grid3d_hc_thickness import pytest import xtgeo +import grid3d_maps.avghc.grid3d_average_map as grid3d_hc_thickness + SOURCEPATH = Path(__file__).absolute().parent.parent.parent diff --git a/tests/test_scripts/test_grid3d_average_map2.py b/tests/test_scripts/test_grid3d_average_map2.py index 4716611..419b597 100644 --- a/tests/test_scripts/test_grid3d_average_map2.py +++ b/tests/test_scripts/test_grid3d_average_map2.py @@ -1,10 +1,11 @@ """Testing suite avg2.""" -import grid3d_maps.avghc.grid3d_average_map as grid3d_average_map import numpy.testing as nptest import pytest import xtgeo +import grid3d_maps.avghc.grid3d_average_map as grid3d_average_map + # ============================================================================= # Do tests # ============================================================================= diff --git a/tests/test_scripts/test_grid3d_average_map4.py b/tests/test_scripts/test_grid3d_average_map4.py index 6f7d695..573ae7f 100644 --- a/tests/test_scripts/test_grid3d_average_map4.py +++ b/tests/test_scripts/test_grid3d_average_map4.py @@ -1,9 +1,10 @@ """Testing suite avg4.""" -import grid3d_maps.avghc.grid3d_average_map as grid3d_average_map import pytest import xtgeo +import grid3d_maps.avghc.grid3d_average_map as grid3d_average_map + # ============================================================================= # Do tests # ============================================================================= diff --git a/tests/test_scripts/test_grid3d_average_map_dataio1a.py b/tests/test_scripts/test_grid3d_average_map_dataio1a.py index e7e870f..c77b4ce 100644 --- a/tests/test_scripts/test_grid3d_average_map_dataio1a.py +++ b/tests/test_scripts/test_grid3d_average_map_dataio1a.py @@ -9,6 +9,7 @@ import pytest import xtgeo import yaml + from grid3d_maps.avghc import grid3d_average_map YAMLCONTENT = """ diff --git a/tests/test_scripts/test_grid3d_contacts1.py b/tests/test_scripts/test_grid3d_contacts1.py index da5c382..4c41c69 100644 --- a/tests/test_scripts/test_grid3d_contacts1.py +++ b/tests/test_scripts/test_grid3d_contacts1.py @@ -1,8 +1,9 @@ """Testing contacts, not finished!""" -import grid3d_maps.contact.grid3d_contact_map as grid3d_contacts import pytest +import grid3d_maps.contact.grid3d_contact_map as grid3d_contacts + # ============================================================================= # Do tests # ============================================================================= diff --git a/tests/test_scripts/test_grid3d_hc_thickness1.py b/tests/test_scripts/test_grid3d_hc_thickness1.py index 2df86eb..2d4ab1a 100644 --- a/tests/test_scripts/test_grid3d_hc_thickness1.py +++ b/tests/test_scripts/test_grid3d_hc_thickness1.py @@ -3,11 +3,12 @@ import shutil from pathlib import Path -import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness import numpy as np import pytest import xtgeo +import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness + SOURCEPATH = Path(__file__).absolute().parent.parent.parent diff --git a/tests/test_scripts/test_grid3d_hc_thickness2.py b/tests/test_scripts/test_grid3d_hc_thickness2.py index 7315bf6..2cf0321 100644 --- a/tests/test_scripts/test_grid3d_hc_thickness2.py +++ b/tests/test_scripts/test_grid3d_hc_thickness2.py @@ -1,8 +1,9 @@ -import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness import numpy as np import pytest import xtgeo +import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness + def test_hc_thickness2a(datatree): """HC thickness with YAML config example 2a; use STOOIP prop from RMS""" diff --git a/tests/test_scripts/test_grid3d_hc_thickness3.py b/tests/test_scripts/test_grid3d_hc_thickness3.py index ecd9603..1df254a 100644 --- a/tests/test_scripts/test_grid3d_hc_thickness3.py +++ b/tests/test_scripts/test_grid3d_hc_thickness3.py @@ -1,7 +1,8 @@ -import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness import pytest import xtgeo +import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness + def test_hc_thickness3a(datatree): """HC thickness with external configfiles, HC 3a""" diff --git a/tests/test_scripts/test_grid3d_hc_thickness4.py b/tests/test_scripts/test_grid3d_hc_thickness4.py index 731ec5e..29735d0 100644 --- a/tests/test_scripts/test_grid3d_hc_thickness4.py +++ b/tests/test_scripts/test_grid3d_hc_thickness4.py @@ -1,9 +1,10 @@ """Test suite hc 4.""" -import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness import pytest import xtgeo +import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness + def test_hc_thickness4a(datatree): """HC thickness with external configfiles, HC 4a""" diff --git a/tests/test_scripts/test_grid3d_hc_thickness_dataio1a.py b/tests/test_scripts/test_grid3d_hc_thickness_dataio1a.py index b4c0aef..0b11819 100644 --- a/tests/test_scripts/test_grid3d_hc_thickness_dataio1a.py +++ b/tests/test_scripts/test_grid3d_hc_thickness_dataio1a.py @@ -6,11 +6,12 @@ import sys from pathlib import Path -import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness import pytest import xtgeo import yaml +import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness + YAMLCONTENT = """ title: Reek # diff --git a/tests/test_scripts/test_grid3d_hc_thickness_dataio1b.py b/tests/test_scripts/test_grid3d_hc_thickness_dataio1b.py index 62b6636..a4590e6 100644 --- a/tests/test_scripts/test_grid3d_hc_thickness_dataio1b.py +++ b/tests/test_scripts/test_grid3d_hc_thickness_dataio1b.py @@ -6,11 +6,12 @@ import sys from pathlib import Path -import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness import pytest import xtgeo import yaml +import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness + YAMLCONTENT = """ title: Reek diff --git a/tests/test_scripts/test_grid3d_hc_thickness_dataio1c.py b/tests/test_scripts/test_grid3d_hc_thickness_dataio1c.py index 6812f5f..ab10e52 100644 --- a/tests/test_scripts/test_grid3d_hc_thickness_dataio1c.py +++ b/tests/test_scripts/test_grid3d_hc_thickness_dataio1c.py @@ -6,12 +6,13 @@ import sys from pathlib import Path -import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness import pytest import xtgeo import yaml from fmu.config import utilities as ut +import grid3d_maps.avghc.grid3d_hc_thickness as grid3d_hc_thickness + YAMLCONTENT = """ title: Reek # Use a STOIIP or HCPV property from RMS diff --git a/tests/test_scripts/test_grid3d_migration_time.py b/tests/test_scripts/test_grid3d_migration_time.py index 8d0d96d..20ff341 100644 --- a/tests/test_scripts/test_grid3d_migration_time.py +++ b/tests/test_scripts/test_grid3d_migration_time.py @@ -1,5 +1,6 @@ import pytest import xtgeo + from grid3d_maps.aggregate import grid3d_migration_time diff --git a/tests/test_submodules/test_grid_aggregate.py b/tests/test_submodules/test_grid_aggregate.py index f8e40e4..9caf562 100644 --- a/tests/test_submodules/test_grid_aggregate.py +++ b/tests/test_submodules/test_grid_aggregate.py @@ -2,6 +2,7 @@ import numpy.testing as npt import pytest import xtgeo + from grid3d_maps.aggregate import AggregationMethod, aggregate_maps