Skip to content

Commit

Permalink
chore!: remove type in dataset (#405)
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <[email protected]>
  • Loading branch information
ThibaultFy authored Mar 25, 2024
1 parent 88854ac commit 3fb14fe
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 8 deletions.
Empty file added changes/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions changes/405.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- BREAKING: Remove `type` from `DatasetSpec` ([#405](https://github.com/Substra/substra/pull/405))
1 change: 0 additions & 1 deletion references/sdk_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Dataset asset
- name: <class 'str'>
- owner: <class 'str'>
- permissions: <class 'substra.sdk.models.Permissions'>
- type: <class 'str'>
- data_sample_keys: typing.List[str]
- opener: <class 'substra.sdk.models._File'>
- description: <class 'substra.sdk.models._File'>
Expand Down
1 change: 0 additions & 1 deletion references/sdk_schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ note : metadata field does not accept strings containing '__' as dict key
```text
- name: <class 'str'>
- data_opener: <class 'pathlib.Path'>
- type: <class 'str'>
- description: <class 'pathlib.Path'>
- permissions: <class 'substra.sdk.schemas.Permissions'>
- metadata: typing.Optional[typing.Dict[str, str]]
Expand Down
1 change: 0 additions & 1 deletion substra/sdk/backends/local/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ def _add_dataset(self, key, spec, spec_options=None):
"authorized_ids": permissions.authorized_ids,
},
},
type=spec.type,
data_sample_keys=[],
opener={"checksum": fs.hash_file(dataset_file_path), "storage_address": dataset_file_path},
description={
Expand Down
1 change: 0 additions & 1 deletion substra/sdk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ class Dataset(_Model):
name: str
owner: str
permissions: Permissions
type: str
data_sample_keys: List[str] = []
opener: _File
description: _File
Expand Down
1 change: 0 additions & 1 deletion substra/sdk/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ class DatasetSpec(_Spec):

name: str
data_opener: pathlib.Path # Path to the data opener
type: str
description: pathlib.Path # Path to the description file
permissions: Permissions
metadata: Optional[Dict[str, str]] = None
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def dataset_query(tmpdir):
return {
"name": "dataset_name",
"data_opener": str(opener_path),
"type": "images",
"description": str(desc_path),
"permissions": {
"public": True,
Expand Down
1 change: 0 additions & 1 deletion tests/data_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ def create_dataset(self, permissions=None, metadata=None, py_script=None, logs_p
return substra.sdk.schemas.DatasetSpec(
name=name,
data_opener=str(opener_path),
type="Test",
metadata=metadata,
description=str(description_path),
permissions=permissions or DEFAULT_PERMISSIONS,
Expand Down
1 change: 0 additions & 1 deletion tests/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"process": {"public": True, "authorized_ids": ["MyOrg1MSP"]},
"download": {"public": True, "authorized_ids": ["MyOrg1MSP"]},
},
"type": "Test",
"data_sample_keys": [],
"metadata": {"foo": "bar"},
"opener": {
Expand Down

0 comments on commit 3fb14fe

Please sign in to comment.