Skip to content

Commit

Permalink
Expose rft input files as arguments (#1313)
Browse files Browse the repository at this point in the history
* exposed rft input files as arguments

* black version updated

* pylint fixes

* pylint fixes

* more fixes

---------

Co-authored-by: Øyvind Lind-Johansen <[email protected]>
  • Loading branch information
lindjoha and Øyvind Lind-Johansen authored Jan 17, 2025
1 parent 6d1b6f6 commit 2b63b6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions webviz_subsurface/plugins/_rft_plotter/_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,23 @@ class Ids(StrEnum):
def __init__(
self,
webviz_settings: WebvizSettings,
rft: str = "share/results/tables/rft.csv",
rft_ert: str = "share/results/tables/rft_ert.csv",
csvfile_rft: Path = None,
csvfile_rft_ert: Path = None,
ensembles: Optional[List[str]] = None,
formations: Path = None,
obsdata: Path = None,
faultlines: Path = None,
) -> None:
# pylint: disable = too-many-arguments
super().__init__()

self._datamodel = RftPlotterDataModel(
webviz_settings,
ensembles,
rft,
rft_ert,
formations,
faultlines,
obsdata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ def __init__(
self,
webviz_settings: WebvizSettings,
ensembles: Optional[List[str]],
rft: str,
rft_ert: str,
formations: Path = None,
faultlines: Path = None,
obsdata: Path = None,
csvfile_rft: Path = None,
csvfile_rft_ert: Path = None,
):
# pylint: disable = too-many-arguments
self.formations = formations
self.faultlines = faultlines
self.obsdata = obsdata
Expand Down Expand Up @@ -67,12 +70,12 @@ def __init__(

self.ertdatadf = create_csvfile_providerset_from_paths(
ens_paths,
"share/results/tables/rft_ert.csv",
rft_ert,
).get_aggregated_dataframe()

try:
self.simdf = create_csvfile_providerset_from_paths(
ens_paths, "share/results/tables/rft.csv"
ens_paths, rft
).get_aggregated_dataframe()

except ValueError as err:
Expand Down

0 comments on commit 2b63b6d

Please sign in to comment.