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

Enable filter on data.content. #310

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Enable filter on data.content. #310

merged 3 commits into from
Apr 10, 2024

Conversation

perolavsvendsen
Copy link
Member

@perolavsvendsen perolavsvendsen commented Mar 23, 2024

Issue

#249

Short description

data.content is a key metadata attribute. Unlike non-standard freetext attributes such as "tagname" and others which should never be used for logical operations, the data.content is standardized. Therefore, we want to promote usage of data.content as much as possible.

This PR should enable explorer to filter on data.content.

Pre-review checklist

  • Read through all changes. No redundant print() statements, commented-out code, or other remnants from the development. 👀
  • Make sure tests pass after every commit. ✅
  • New/refactored code is following same conventions as the rest of the code base. 🧬
  • New/refactored code is tested. ⚙
  • Documentation has been updated 🧾

Pre-merge checklist

  • Commit history is consistent and clean. 👌

@@ -23,6 +24,11 @@ def name(self) -> str:
"""Object name"""
return self._get_property(["data", "name"])

@property
Copy link
Member Author

Choose a reason for hiding this comment

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

Main change in this PR: Add content property to the child object.

@perolavsvendsen perolavsvendsen requested a review from a team March 23, 2024 18:16
rwiker
rwiker previously approved these changes Mar 25, 2024
Copy link
Contributor

@rwiker rwiker left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -243,7 +249,7 @@ The `SurfaceCollection.filter` method takes the following parameters:

* uuid
* name
* tagname
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intentional to remove tagname?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, intentional. It is a non-standardized freetext field, which will turn into a major problem down the road. So trying to nudge people away from using it. But it is there, so perhaps it should be in the docs. And it has to be there, because there is no uniqueness without it.

So perhaps this was a bad call 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

Put tagname back in

Copy link
Contributor

@equinor-ruaj equinor-ruaj left a comment

Choose a reason for hiding this comment

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

lgtm

@perolavsvendsen perolavsvendsen merged commit 467077e into main Apr 10, 2024
24 checks passed
@perolavsvendsen perolavsvendsen deleted the 249-filter-on-content branch April 10, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants