Skip to content

Commit

Permalink
fix: Add description attribute to the from_proto method
Browse files Browse the repository at this point in the history
Signed-off-by: gbmarc1 <[email protected]>
  • Loading branch information
gbmarc1 authored and adchia committed Jan 30, 2023
1 parent 75829f0 commit 5cbfad0
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 5cbfad0

Please sign in to comment.