-
Notifications
You must be signed in to change notification settings - Fork 15
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
CLN: Use AllowedContent to deduce if field is composite #477
CLN: Use AllowedContent to deduce if field is composite #477
Conversation
|
||
# This setting sets the FMU context for the output. If detected as a non-fmu run, | ||
# the code will internally set actual_context=None | ||
ALLOWED_FMU_CONTEXTS: Final = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsued(?)
CONTENTS_REQUIRED: Final = { | ||
"fluid_contact": {"contact": True}, | ||
"field_outline": {"contact": False}, | ||
"field_region": {"id": True}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor bug discovered, the fields property and seismic should have been a part of this. (Confirmed with @jcrivenaes )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug, but will keep it as is for now. A FutureWarning has been added.
src/fmu/dataio/_definitions.py
Outdated
SCHEMA: Final = ( | ||
"https://main-fmu-schemas-prod.radix.equinor.com/schemas/0.8.0/fmu_results.json" | ||
) | ||
VERSION: Final = "0.8.0" | ||
SOURCE: Final = "fmu" | ||
|
||
|
||
class ValidationError(ValueError, KeyError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad merge? ValidationError
is defined in two places.
@@ -71,3 +71,39 @@ class AllowedContent(BaseModel): | |||
relperm: None = Field(default=None) | |||
lift_curves: None = Field(default=None) | |||
transmissibilities: None = Field(default=None) | |||
|
|||
@staticmethod | |||
def requires_additional_input(field: str) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can go away once we make a switch "further up", cheep workaround for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the tests, I think we should be nicely covered. See the general UX comment regarding the warning texts, which should be more tailored towards those who needs to read and understand them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🤷♂️
Followup: #474