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

Make everest config imutable #9842

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DanSava
Copy link
Contributor

@DanSava DanSava commented Jan 22, 2025

Issue
Resolves #9788

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests tests/everest -n auto --hypothesis-profile=fast -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@DanSava DanSava self-assigned this Jan 22, 2025
Copy link

codspeed-hq bot commented Jan 22, 2025

CodSpeed Performance Report

Merging #9842 will not alter performance

Comparing DanSava:make-everest-config-imutable (b734a69) with main (b7aa307)

Summary

✅ 24 untouched benchmarks

@DanSava DanSava force-pushed the make-everest-config-imutable branch from 6db26e0 to 9bfd0a3 Compare January 22, 2025 14:53
@DanSava DanSava added release-notes:improvement Automatically categorise as improvement in release notes release-notes:refactor PR changes code without changing ANY (!) behavior. labels Jan 23, 2025
@DanSava DanSava force-pushed the make-everest-config-imutable branch from 211d755 to b13f034 Compare January 23, 2025 09:18
@DanSava DanSava force-pushed the make-everest-config-imutable branch from b13f034 to b734a69 Compare January 23, 2025 09:19
@@ -30,20 +30,22 @@
ProgressBar = None # type: ignore


def export_with_progress(config: EverestConfig, export_ecl=True):
def export_with_progress(
config: EverestConfig, export_config: ExportConfig, export_ecl=True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@@ -503,9 +502,15 @@ def test_complete_status_for_normal_run_monitor(
"everest.bin.everest_script.everserver_status",
return_value={"status": ServerStatus.never_run, "message": None},
)
@patch("everest.simulator.everest_to_ert._everest_to_ert_config_dict", return_value={"SUMMARY": "*"})
@patch(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff for this file in commit "Avoid everest export config overwriting" seems to be only an autoformatting + deletion of unused import?

initial_guess=0,
variables=[{"name": "x"}, {"name": "y"}],
)
config_dict = config.model_dump(exclude_none=True)
Copy link
Contributor

@yngve-sk yngve-sk Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick/style suggestion: Would do ** notation to declare the object in one go rather than assigning props to the dict, similar for other cases assigning stuff to the config dict

@yngve-sk
Copy link
Contributor

Overall looks good, only some minor comments on style/commit structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:improvement Automatically categorise as improvement in release notes release-notes:refactor PR changes code without changing ANY (!) behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make EverestConfig immutable
2 participants