Skip to content

Commit d788f3e

Browse files
06f368ef0f21066ebac11fd2390d8321e4c1ddfa
1 parent 28fe10f commit d788f3e

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

docs/AnalysisReturn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Name | Type | Description | Notes
2222
**entities** | [**List[Entity]**](Entity.md) | | [optional]
2323
**order** | **int** | | [optional]
2424
**metadata** | **object** | | [optional]
25+
**source_id** | **str** | ID of the analysis this one was cloned from, if any. | [optional] [readonly]
2526
**point_count** | **int** | Number of point coordinates linked to this analysis. | [optional]
2627
**has_coordinates** | **bool** | | [optional]
2728
**has_images** | **bool** | | [optional]

neurostore_sdk/models/analysis_return.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ class AnalysisReturn(BaseModel):
5050
entities: Optional[List[Entity]] = None
5151
order: Optional[StrictInt] = None
5252
metadata: Optional[Dict[str, Any]] = None
53+
source_id: Optional[StrictStr] = Field(default=None, description="ID of the analysis this one was cloned from, if any.")
5354
point_count: Optional[StrictInt] = Field(default=None, description="Number of point coordinates linked to this analysis.")
5455
has_coordinates: Optional[StrictBool] = None
5556
has_images: Optional[StrictBool] = None
5657
has_z_maps: Optional[StrictBool] = None
5758
has_t_maps: Optional[StrictBool] = None
5859
has_beta_and_variance_maps: Optional[StrictBool] = None
59-
__properties: ClassVar[List[str]] = ["name", "description", "weights", "created_at", "updated_at", "id", "public", "user", "username", "study", "images", "points", "conditions", "table_id", "entities", "order", "metadata", "point_count", "has_coordinates", "has_images", "has_z_maps", "has_t_maps", "has_beta_and_variance_maps"]
60+
__properties: ClassVar[List[str]] = ["name", "description", "weights", "created_at", "updated_at", "id", "public", "user", "username", "study", "images", "points", "conditions", "table_id", "entities", "order", "metadata", "source_id", "point_count", "has_coordinates", "has_images", "has_z_maps", "has_t_maps", "has_beta_and_variance_maps"]
6061

6162
model_config = ConfigDict(
6263
populate_by_name=True,
@@ -91,6 +92,7 @@ def to_dict(self) -> Dict[str, Any]:
9192
* OpenAPI `readOnly` fields are excluded.
9293
* OpenAPI `readOnly` fields are excluded.
9394
* OpenAPI `readOnly` fields are excluded.
95+
* OpenAPI `readOnly` fields are excluded.
9496
"""
9597
excluded_fields: Set[str] = set([])
9698

@@ -155,6 +157,11 @@ def to_dict(self) -> Dict[str, Any]:
155157
if self.metadata is None and "metadata" in self.model_fields_set:
156158
_dict['metadata'] = None
157159

160+
# set to None if source_id (nullable) is None
161+
# and model_fields_set contains the field
162+
if self.source_id is None and "source_id" in self.model_fields_set:
163+
_dict['source_id'] = None
164+
158165
# set to None if point_count (nullable) is None
159166
# and model_fields_set contains the field
160167
if self.point_count is None and "point_count" in self.model_fields_set:
@@ -189,6 +196,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
189196
"entities": [Entity.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None,
190197
"order": obj.get("order"),
191198
"metadata": obj.get("metadata"),
199+
"source_id": obj.get("source_id"),
192200
"point_count": obj.get("point_count"),
193201
"has_coordinates": obj.get("has_coordinates"),
194202
"has_images": obj.get("has_images"),

test/test_analysis_return.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def make_instance(self, include_optional) -> AnalysisReturn:
6060
],
6161
order = 56,
6262
metadata = neurostore_sdk.models.metadata.metadata(),
63+
source_id = '',
6364
point_count = 56,
6465
has_coordinates = True,
6566
has_images = True,

0 commit comments

Comments
 (0)