Skip to content

Commit

Permalink
Merge pull request #7761 from OpenMined/small_dataset_changes
Browse files Browse the repository at this point in the history
Small dataset changes
  • Loading branch information
koenvanderveen authored Jun 15, 2023
2 parents 27a2560 + cb53866 commit ba61316
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
21 changes: 9 additions & 12 deletions notebooks/api/0.8/00-load-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,13 @@
},
"outputs": [],
"source": [
"dataset.add_contributor(role=sy.roles.UPLOADER, \n",
" name=\"Andrew Trask\", \n",
" email=\"[email protected]\",\n",
" note=\"Andrew runs this domain and prepared the dataset metadata.\")\n",
"dataset.add_contributor(name=\"Andrew Trask\", \n",
" email=\"[email protected]\",\n",
" note=\"Andrew runs this domain and prepared the dataset metadata.\")\n",
"\n",
"dataset.add_contributor(role=sy.roles.EDITOR, \n",
" name=\"Madhava Jay\", \n",
" email=\"[email protected]\",\n",
" note=\"Madhava tweaked the description to add the URL because Andrew forgot.\")"
"dataset.add_contributor(name=\"Madhava Jay\", \n",
" email=\"[email protected]\",\n",
" note=\"Madhava tweaked the description to add the URL because Andrew forgot.\")"
]
},
{
Expand Down Expand Up @@ -390,10 +388,9 @@
},
"outputs": [],
"source": [
"ctf.add_contributor(role=sy.roles.UPLOADER, \n",
" name=\"Andrew Trask\", \n",
" email=\"[email protected]\",\n",
" note=\"Andrew runs this domain and prepared the asset.\")"
"ctf.add_contributor(name=\"Andrew Trask\", \n",
" email=\"[email protected]\",\n",
" note=\"Andrew runs this domain and prepared the asset.\")"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions packages/syft/src/syft/service/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Contributor(SyftObject):
__version__ = SYFT_OBJECT_VERSION_1

name: str
role: str
role: Optional[str]
email: str
phone: Optional[str]
note: Optional[str]
Expand Down Expand Up @@ -249,7 +249,7 @@ def add_contributor(
self,
name: str,
email: str,
role: Union[Enum, str],
role: Optional[Union[Enum, str]] = None,
phone: Optional[str] = None,
note: Optional[str] = None,
) -> None:
Expand Down Expand Up @@ -337,7 +337,7 @@ class Dataset(SyftObject):

__attr_searchable__ = ["name", "citation", "url", "description", "action_ids"]
__attr_unique__ = ["name"]
__attr_repr_cols__ = ["name", "url"]
__attr_repr_cols__ = ["name", "url", "created_at"]

def _repr_html_(self) -> Any:
uploaded_by_line = ""
Expand Down Expand Up @@ -486,7 +486,7 @@ def add_contributor(
self,
name: str,
email: str,
role: Union[Enum, str],
role: Optional[Union[Enum, str]] = None,
phone: Optional[str] = None,
note: Optional[str] = None,
) -> None:
Expand Down

0 comments on commit ba61316

Please sign in to comment.