Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse import order #61

Merged
merged 2 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy
pyyaml
xtgeo
fmu-dataio
fmu-dataio>=1.0.0
xtgeoviz
2 changes: 1 addition & 1 deletion src/xtgeoapp_grd3dmaps/avghc/_export_via_fmudataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def export_avg_map_dataio(surf, nametuple, config):
workflow="xtgeoapp-grd3dmaps script average maps",
)
fname = edata.export(surf, unit=unit)
xtg.say(f"Outout as fmu-dataio: {fname}")
xtg.say(f"Output as fmu-dataio: {fname}")
return fname


Expand Down
6 changes: 3 additions & 3 deletions src/xtgeoapp_grd3dmaps/hook_implementations/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from pkg_resources import resource_filename

try:
from ert_shared.plugins.plugin_manager import hook_implementation
from ert_shared.plugins.plugin_response import plugin_response
except ModuleNotFoundError:
from ert.shared.plugins.plugin_manager import hook_implementation
from ert.shared.plugins.plugin_response import plugin_response
except ModuleNotFoundError:
from ert_shared.plugins.plugin_manager import hook_implementation
from ert_shared.plugins.plugin_response import plugin_response

PLUGIN_NAME = "xtgeoapp_grd3dmaps"

Expand Down
2 changes: 1 addition & 1 deletion tests/test_scripts/test_grid3d_average_map_dataio1a.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_average_map_dataio1a_add2docs(datatree):
print(json.dumps(metadata, indent=4))

assert metadata["data"]["spec"]["ncol"] == 200
assert metadata["data"]["property"]["attribute"] == "saturation"
assert metadata["data"]["content"]["property"]["attribute"] == "saturation"

# for auto documentation
shutil.copy2(cfg, SOURCEPATH / "docs" / "test_to_docs")
2 changes: 1 addition & 1 deletion tests/test_scripts/test_grid3d_hc_thickness_dataio1a.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_hc_thickness_1a_add2docs(datatree):
print(json.dumps(metadata, indent=4))

assert metadata["data"]["spec"]["ncol"] == 146
assert metadata["data"]["property"]["attribute"] == "oilthickness"
assert metadata["data"]["content"]["property"]["attribute"] == "oilthickness"

# for auto documentation
shutil.copy2(cfg, SOURCEPATH / "docs" / "test_to_docs")
2 changes: 1 addition & 1 deletion tests/test_scripts/test_grid3d_hc_thickness_dataio1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_hc_thickness_1b_add2docs(datatree):
print(json.dumps(metadata, indent=4))

assert metadata["data"]["spec"]["ncol"] == 161
assert metadata["data"]["property"]["attribute"] == "oilthickness"
assert metadata["data"]["content"]["property"]["attribute"] == "oilthickness"

# for auto documentation
shutil.copy2(cfg, SOURCEPATH / "docs" / "test_to_docs")
2 changes: 1 addition & 1 deletion tests/test_scripts/test_grid3d_hc_thickness_dataio1c.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_hc_thickness_1c_add2docs(datatree):
print(json.dumps(metadata, indent=4))

assert metadata["data"]["spec"]["ncol"] == 292
assert metadata["data"]["time"][0]["value"] == "1990-01-01T00:00:00"
assert metadata["data"]["time"]["t0"]["value"] == "1990-01-01T00:00:00"

# for auto documentation
shutil.copy2(cfg, SOURCEPATH / "docs" / "test_to_docs")
9 changes: 5 additions & 4 deletions tests/test_vs_ert/test_hook_implementations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@
import pytest

try:
import ert_shared # noqa
import ert # noqa
except ImportError:
try:
import ert # noqa
import ert_shared # noqa
except ImportError:
pytest.skip(
"Not testing ERT hooks when ERT is not installed", allow_module_level=True
)

import xtgeoapp_grd3dmaps.hook_implementations.jobs as jobs

try:
from ert_shared.plugins.plugin_manager import ErtPluginManager
except ModuleNotFoundError:
from ert.shared.plugins.plugin_manager import ErtPluginManager
except ModuleNotFoundError:
from ert_shared.plugins.plugin_manager import ErtPluginManager

EXPECTED_JOBS = {
"GRID3D_AVERAGE_MAP": "xtgeoapp_grd3dmaps/config_jobs/GRID3D_AVERAGE_MAP",
Expand Down