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

Write eclbase to runpath_list if present #8525

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

eivindjahren
Copy link
Contributor

@eivindjahren eivindjahren commented Aug 20, 2024

Issue
Resolves #8522

  • 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 tests pass locally (after every commit!)

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

@eivindjahren eivindjahren added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Aug 20, 2024
Comment on lines 93 to 101
job_name_or_eclbase = self._substitution_list.substitute_real_iter(
self._jobname_format, realization, iteration
)
runpath = self._substitution_list.substitute_real_iter(
self._runpath_format, realization, iteration
)
if self._eclbase is not None:
job_name_or_eclbase = (
self._substitution_list.substitute_real_iter(
self._eclbase, realization, iteration
)
)

Copy link
Contributor

Choose a reason for hiding this comment

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

eclbase_or_job_name = self._eclbase if self._eclbase else self._jobname_format

job_name_or_eclbase = self._substitution_list.substitute_real_iter(
                       eclbase_or_job_name, realization, iteration
)

Alternatively something like this? Less code-dedup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did a similar thing

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.67%. Comparing base (02f996b) to head (7c9f32d).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8525      +/-   ##
==========================================
+ Coverage   90.63%   90.67%   +0.03%     
==========================================
  Files         342      342              
  Lines       20901    20943      +42     
==========================================
+ Hits        18944    18990      +46     
+ Misses       1957     1953       -4     
Flag Coverage Δ
gui-tests 75.83% <100.00%> (-0.04%) ⬇️
integration-tests 54.08% <100.00%> (+0.01%) ⬆️
unit-tests 68.78% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andreas-el andreas-el left a comment

Choose a reason for hiding this comment

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

Lovely! ❤️

@@ -143,6 +143,7 @@ def load_from_forward_model(
runpath_format=self.config.model_config.runpath_format_string,
filename=str(self.config.runpath_file),
substitution_list=self.config.substitution_list,
eclbase=self.config.ensemble_config.eclbase,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Before this eclbase is not actually used anywhere, do we need to start using it, or can we do this some other way? Remove it here: 75961dc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is necessary as jobname/=eclbase.

@oyvindeide
Copy link
Collaborator

Think we should also add some documentation about how this works

@eivindjahren
Copy link
Contributor Author

Think we should also add some documentation about how this works

Updated the docs.

@eivindjahren eivindjahren merged commit 9050ca5 into equinor:main Aug 21, 2024
35 checks passed
@eivindjahren eivindjahren deleted the fix_8522 branch August 21, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:bug-fix Automatically categorise as bug fix in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ECLBASE is just using basename in runpath file
4 participants