Skip to content

Commit bf8da41

Browse files
authored
feat(breadbox): Added new fields to dataset for use in filtering/selection (#123)
* Added new fields to dataset for use in filtering/selection Specifically added: - short_name - version - description * updated client * fixed pyright errors
1 parent f0d3141 commit bf8da41

19 files changed

+719
-10
lines changed

breadbox-client/breadbox_client/models/matrix_dataset_params.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ class MatrixDatasetParams:
3939
either be 'csv' or 'parquet' Default: MatrixDatasetParamsDataFileFormat.CSV.
4040
dataset_metadata (Union['MatrixDatasetParamsDatasetMetadataType0', None, Unset]): Contains a dictionary of
4141
additional dataset values that are not already provided above.
42+
description (Union[None, Unset, str]): an optional long description of the dataset
4243
feature_type (Union[None, Unset, str]): Type of features your dataset contains
4344
given_id (Union[None, Unset, str]): Stable human-readable identifier that the portal uses to look up specific
4445
datasets.
4546
is_transient (Union[Unset, bool]): Transient datasets can be deleted - should only be set to true for non-public
4647
short-term-use datasets like custom analysis results. Default: False.
4748
priority (Union[None, Unset, int]): Numeric value assigned to the dataset with `1` being highest priority within
4849
the `data_type`, used for displaying order of datasets to show for a specific `data_type` in UI.
50+
short_name (Union[None, Unset, str]): an optional short label describing dataset
4951
taiga_id (Union[None, Unset, str]): Taiga ID the dataset is sourced from.
52+
version (Union[None, Unset, str]): an optional short version identifier
5053
"""
5154

5255
data_type: str
@@ -65,11 +68,14 @@ class MatrixDatasetParams:
6568
dataset_metadata: Union["MatrixDatasetParamsDatasetMetadataType0", None, Unset] = (
6669
UNSET
6770
)
71+
description: Union[None, Unset, str] = UNSET
6872
feature_type: Union[None, Unset, str] = UNSET
6973
given_id: Union[None, Unset, str] = UNSET
7074
is_transient: Union[Unset, bool] = False
7175
priority: Union[None, Unset, int] = UNSET
76+
short_name: Union[None, Unset, str] = UNSET
7277
taiga_id: Union[None, Unset, str] = UNSET
78+
version: Union[None, Unset, str] = UNSET
7379
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
7480

7581
def to_dict(self) -> Dict[str, Any]:
@@ -116,6 +122,12 @@ def to_dict(self) -> Dict[str, Any]:
116122
else:
117123
dataset_metadata = self.dataset_metadata
118124

125+
description: Union[None, Unset, str]
126+
if isinstance(self.description, Unset):
127+
description = UNSET
128+
else:
129+
description = self.description
130+
119131
feature_type: Union[None, Unset, str]
120132
if isinstance(self.feature_type, Unset):
121133
feature_type = UNSET
@@ -136,12 +148,24 @@ def to_dict(self) -> Dict[str, Any]:
136148
else:
137149
priority = self.priority
138150

151+
short_name: Union[None, Unset, str]
152+
if isinstance(self.short_name, Unset):
153+
short_name = UNSET
154+
else:
155+
short_name = self.short_name
156+
139157
taiga_id: Union[None, Unset, str]
140158
if isinstance(self.taiga_id, Unset):
141159
taiga_id = UNSET
142160
else:
143161
taiga_id = self.taiga_id
144162

163+
version: Union[None, Unset, str]
164+
if isinstance(self.version, Unset):
165+
version = UNSET
166+
else:
167+
version = self.version
168+
145169
field_dict: Dict[str, Any] = {}
146170
field_dict.update(self.additional_properties)
147171
field_dict.update(
@@ -163,6 +187,8 @@ def to_dict(self) -> Dict[str, Any]:
163187
field_dict["data_file_format"] = data_file_format
164188
if dataset_metadata is not UNSET:
165189
field_dict["dataset_metadata"] = dataset_metadata
190+
if description is not UNSET:
191+
field_dict["description"] = description
166192
if feature_type is not UNSET:
167193
field_dict["feature_type"] = feature_type
168194
if given_id is not UNSET:
@@ -171,8 +197,12 @@ def to_dict(self) -> Dict[str, Any]:
171197
field_dict["is_transient"] = is_transient
172198
if priority is not UNSET:
173199
field_dict["priority"] = priority
200+
if short_name is not UNSET:
201+
field_dict["short_name"] = short_name
174202
if taiga_id is not UNSET:
175203
field_dict["taiga_id"] = taiga_id
204+
if version is not UNSET:
205+
field_dict["version"] = version
176206

177207
return field_dict
178208

@@ -248,6 +278,15 @@ def _parse_dataset_metadata(
248278

249279
dataset_metadata = _parse_dataset_metadata(d.pop("dataset_metadata", UNSET))
250280

281+
def _parse_description(data: object) -> Union[None, Unset, str]:
282+
if data is None:
283+
return data
284+
if isinstance(data, Unset):
285+
return data
286+
return cast(Union[None, Unset, str], data)
287+
288+
description = _parse_description(d.pop("description", UNSET))
289+
251290
def _parse_feature_type(data: object) -> Union[None, Unset, str]:
252291
if data is None:
253292
return data
@@ -277,6 +316,15 @@ def _parse_priority(data: object) -> Union[None, Unset, int]:
277316

278317
priority = _parse_priority(d.pop("priority", UNSET))
279318

319+
def _parse_short_name(data: object) -> Union[None, Unset, str]:
320+
if data is None:
321+
return data
322+
if isinstance(data, Unset):
323+
return data
324+
return cast(Union[None, Unset, str], data)
325+
326+
short_name = _parse_short_name(d.pop("short_name", UNSET))
327+
280328
def _parse_taiga_id(data: object) -> Union[None, Unset, str]:
281329
if data is None:
282330
return data
@@ -286,6 +334,15 @@ def _parse_taiga_id(data: object) -> Union[None, Unset, str]:
286334

287335
taiga_id = _parse_taiga_id(d.pop("taiga_id", UNSET))
288336

337+
def _parse_version(data: object) -> Union[None, Unset, str]:
338+
if data is None:
339+
return data
340+
if isinstance(data, Unset):
341+
return data
342+
return cast(Union[None, Unset, str], data)
343+
344+
version = _parse_version(d.pop("version", UNSET))
345+
289346
matrix_dataset_params = cls(
290347
data_type=data_type,
291348
dataset_md5=dataset_md5,
@@ -299,11 +356,14 @@ def _parse_taiga_id(data: object) -> Union[None, Unset, str]:
299356
allowed_values=allowed_values,
300357
data_file_format=data_file_format,
301358
dataset_metadata=dataset_metadata,
359+
description=description,
302360
feature_type=feature_type,
303361
given_id=given_id,
304362
is_transient=is_transient,
305363
priority=priority,
364+
short_name=short_name,
306365
taiga_id=taiga_id,
366+
version=version,
307367
)
308368

309369
matrix_dataset_params.additional_properties = d

breadbox-client/breadbox_client/models/matrix_dataset_response.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ class MatrixDatasetResponse:
4242
units (str):
4343
value_type (ValueType):
4444
dataset_md5 (Union[None, Unset, str]):
45+
description (Union[None, Unset, str]): an optional long description of the dataset
4546
format_ (Union[Unset, MatrixDatasetResponseFormat]): Default: MatrixDatasetResponseFormat.MATRIX_DATASET.
4647
given_id (Union[None, Unset, str]):
4748
is_transient (Union[Unset, bool]): Default: False.
4849
priority (Union[None, Unset, int]):
50+
short_name (Union[None, Unset, str]): an optional short label describing dataset
4951
taiga_id (Union[None, Unset, str]):
52+
version (Union[None, Unset, str]): an optional short version identifier
5053
"""
5154

5255
allowed_values: Union[List[str], None]
@@ -61,13 +64,16 @@ class MatrixDatasetResponse:
6164
units: str
6265
value_type: ValueType
6366
dataset_md5: Union[None, Unset, str] = UNSET
67+
description: Union[None, Unset, str] = UNSET
6468
format_: Union[Unset, MatrixDatasetResponseFormat] = (
6569
MatrixDatasetResponseFormat.MATRIX_DATASET
6670
)
6771
given_id: Union[None, Unset, str] = UNSET
6872
is_transient: Union[Unset, bool] = False
6973
priority: Union[None, Unset, int] = UNSET
74+
short_name: Union[None, Unset, str] = UNSET
7075
taiga_id: Union[None, Unset, str] = UNSET
76+
version: Union[None, Unset, str] = UNSET
7177
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
7278

7379
def to_dict(self) -> Dict[str, Any]:
@@ -113,6 +119,12 @@ def to_dict(self) -> Dict[str, Any]:
113119
else:
114120
dataset_md5 = self.dataset_md5
115121

122+
description: Union[None, Unset, str]
123+
if isinstance(self.description, Unset):
124+
description = UNSET
125+
else:
126+
description = self.description
127+
116128
format_: Union[Unset, str] = UNSET
117129
if not isinstance(self.format_, Unset):
118130
format_ = self.format_.value
@@ -131,12 +143,24 @@ def to_dict(self) -> Dict[str, Any]:
131143
else:
132144
priority = self.priority
133145

146+
short_name: Union[None, Unset, str]
147+
if isinstance(self.short_name, Unset):
148+
short_name = UNSET
149+
else:
150+
short_name = self.short_name
151+
134152
taiga_id: Union[None, Unset, str]
135153
if isinstance(self.taiga_id, Unset):
136154
taiga_id = UNSET
137155
else:
138156
taiga_id = self.taiga_id
139157

158+
version: Union[None, Unset, str]
159+
if isinstance(self.version, Unset):
160+
version = UNSET
161+
else:
162+
version = self.version
163+
140164
field_dict: Dict[str, Any] = {}
141165
field_dict.update(self.additional_properties)
142166
field_dict.update(
@@ -156,6 +180,8 @@ def to_dict(self) -> Dict[str, Any]:
156180
)
157181
if dataset_md5 is not UNSET:
158182
field_dict["dataset_md5"] = dataset_md5
183+
if description is not UNSET:
184+
field_dict["description"] = description
159185
if format_ is not UNSET:
160186
field_dict["format"] = format_
161187
if given_id is not UNSET:
@@ -164,8 +190,12 @@ def to_dict(self) -> Dict[str, Any]:
164190
field_dict["is_transient"] = is_transient
165191
if priority is not UNSET:
166192
field_dict["priority"] = priority
193+
if short_name is not UNSET:
194+
field_dict["short_name"] = short_name
167195
if taiga_id is not UNSET:
168196
field_dict["taiga_id"] = taiga_id
197+
if version is not UNSET:
198+
field_dict["version"] = version
169199

170200
return field_dict
171201

@@ -244,6 +274,15 @@ def _parse_dataset_md5(data: object) -> Union[None, Unset, str]:
244274

245275
dataset_md5 = _parse_dataset_md5(d.pop("dataset_md5", UNSET))
246276

277+
def _parse_description(data: object) -> Union[None, Unset, str]:
278+
if data is None:
279+
return data
280+
if isinstance(data, Unset):
281+
return data
282+
return cast(Union[None, Unset, str], data)
283+
284+
description = _parse_description(d.pop("description", UNSET))
285+
247286
_format_ = d.pop("format", UNSET)
248287
format_: Union[Unset, MatrixDatasetResponseFormat]
249288
if isinstance(_format_, Unset):
@@ -271,6 +310,15 @@ def _parse_priority(data: object) -> Union[None, Unset, int]:
271310

272311
priority = _parse_priority(d.pop("priority", UNSET))
273312

313+
def _parse_short_name(data: object) -> Union[None, Unset, str]:
314+
if data is None:
315+
return data
316+
if isinstance(data, Unset):
317+
return data
318+
return cast(Union[None, Unset, str], data)
319+
320+
short_name = _parse_short_name(d.pop("short_name", UNSET))
321+
274322
def _parse_taiga_id(data: object) -> Union[None, Unset, str]:
275323
if data is None:
276324
return data
@@ -280,6 +328,15 @@ def _parse_taiga_id(data: object) -> Union[None, Unset, str]:
280328

281329
taiga_id = _parse_taiga_id(d.pop("taiga_id", UNSET))
282330

331+
def _parse_version(data: object) -> Union[None, Unset, str]:
332+
if data is None:
333+
return data
334+
if isinstance(data, Unset):
335+
return data
336+
return cast(Union[None, Unset, str], data)
337+
338+
version = _parse_version(d.pop("version", UNSET))
339+
283340
matrix_dataset_response = cls(
284341
allowed_values=allowed_values,
285342
data_type=data_type,
@@ -293,11 +350,14 @@ def _parse_taiga_id(data: object) -> Union[None, Unset, str]:
293350
units=units,
294351
value_type=value_type,
295352
dataset_md5=dataset_md5,
353+
description=description,
296354
format_=format_,
297355
given_id=given_id,
298356
is_transient=is_transient,
299357
priority=priority,
358+
short_name=short_name,
300359
taiga_id=taiga_id,
360+
version=version,
301361
)
302362

303363
matrix_dataset_response.additional_properties = d

0 commit comments

Comments
 (0)