Remove direct import from SimulationTimeSeries
utilities
#1161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Various plugins performs direct import of utility objects/functions from
SimulationTimeSeries
.Move the respective utils to a common top-level utility folder. Utilities which are too general, and does not belong in the top-level utility folder, are moved into the specific plugins to prevent misusage.
Done:
ProviderSet
towebviz_subsurface/_utils
for common usage.ProviderSet
toEnsembleSummaryProviderSet
as the utility is now moved out of scope ofSimulationTimeSeries
. There are multipleproviders
inwebviz-subsurface
and a common utility must clarify its scope - i.e. set forEnsembleSummaryProvider
.names()
-method is renamed toprovider_names()
for clarity.EnsembleSummaryProvider
interface across all provides in set.ProviderSet
creator methods towebviz_subsurface/_utils
ensemble_summary_provider_set_factory.py
according to renaming toEnsembleSummaryProviderSet
webviz_subsurface/_utils/datetime_utils.py
SimulationTimeSeries
-plugin folder. The implementations assumes data with daily frequency, thus the date conversionto_str
andfrom_str
methods can result in loss of data if date frequency is higher than daily. This should not be common utility methods. File deleted and utility methods added directly in respective plugins.Closes: #1106