Skip to content

Commit

Permalink
Use ['public'] as the default value for visible_to
Browse files Browse the repository at this point in the history
  • Loading branch information
WardLT committed Sep 3, 2021
1 parent 37d3b0e commit 59e466b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dlhub_sdk/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DLHubMetadata(BaseModel):

version: str = Field(__version__, description="Version of the SDK used to create this object")
domains: List[str] = Field(default_factory=list, description="List of scientific domains that describe this object")
visible_to: List[str] = Field(default_factory=list,
visible_to: List[str] = Field(['public'],
description="List of groups or identities for which this object is visible")
name: Optional[str] = Field(None, description="Name of the object", regex=r'^\S+$')
files: Dict[str, Union[str, List[str]]] = Field(default_factory=dict,
Expand Down
6 changes: 6 additions & 0 deletions dlhub_sdk/models/tests/test_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from dlhub_sdk.models import BaseMetadataModel


def test_dlhub_block():
model = BaseMetadataModel()
assert model.dlhub.visible_to == ['public']

0 comments on commit 59e466b

Please sign in to comment.