-
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
FIX: Allow user input on vertical_domain #733
Conversation
@@ -290,8 +294,10 @@ class ExportData: | |||
[[20200101, "monitor"], [20180101, "base"]] or just [[2021010]]. The output | |||
to metadata will from version 0.9 be different (API change) | |||
|
|||
vertical_domain: This is dictionary with a key and a reference e.g. | |||
{"depth": "msl"} which is default if missing. | |||
vertical_domain: Optional. String with vertical domain either "time" or "depth". |
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.
I see we use "Optional ", "Optional. ", and "Optional, " to indicate optionality. It's not relevant to this PR, just an observation, but maybe we should align all of these to one if it's reasonable to do so.
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.
yes, I agree the entire argument documentation should have a go through
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.
Nice work 👍 a few uniformity nits but not important ones
metadata["vertical_domain"] = self.dataio.vertical_domain | ||
metadata["domain_reference"] = self.dataio.domain_reference |
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.
Much nicer 😄
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.
datum
could possibly also be used. Is it a risk that we will have different (whitelisted) allowed domain_references for each content? E.g. "rkb" would make sense for "content: wellpath", but not for "content: field_outline". Would this be messy? (Perhaps that was the reasoning behind the dict input 🤷♂️)
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.
Different topic, but this is also an example of how the data model struggle to scale beyond data objects containing a single dataset. E.g. for a depth surface, this is fine. But for a table containing different things which have different references, it doesn't work. (Same as with "unit".)
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.
Different topic, but this is also an example of how the data model struggle to scale beyond data objects containing a single dataset. E.g. for a depth surface, this is fine. But for a table containing different things which have different references, it doesn't work. (Same as with "unit".)
I think we have to live with that. I think the only way to mitigate that may be something like domain_reference="multiple" og "n/a" at top level, and then give spesific data per "sub-type" (like columns in a table).
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.
datum
could possibly also be used. Is it a risk that we will have different (whitelisted) allowed domain_references for each content? E.g. "rkb" would make sense for "content: wellpath", but not for "content: field_outline". Would this be messy? (Perhaps that was the reasoning behind the dict input 🤷♂️)
Would data like "field-outline" actually need a domain reference? Since the data itself is "2D" (bird view)
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.
I don't think the dict input would help in the matter of contents having different allowed references.. it was just a way of setting the vertical_domain together with the reference.
And at the moment I find it difficult to put any logic on the content 🤔 .. some of the contents are quite clear and should be obvious what data it is providing, but many of our contents are general and can be attached to various data... My hope is that much of this gets clearer once we start focusing on 'products' 🤞
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.
I think is good to go. It is now more scalable for "unknown" future needs; e.g. a domain reference for land-based seismics may be something else than we have currently, but we can easily extend the list.
5be796e
to
c32b1c3
Compare
PR that closes #624.
Main problems were:
vertical_domain
were hardcoded to{"depth": "msl"}
where the dict value was thedepth_reference
depth_reference
was previously only possible to input forcontent="depth"
(according to the schema)I have been very much back and forth on how to best solve this one. But after discussions with @jcrivenaes we landed on adding a new general
domain_reference
argument inExportData
and as field in the schema as the best solution. This will be applicable both for time/depth domains.Other changes
depth_reference
argument inExportData
vertical_domain
as string ("time" or "depth") and deprecate dictionary inputvertical_domain
according to thecontent
ifcontent
isdepth/time
,