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

Remove try except ModuleNotFoundError #26

Merged
merged 1 commit into from
Jan 22, 2024
Merged
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
20 changes: 6 additions & 14 deletions src/fmu/sumo/uploader/scripts/sumo_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,8 @@
import argparse
import logging
from pathlib import Path

try:
from ert.shared.plugins.plugin_manager import hook_implementation # type: ignore
except ModuleNotFoundError:
from ert_shared.plugins.plugin_manager import hook_implementation # type: ignore

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

try:
from ert import ErtScript # type: ignore
Expand All @@ -29,19 +21,19 @@
logger.setLevel(logging.CRITICAL)

# This documentation is for sumo_uploader as an ERT workflow
DESCRIPTION = """SUMO_UPLOAD will upload files to Sumo. The typical use case is as add-on to
DESCRIPTION = """SUMO_UPLOAD will upload files to Sumo. The typical use case is as add-on to
post-processing workflows which aggregate data across an ensemble and stores the
results outside the realization folders.

SUMO_UPLOAD is implemented both as FORWARD_JOB and WORKFLOW_JOB and can be called from
SUMO_UPLOAD is implemented both as FORWARD_JOB and WORKFLOW_JOB and can be called from
both contexts when running ERT."""

EXAMPLES = """In an existing workflow e.g. ert/bin/workflows/MY_WORKFLOW with the contents
EXAMPLES = """In an existing workflow e.g. ert/bin/workflows/MY_WORKFLOW with the contents

MY_JOB <arguments>
SUMO_UPLOAD <CASEPATH> <CASEPATH>/MyIteration/share/results/tables/*.csv <SUMO_ENV>

where ``MY_JOB`` typically refers to a post-processing job creating data
where ``MY_JOB`` typically refers to a post-processing job creating data
and where <CASEPATH> typically refers to <SCRATCH>/<USER>/<CASE>

<SUMO_ENV> is typically set in the config as it is used also by forward jobs.
Expand Down