equinor / webviz-subsurface

Webviz-config plugins for subsurface data.
https://github.com/orgs/equinor/projects/24
GNU General Public License v3.0
55 stars 59 forks source link

Reusable plotting logic separate from plugins? #737

Closed mhwaage closed 1 year ago

mhwaage commented 3 years ago

In our ongoing project, we are attempting to make a plugin that can display simulation results (e.g. from an smry file) together with production data obtained via an API. The immediate goal is to allow users to upload a smry file, read it into memory, and display a fanchart from that file together with production data.

Our first approach would have been to import the existing ReservoirTimeSeries plugin, but that cannot support our use case since

  1. It expects all files to be known before launching the server
  2. We can not configure it to take in additional plots from our production data.

As a next approach, we would like to reuse functions used by the plugin to create the underlying plots. Unfortunately, I can't seem to find a clean way to do this either. Unfortunately, it appears that the loading of csv files etc is done fairly directly in the init of the plugin, making it hard to extract the reading/loading for our use case.

Would it be possible to decouple the plugin from the plotting logic slightly, so it is easier to reuse? Or am I missing something, and this is already possible?

anders-kiaer commented 3 years ago

I think this is a good idea @mhwaage. What do you think @jorgenherje? Is this something to include in the ongoing restructuring work (#698) of the ReservoirTimeSeries plugin?

mhwaage commented 1 year ago

This issue is stale, and no longer relevant for my project - I suspect also not very relevant for Webviz anymore either. Closing.