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

DEP: Deprecate content as dict input, split in two arguments #1016

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

tnatt
Copy link
Collaborator

@tnatt tnatt commented Feb 19, 2025

PR to start deprecating content as a dictionary, and introduce a new content_metadata argument for the additional information.

Closes #1012
Closes #1005

@tnatt tnatt force-pushed the deprecate_content_as_dict branch 2 times, most recently from ff392e6 to 046460e Compare February 19, 2025 12:29
@tnatt tnatt marked this pull request as ready for review February 19, 2025 12:34
Copy link
Collaborator

@jcrivenaes jcrivenaes left a comment

Choose a reason for hiding this comment

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

Certainly a good step. LGTM

Copy link
Collaborator

@mferrera mferrera left a comment

Choose a reason for hiding this comment

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

Nice job

Comment on lines +530 to +531
def _get_content_enum(self) -> Optional[enums.Content]:
"""Get the content enum."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not relevant to your PR, but this is the sort of thing that, IMO, should be done as part the initializer after #914, and internal state just has the enum value

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

agree! there is a lot of here that can be taken away once we are done with the deprecation period 🎉 and also the issue you mention will be a step in the right direction! The code will be so much leaner, can't wait!

@tnatt tnatt force-pushed the deprecate_content_as_dict branch from 046460e to 78af9df Compare February 20, 2025 11:09
@tnatt tnatt merged commit 6c66f57 into equinor:main Feb 20, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants