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

Remove or repurpose the type field in the controls section of the Everest configuration #9774

Open
verveerpj opened this issue Jan 16, 2025 · 1 comment · May be fixed by #9901
Open

Remove or repurpose the type field in the controls section of the Everest configuration #9774

verveerpj opened this issue Jan 16, 2025 · 1 comment · May be fixed by #9901

Comments

@verveerpj
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The type field in the controls section of the Everest configuration is not used and can be removed or re-purposed.

Describe the solution you'd like
We should investigate if this field is indeed not used for anything meaningful. We will likely find that this field is very often specified in existing configuration files, but not used in any way. Based on this information, we can decide if we want to remove it, or repurpose it within the context of this issue: #9537.

Describe alternatives you've considered
We could leave it as is, it would not affect functionality.

@verveerpj verveerpj added everest improvement Something nice to have, that will make life easier for developers or users or both. payback labels Jan 16, 2025
@verveerpj verveerpj added this to SCOUT Jan 16, 2025
@verveerpj verveerpj moved this to Todo in SCOUT Jan 16, 2025
@verveerpj verveerpj added configuration and removed payback improvement Something nice to have, that will make life easier for developers or users or both. labels Jan 16, 2025
@DanSava DanSava self-assigned this Jan 29, 2025
@DanSava DanSava moved this from Todo to In Progress in SCOUT Jan 29, 2025
@DanSava
Copy link
Contributor

DanSava commented Jan 29, 2025

The control type is being used for config validation

@model_validator(mode="after")
def validate_variable_name_match_well_name(self) -> Self: # pylint: disable=E0213
controls = self.controls
wells = self.wells
if controls is None or wells is None:
return self
well_names = [w.name for w in wells]
if not well_names:
return self
for c in controls:
if c.type == "generic_control":
continue
for v in c.variables:
if v.name not in well_names:
raise ValueError("Variable name does not match any well name")
return self

This can be updated such that either all variable variables match well names or none not sure if there is an edge case where we want some of the variable names in a control to match some of the names of the wells if the wells are present in the config.

@DanSava DanSava linked a pull request Jan 29, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants