Skip to content

Commit 6b32cda

Browse files
b03471b36b16a108474640fde11895187ad23408
1 parent 4559ee3 commit 6b32cda

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

docs/AnalysisReturn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Name | Type | Description | Notes
2424
**metadata** | **object** | | [optional]
2525
**source_id** | **str** | ID of the analysis this one was cloned from, if any. | [optional] [readonly]
2626
**point_count** | **int** | Number of point coordinates linked to this analysis. | [optional]
27+
**image_count** | **int** | Number of images linked to this analysis. | [optional]
2728
**has_coordinates** | **bool** | | [optional]
2829
**has_images** | **bool** | | [optional]
2930
**has_z_maps** | **bool** | | [optional]

neurostore_sdk/models/analysis_return.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ class AnalysisReturn(BaseModel):
5252
metadata: Optional[Dict[str, Any]] = None
5353
source_id: Optional[StrictStr] = Field(default=None, description="ID of the analysis this one was cloned from, if any.")
5454
point_count: Optional[StrictInt] = Field(default=None, description="Number of point coordinates linked to this analysis.")
55+
image_count: Optional[StrictInt] = Field(default=None, description="Number of images linked to this analysis.")
5556
has_coordinates: Optional[StrictBool] = None
5657
has_images: Optional[StrictBool] = None
5758
has_z_maps: Optional[StrictBool] = None
5859
has_t_maps: Optional[StrictBool] = None
5960
has_beta_and_variance_maps: Optional[StrictBool] = None
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"]
61+
__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", "image_count", "has_coordinates", "has_images", "has_z_maps", "has_t_maps", "has_beta_and_variance_maps"]
6162

6263
model_config = ConfigDict(
6364
populate_by_name=True,
@@ -167,6 +168,11 @@ def to_dict(self) -> Dict[str, Any]:
167168
if self.point_count is None and "point_count" in self.model_fields_set:
168169
_dict['point_count'] = None
169170

171+
# set to None if image_count (nullable) is None
172+
# and model_fields_set contains the field
173+
if self.image_count is None and "image_count" in self.model_fields_set:
174+
_dict['image_count'] = None
175+
170176
return _dict
171177

172178
@classmethod
@@ -198,6 +204,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
198204
"metadata": obj.get("metadata"),
199205
"source_id": obj.get("source_id"),
200206
"point_count": obj.get("point_count"),
207+
"image_count": obj.get("image_count"),
201208
"has_coordinates": obj.get("has_coordinates"),
202209
"has_images": obj.get("has_images"),
203210
"has_z_maps": obj.get("has_z_maps"),

test/test_analysis_return.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def make_instance(self, include_optional) -> AnalysisReturn:
6262
metadata = neurostore_sdk.models.metadata.metadata(),
6363
source_id = '',
6464
point_count = 56,
65+
image_count = 56,
6566
has_coordinates = True,
6667
has_images = True,
6768
has_z_maps = True,

0 commit comments

Comments
 (0)