equinor / equinor/ert

Create run monitor using react and equinor design system

Open
#11,273 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
161
Forks
140
Avg merge
2d 1h
Merged PRs (30d)
138

Description

We would like to use a react front end instead of PyQt as we are now, so we should start by testing this on a limited scope. A good component is the run monitor functionality, which already communicates using serializable events. The requirements are:

1. Start an application using PyQt and [qt webview](https://doc.qt.io/qt-6/qtwebview-index.html) to serve as the main window.
2. Use react and [EDS](https://eds.equinor.com) to create the front-end to show in the webview
3. Set up a test framework for the front end.

The best starting point is to create this as a stand alone window to monitor everest runs, as that already communicates through websockets, more or less a replication of what is used by the:

`everest monitor ` end-point: https://github.com/equinor/ert/blob/7aef7c638de67ab6305a89969f34cfa75d235690/src/everest/bin/monitor_script.py#L69

This end point connects to a websockets end-point and outputs the events from the experiment evaluation: https://github.com/equinor/ert/blob/7aef7c638de67ab6305a89969f34cfa75d235690/src/everest/detached/client.py#L223-L260

How the monitoring should look like is not set in stone, but suggest starting simple so the code is not too complex. What we currently have can be seen by going to: test-data/everest/math_func

and running:

`everest run config_minimal.yml --new-run --gui`

and looks like:

![Image](https://github.com/user-attachments/assets/0225cec5-3584-4d2e-8d76-b5f55931c0d7)

This could also be a list view, or something similar. It is built by the following events:

https://github.com/equinor/ert/blob/40b84131a914933404d4307d3673f331413e8ff5/src/ert/run_models/event.py#L88-L102


Suggest starting with ignoring most of the events, and just reacting to a subset, and then iteratively adding reacting to more event types.

For testing it can be a good idea to add some `sleeps` to the running simulations so everything does not end immediately, can be added here: https://github.com/equinor/ert/blob/851d1f5814a72ed2808414540f4b18a2c80898b2/test-data/everest/math_func/jobs/distance3.py#L21, for example:

```python
import time; time.sleep(10)
```

When running the server, a file will always be created showing where it is running, to run the server manually, do:

`everserver --output-dir `

it will then create a folder: /detached_node_output/.session which contains a file: `storage_server.json`, which has the address of the server. You can also view the swagger documentation by visiting the address in the browser:

![Image](https://github.com/user-attachments/assets/06968588-f105-4bc4-a850-8bb31dc044e7)

Contributor guide

Open the contributing guide

Research direction

Start with src/everest/bin/monitor_script.py and src/everest/detached/client.py to understand how the run monitor connects to websockets and receives serializable events. Review src/ert/run_models/event.py and test-data/everest/math_func, then define a minimal React and EDS view in a PyQt webview with a front-end test framework; done means it can display selected run events from a standalone monitor window.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, react
Domain
desktop, frontend, networking, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.