Skip to content

Commit

Permalink
Tags default to empty Tuple (#616, one item)
Browse files Browse the repository at this point in the history
  • Loading branch information
ots22 committed Aug 25, 2023
1 parent ac9cc56 commit 4e23b6f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scivision/catalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ class CatalogModelEntry(BaseModel, extra="forbid", title="A model catalog entry"
description="A list of institutions that produced or are associated with "
"the model (one per item)",
)
tags: Tuple[str, ...]
tags: Tuple[str, ...] = Field(
(),
title="Tags",
description="A list of free-form labels to associate with a model",
)

def __getitem__(self, item):
return getattr(self, item)
Expand Down Expand Up @@ -130,7 +134,8 @@ class CatalogDatasourceEntry(
None,
title="Suitable tasks",
description="For which task or tasks is this datasource likely to be "
"suitable? (Select any number of the following items)",
"suitable? (Select any number of these -- try holding Ctrl or Option "
"to select more than one)",
)
labels_provided: bool = Field(
False,
Expand Down Expand Up @@ -167,7 +172,7 @@ class CatalogDatasourceEntry(
tags: Tuple[str, ...] = Field(
(),
title="Tags",
description="A list of free-form data to associate with the dataset",
description="A list of free-form labels to associate with a datasource",
)

def __getitem__(self, item):
Expand Down

0 comments on commit 4e23b6f

Please sign in to comment.