Skip to content

Commit

Permalink
feat: update TermsMetadataProperty min values to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmbmb committed Sep 26, 2023
1 parent 820c49b commit 01de6d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/argilla/client/feedback/schemas/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from argilla.client.feedback.schemas.enums import MetadataPropertyTypes
from argilla.client.feedback.schemas.validators import validate_numeric_metadata_property_bounds

TERMS_METADATA_PROPERTY_MIN_VALUES = 2
TERMS_METADATA_PROPERTY_MIN_VALUES = 1


class MetadataPropertySchema(BaseModel, ABC):
Expand Down
7 changes: 1 addition & 6 deletions tests/unit/client/feedback/schemas/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,7 @@ def test_terms_metadata_property(schema_kwargs: Dict[str, Any], server_payload:
(
{"name": "terms-metadata-property", "values": []},
ValidationError,
"1 validation error for TermsMetadataProperty\nvalues\n ensure this value has at least 2 items",
),
(
{"name": "terms-metadata-property", "values": ["just-one"]},
ValidationError,
"1 validation error for TermsMetadataProperty\nvalues\n ensure this value has at least 2 items",
"1 validation error for TermsMetadataProperty\nvalues\n ensure this value has at least 1 items",
),
(
{"name": "terms-metadata-property", "values": ["a", "a"]},
Expand Down

0 comments on commit 01de6d9

Please sign in to comment.