Skip to content

Conversation

@kkim-labelbox
Copy link
Contributor

…aFields

  • Add new field 'metadata' for data_row, which represents the serialized metadata fields off of a data row
  • 'metadata' uses customMetadata resolver to retrieve a flattened view of metadata, and uses mdo.parse_metadata_fields to convert the dict --> DataRowMetadataField format
  • Added test cases for them

@kkim-labelbox kkim-labelbox requested a review from msokoloff1 June 14, 2022 23:29
elif isinstance(field.field_type, Field.EnumType):
value = field.field_type.enum_cls(value)
elif isinstance(field.field_type,
Field.ListType) and field.name == "metadata":
Copy link
Contributor

Choose a reason for hiding this comment

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

I would check the list type of the field instead of the field name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my first version, but was getting a circular import issue when importing DataRowMetadataField :(
Let me look for a way to resolve the circular import, and if not, I could compare the list type against the "DataRowMetadataField" string

@msokoloff1
Copy link
Contributor

Just one small nit. Otherwise looks good. I hate having to support metadataFields but I don't think that there is a better option.

@msokoloff1 msokoloff1 self-requested a review June 15, 2022 18:04
Copy link
Contributor

@msokoloff1 msokoloff1 left a comment

Choose a reason for hiding this comment

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

🚢

@kkim-labelbox kkim-labelbox merged commit 2b47469 into develop Jun 15, 2022
@jtsodapop jtsodapop deleted the kkim/AL-2619 branch September 14, 2022 15:53
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