Skip to content

Commit

Permalink
fix: Add description attribute to the Field.from_proto method (#3469)
Browse files Browse the repository at this point in the history
* fix: Add description attribute to the from_proto method

Signed-off-by: gbmarc1 <marcantoine.belanger@shopify.com>

* lint

Signed-off-by: Danny Chiao <danny@tecton.ai>

---------

Signed-off-by: gbmarc1 <marcantoine.belanger@shopify.com>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Co-authored-by: Danny Chiao <danny@tecton.ai>
  • Loading branch information
gbmarc1 and adchia authored Feb 3, 2023
1 parent d3b7c06 commit 473f8d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions sdk/python/feast/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def from_proto(cls, field_proto: FieldProto):
name=field_proto.name,
dtype=from_value_type(value_type=value_type),
tags=dict(field_proto.tags),
description=field_proto.description,
)

@classmethod
Expand Down
3 changes: 3 additions & 0 deletions sdk/python/tests/unit/test_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ def test_field_serialization_with_description():

assert serialized_field.description == expected_description
assert field_from_feature.description == expected_description

field = Field.from_proto(serialized_field)
assert field.description == expected_description

0 comments on commit 473f8d9

Please sign in to comment.