-
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: Add dataclass DerivedNamedStratigraphy #468
CLN: Add dataclass DerivedNamedStratigraphy #468
Conversation
def __post_init__(self) -> None: | ||
logger.info("Ran __post_init__") |
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.
Seems unnecessary to me.
if not no_start_or_missing_name and rv.name != "name": | ||
rv.alias.append(name) |
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.
Can be moved inside the above function block by usage of walrus op. But gets unreadable.
metadata: dict = field(default_factory=dict) | ||
name: str = field(default="") | ||
specs: dict = field(default_factory=dict) | ||
subtype: str = field(default="") |
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.
subtype...?
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 PR is split out off #469 looks like i missed this one. Typically we get something like below. But for now, it seems like it not used/propagated.
DerivedObjectDescriptor(
subtype="CPGridProperty",
classname="cpgrid_property",
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.
As I read it, should be 1:1 with existing functionality for doing lookup in the stratigraphic column and replacing given name with derived actual name.
Correct, there should be no new logical changes here. Expect for that we now use a dataclass insted of a dict to communicate between functions/classes. |
Adressess: #457