-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split settings groups in
RftPlotter
(#1180)
* Split selections into plot_type and ensembles * Renames Selections to Ensembles * removed print * Removed len > 0 to check if lists are not empty Co-authored-by: Øyvind Lind-Johansen <[email protected]>
- Loading branch information
Showing
7 changed files
with
45 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
webviz_subsurface/plugins/_rft_plotter/_views/_sim_vs_obs_view/_settings/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from ._selections import PlotType, Selections | ||
from ._ensembles import Ensembles | ||
from ._plot_type import PlotType, PlotTypeSettings | ||
from ._size_color_settings import SizeColorSettings |
26 changes: 26 additions & 0 deletions
26
webviz_subsurface/plugins/_rft_plotter/_views/_sim_vs_obs_view/_settings/_ensembles.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from typing import List | ||
|
||
import webviz_core_components as wcc | ||
from dash.development.base_component import Component | ||
from webviz_config.utils import StrEnum | ||
from webviz_config.webviz_plugin_subclasses import SettingsGroupABC | ||
|
||
|
||
class Ensembles(SettingsGroupABC): | ||
class Ids(StrEnum): | ||
ENSEMBLES = "ensembles" | ||
|
||
def __init__(self, ensembles: List[str]) -> None: | ||
super().__init__("Ensembles") | ||
self._ensembles = ensembles | ||
|
||
def layout(self) -> List[Component]: | ||
return [ | ||
wcc.Dropdown( | ||
id=self.register_component_unique_id(self.Ids.ENSEMBLES), | ||
options=[{"label": ens, "value": ens} for ens in self._ensembles], | ||
value=[self._ensembles[0] if self._ensembles else None], | ||
clearable=False, | ||
multi=True, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters