Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Everest into ert #8709

Merged
merged 93 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
6197cf5
Inital commit
May 2, 2024
6083043
Pin ropt dependencies (#6)
verveerpj May 7, 2024
15593bc
Use refactored ropt plugin code (#5)
verveerpj May 8, 2024
481567d
Avoid setting requirements using a beta tag of Ert
andreas-el May 15, 2024
b2e3e05
Missed instance of job_progress.jobs (#9)
DanSava May 16, 2024
7cb9c20
Ensure site-config is active when making ert config (#12)
berland May 27, 2024
4d58fa0
Add enabled option to controls to allow fixing them
verveerpj May 30, 2024
f9c8a50
Enforce server and simulations are running on the same queue
DanSava May 30, 2024
238f2b9
Extend ert queue options with everest options instead of overwriting all
larsevj May 31, 2024
42b2553
Updates for ropt 0.4.0
verveerpj Jun 6, 2024
c7b670f
Only use ruff and pylint for style and linting
larsevj Jun 3, 2024
560737c
Remove rms config plugin
larsevj Jun 13, 2024
b17b588
Add C4 and NPY to ruff rules
larsevj Jun 13, 2024
69a4c39
Fix parts of the mypy errors
larsevj Jun 13, 2024
4e0d141
Small additional mypy fixes
verveerpj Jun 13, 2024
192deb9
Add file with perturbation results
verveerpj Jun 6, 2024
471d4c5
Update to new ert api
oyvindeide Jun 19, 2024
48dac86
Remove dependency on LibreFacade where it was not strictly necessary.
DanSava Jun 20, 2024
ec348af
Lessen dependency on ert config if not needed
DanSava Jun 21, 2024
7624891
Use Erts feature toggling for Scheduler
berland Jun 25, 2024
039ce1b
Accept the new everest-models hook for linting forward models
sregales-TNO Jun 20, 2024
da10415
Fix typo successfully
berland Jun 25, 2024
8796029
Handle case for no local DNS properly
berland Jun 25, 2024
ea11841
Fix how everest handels everest-models plugin hook
sregales-TNO Jun 26, 2024
4a34069
Use running instead if isRunning
oyvindeide Jun 27, 2024
d1829f9
Use self
oyvindeide Jun 27, 2024
76e32b3
Use top level import for moved ert exports
eivindjahren Jun 27, 2024
ce81fd2
Create control variale with inital guess as a list
sregales-TNO Jan 30, 2024
92888b9
Add the newly created control variable to control config
sregales-TNO Feb 6, 2024
06bb880
Refactor control config
sregales-TNO Feb 8, 2024
2d6edd0
Introduce initial_guess list control variable to controls
sregales-TNO Feb 8, 2024
efb1ab3
Use build in hash and unique function to check for duplicates
sregales-TNO Feb 12, 2024
26f8141
Integrate the new Everest array configuration feature
sregales-TNO Jun 27, 2024
d4289d4
Update everest config documentation
sregales-TNO Jun 27, 2024
77413e5
Fix bug in index numbering for input constraints
verveerpj Jul 1, 2024
5206597
Adapt to ert plugin forward models
Jul 8, 2024
793af39
Remove dependency on ert's internal fmsteps
Jul 12, 2024
345d771
Update to ropt 0.5
verveerpj Jul 19, 2024
92e7f0d
Do not used deprecated feature toggle
eivindjahren Jul 24, 2024
b409f38
Updating the theme and the toc
roliveira Jul 25, 2024
804af8d
Make Everest independent of everest-models
DanSava Jul 31, 2024
7228e0f
Auto-generate documentation for the CLI
DanSava Aug 1, 2024
ecd6801
Remove no longer needed folder switching.
DanSava Aug 29, 2024
75d4ce8
Update everest architecture_design.png
DanSava Aug 30, 2024
3e88431
Fixup wrong variable naming
yngve-sk Sep 2, 2024
35da18e
Remove linting logic used in old config.
DanSava Sep 2, 2024
78f7cab
Remove typos and make minor changes in docs
heytorsf Aug 26, 2024
9993cbd
Move to src/ structure
frode-aarstad Sep 2, 2024
9f8c496
Rename everest2res to everest_to_ert_config
DanSava Sep 3, 2024
e653b54
Remove app_main_window no longer used.
DanSava Sep 3, 2024
a7adc56
Add tests for QtDialogsOut
frode-aarstad Sep 3, 2024
12030ee
Add test code coverage
DanSava Sep 3, 2024
7ec17ec
Remove import of ert.JobStatus (#62)
jonathan-eq Sep 4, 2024
7c6420f
Add test for ieverest_entry
DanSava Sep 4, 2024
acf2c49
Add tests for export data dialog
frode-aarstad Sep 4, 2024
b50a66e
Handel no more direct access to ensemble by name from storage.
DanSava Sep 5, 2024
089d2d0
Refactor ropt code
verveerpj Sep 6, 2024
bc04c25
Add snapshot test
frode-aarstad Sep 5, 2024
77dfe8a
Remove _0 from objective function names
Sep 9, 2024
47fcb80
Remove _0 from controls, input constraints, forward models
Sep 9, 2024
7e3460c
Remove report step from docs and examples
Sep 9, 2024
14819ee
Update controls for math multiobj (ref @verveerpj)
Sep 3, 2024
eee3b58
Rename rf_0 to rf
larsevj Sep 10, 2024
fd0bf63
Remove remnants of _0 from docs and comments
larsevj Sep 10, 2024
3385a33
Pin ert
frode-aarstad Sep 11, 2024
e1e698f
Change tmp dir for egg snapshot test
frode-aarstad Sep 10, 2024
52407b6
Update tests/test_egg_simulation.py
frode-aarstad Sep 11, 2024
7f3339d
Add monkeypatch
frode-aarstad Sep 11, 2024
871100c
Fix egg snapshot test
frode-aarstad Sep 11, 2024
c98b767
Set ert to >= 11.0.0b1
Sep 11, 2024
bc1870a
Apply autostyling test_egg_simulation.py
Sep 11, 2024
d0a264f
Update snapshot
frode-aarstad Sep 11, 2024
5078234
Move tests to everest sub folder
oyvindeide Sep 9, 2024
e551118
Use ruff instead of pylint
oyvindeide Sep 10, 2024
bae7a53
Fix pylint: F841
oyvindeide Sep 10, 2024
935a8f6
Fix pylint: PLR6104
oyvindeide Sep 10, 2024
d4ecf86
Fix pylint: PLC1901
oyvindeide Sep 10, 2024
21807b3
Fix pylint: PLW1514
oyvindeide Sep 10, 2024
cbb4fcb
Ignore ruff rules
oyvindeide Sep 10, 2024
9a87146
Fix ruff: SIM115
oyvindeide Sep 10, 2024
5e7630f
Fix ruff: PLC0206
oyvindeide Sep 10, 2024
f27bc4e
Fix ruff: PLC0206
oyvindeide Sep 10, 2024
611dceb
Replace capture_logger with caplog
oyvindeide Sep 12, 2024
7698f6c
Preserve config order when using branch entry
DanSava Sep 10, 2024
ae596bf
Rename docs folder
oyvindeide Sep 16, 2024
321ce26
Simplify everserver setup
oyvindeide Sep 13, 2024
821bf70
Move ert docs into subfolder
oyvindeide Sep 17, 2024
06f4c18
Merge Everest into ert
oyvindeide Sep 17, 2024
955c3ad
Fix docs entry point
oyvindeide Sep 18, 2024
2f4c464
Update version check
oyvindeide Sep 17, 2024
3c38d46
Run ert style on Everest
oyvindeide Sep 17, 2024
0a6db89
Run ert typing on everest
oyvindeide Sep 18, 2024
31ecc09
Compresss ecl-files
oyvindeide Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:

- name: Install ert
run: |
uv pip install ".[dev]"
uv pip install ".[dev, everest]"

- name: Make test directory
run: |
Expand All @@ -136,7 +136,7 @@ jobs:

- name: Test docs
run: |
sphinx-build -n -v -E -W ./docs ./tmp/ert_docs
sphinx-build -n -v -E -W ./docs/ert ./tmp/ert_docs
oyvindeide marked this conversation as resolved.
Show resolved Hide resolved

publish:
name: Publish to PyPI
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_ert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Install ert
run: |
uv pip install ".[dev]"
uv pip install ".[dev, everest]"

- name: GUI Test
if: inputs.test-type == 'gui-tests'
Expand All @@ -56,7 +56,7 @@ jobs:
if: inputs.test-type == 'unit-tests'
run: |
pytest --cov=ert --cov-report=xml:cov1.xml --junit-xml=junit.xml -n logical --show-capture=stderr -v --benchmark-disable --dist loadgroup tests/unit_tests
pytest --doctest-modules --cov=ert --cov-report=xml:cov2.xml src/ --ignore src/ert/dark_storage
pytest --doctest-modules --cov=ert --cov-report=xml:cov2.xml src/ --ignore src/ert/dark_storage --ignore src/ieverest

- name: Performance Test
if: inputs.test-type == 'performance-tests'
Expand Down
79 changes: 49 additions & 30 deletions .github/workflows/test_everest.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,76 @@
name: Test everest
name: everest-run-tests-build-docs

# This job checks whether current main of everest
# is compatible with the changes. It is not required to pass
# before merging, but breakage should be followed by fix in everest
# after merge.

on: [pull_request]

env:
UV_SYSTEM_PYTHON: 1
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
tags: "*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
NO_PROJECT_RES: 1

jobs:
test-everest:
name: Test everest
timeout-minutes: 40
runs-on: ubuntu-latest
tests:
name: "py_${{ matrix.python-version }}_${{ matrix.test_type }}"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ['3.12']
python-version: ['3.8', '3.11', '3.12']
os: [ubuntu-22.04]
test_type: ['doc', 'ui-test', 'test', 'integration-test', 'everest-models-test']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install uv
run: pip install uv
- name: Install Everest and dependencies
run: |
pip install ".[dev,everest]"

- name: Install ert
- name: Run Tests
if: matrix.test_type == 'test'
run: |
uv pip install .
pytest tests/everest -n 4 -m "not ui_test and not integration_test" --dist loadgroup -sv

- name: Install everest and dependencies
- name: Run Integration Tests
if: matrix.test_type == 'integration-test'
run: |
git clone https://github.com/equinor/everest.git
uv pip install git+https://github.com/equinor/everest-models.git
pytest tests -n 4 -m "integration_test" --dist loadgroup

- name: Test everest
- name: Run UI Tests
if: matrix.test_type == 'ui-test'
env:
QT_QPA_PLATFORM: 'minimal'
NO_PROJECT_RES: 1
run: |
pushd everest
uv pip install ".[test]"
python -m pytest tests/everest -m "ui_test"

- name: Build Documentation
if: matrix.test_type == 'doc'
run: |
pip install git+https://github.com/equinor/everest-models.git
mkdir tmp
sphinx-build -n -v -E -W ./docs/everest ./tmp/everest_docs

pytest tests -n 4 --dist loadgroup -m "not ui_test"
pytest tests -m "ui_test"
- name: Run tests requiring everest-models
if: matrix.test_type == 'everest-models-test'
run: |
pip install git+https://github.com/equinor/everest-models.git
python -m pytest tests -n 4 -m everest_models_test --dist loadgroup

- name: Test docs entry point
if: matrix.test_type == 'everest-docs-entry-test'
run: |
python -m everest.docs
79 changes: 79 additions & 0 deletions .github/workflows/test_everest_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: everest-macos-run-tests-build-docs

on:
pull_request:
workflow_dispatch:
push:
branches:
- main
tags: "*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
NO_PROJECT_RES: 1

jobs:
tests:
if: github.ref_type == 'tag' # only build for mac when tags
name: "py-${{ matrix.python-version }}_${{ matrix.test_type }}_${{ matrix.os }}"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
os: ['macos-13', 'macos-14', 'macos-14-large']
# https://github.com/actions/runner-images/tree/main?tab=readme-ov-file#available-images
exclude:
- os: 'macos-14'
python-version: '3.8'
- os: 'macos-14-large'
python-version: '3.8'
- os: 'macos-13'
python-version: '3.12'

test_type: ['doc', 'test', 'integration-test', 'everest-models-test']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
pyproject.toml

- name: Install HDF5 source files
run: brew install hdf5

- name: Install Everest and dependencies
run: |
pip install .[dev, everest]

- name: Run Tests
if: matrix.test_type == 'test'
run: |
python -m pytest tests/everest -n 4 -m "not ui_test and not integration_test and not fails_on_macos_github_workflow" --dist loadgroup

- name: Run Integration Tests
if: matrix.test_type == 'integration-test'
run: |
python -m pytest tests/everest -n 4 -m "integration_test and not fails_on_macos_github_workflow" --dist loadgroup

- name: Build Documentation
if: matrix.test_type == 'doc'
run: |
pip install git+https://github.com/equinor/everest-models.git
mkdir tmp
sphinx-build -n -v -E -W ./docs/everest ./tmp/everest_docs

- name: Run tests requiring everest-models
if: matrix.test_type == 'everest-models-test'
run: |
pip install git+https://github.com/equinor/everest-models.git
python -m pytest tests/everest -n 4 -m everest_models_test --dist loadgroup
8 changes: 6 additions & 2 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ jobs:

- name: Install ERT and dependencies
run: |
uv pip install ".[dev, types]"
uv pip install ".[dev, types, everest]"

- run: echo ::add-matcher::.github/mypy-matcher.json
- name: Run mypy
- name: Run mypy ert
run: |
mypy src/ert

- name: Run mypy everest
run: |
mypy src/everest
39 changes: 39 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,42 @@ ignore_missing_imports = True

[mypy-seaborn.*]
ignore_missing_imports = True

[mypy-opm.*]
ignore_missing_imports = True

[mypy-colorama.*]
ignore_missing_imports = True

[mypy-ruamel.*]
ignore_missing_imports = True

[mypy-resdata.*]
ignore_missing_imports = True
disable_error_code = import-untyped

[mypy-everest.*]
disable_error_code = dict-item,
no-untyped-def,
call-overload,
union-attr,
no-untyped-call,
var-annotated,
index,
call-arg,
unused-ignore,
arg-type,
type-arg,
type-var,
assignment,
typeddict-item,
attr-defined,
comparison-overlap,
return-value,
name-defined

[mypy-tests.*]
disable_error_code = no-untyped-def, no-untyped-call, typeddict-item, assignment

[mypy-ieverest.*]
ignore_errors = True
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ repos:
- id: no-commit-to-branch
- id: check-json
- id: check-yaml
exclude: tests/everest/test_data/valid_config_file/invalid_yaml_config.yml # Invalid yml needed for testing
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: test-data/eclipse/parse/ERROR.PRT # exact format is needed for testing
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ $ ert --help

For examples and help with configuration, see the [ert Documentation](https://ert.readthedocs.io/en/latest/getting_started/configuration/poly_new/guide.html#configuration-guide).

# Everest™

The primary goal of the Everest tool is to find *optimal* well
planning and production strategies by utilizing an ensemble of
reservoir models (e.g., an ensemble of geologically-consistent models).
This will enable robust decisions about drilling schedule and well
placement, in order to achieve results of significant practical value.

```bash
pip install . "[everest]"
```

## Developing

To start developing the Python code, we suggest installing ert in editable mode
Expand All @@ -49,7 +61,7 @@ pip install --upgrade pip wheel setuptools
# Download and install ert
git clone https://github.com/equinor/ert
cd ert
pip install --editable ".[dev]"
pip install --editable ".[dev, everest]"
```

### Test setup
Expand Down Expand Up @@ -93,7 +105,7 @@ git submodule foreach "git lfs pull"
You can build the documentation after installation by running
```bash
pip install ".[dev]"
sphinx-build -n -v -E -W ./docs ./tmp/ert_docs
sphinx-build -n -v -E -W ./docs/ert ./tmp/ert_docs
```
and then open the generated `./tmp/ert_docs/index.html` in a browser.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion docs/conf.py → docs/ert/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import sys
from importlib import metadata

sys.path.append(os.path.abspath("./_ext"))
sys.path.append(os.path.abspath("_ext"))

# -- Project information -----------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The configuration file needed to use the ``installable_workflow_jobs`` hook must
and specify its arguments.
The built-in internal ``CSV_EXPORT`` workflow job is shown as an example:

.. literalinclude:: ../../../src/ert/resources/workflows/jobs/internal-gui/config/CSV_EXPORT
.. literalinclude:: ../../../../src/ert/resources/workflows/jobs/internal-gui/config/CSV_EXPORT

Implement the hook specification as follows to register the workflow job ``CSV_EXPORT``:

Expand All @@ -150,7 +150,7 @@ Implement the hook specification as follows to register the workflow job ``CSV_E
The second approach does not require creating a workflow job configuration file up-front,
and allows adding documentation.

.. literalinclude:: ../../../src/ert/plugins/hook_specifications/jobs.py
.. literalinclude:: ../../../../src/ert/plugins/hook_specifications/jobs.py
:pyobject: legacy_ertscript_workflow

Minimal example:
Expand Down
File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion docs/index.rst → docs/ert/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. image:: ../src/ert/gui/resources/gui/img/ert_icon.svg
.. image:: ../../src/ert/gui/resources/gui/img/ert_icon.svg
:align: center
:scale: 50%

Expand Down
File renamed without changes.
File renamed without changes.
Loading
Loading