Skip to content

Commit c816f85

Browse files
618afc3c31f7f429ed3aff4fc8d6cdf3837e9133
1 parent da11822 commit c816f85

13 files changed

+408
-1
lines changed

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ docs/AnnotationBase.md
2121
docs/AnnotationCommon.md
2222
docs/AnnotationExport.md
2323
docs/AnnotationList.md
24+
docs/AnnotationPipelineExtension.md
25+
docs/AnnotationPipelineExtensionPipelinesInner.md
2426
docs/AnnotationRequest.md
2527
docs/AnnotationRequestOneOf.md
2628
docs/AnnotationRequestRelationships.md
@@ -146,6 +148,8 @@ neurostore_sdk/models/annotation_base.py
146148
neurostore_sdk/models/annotation_common.py
147149
neurostore_sdk/models/annotation_export.py
148150
neurostore_sdk/models/annotation_list.py
151+
neurostore_sdk/models/annotation_pipeline_extension.py
152+
neurostore_sdk/models/annotation_pipeline_extension_pipelines_inner.py
149153
neurostore_sdk/models/annotation_request.py
150154
neurostore_sdk/models/annotation_request_one_of.py
151155
neurostore_sdk/models/annotation_request_relationships.py
@@ -229,4 +233,6 @@ setup.cfg
229233
setup.py
230234
test-requirements.txt
231235
test/__init__.py
236+
test/test_annotation_pipeline_extension.py
237+
test/test_annotation_pipeline_extension_pipelines_inner.py
232238
tox.ini

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ Class | Method | HTTP request | Description
225225
- [AnnotationCommon](docs/AnnotationCommon.md)
226226
- [AnnotationExport](docs/AnnotationExport.md)
227227
- [AnnotationList](docs/AnnotationList.md)
228+
- [AnnotationPipelineExtension](docs/AnnotationPipelineExtension.md)
229+
- [AnnotationPipelineExtensionPipelinesInner](docs/AnnotationPipelineExtensionPipelinesInner.md)
228230
- [AnnotationRequest](docs/AnnotationRequest.md)
229231
- [AnnotationRequestOneOf](docs/AnnotationRequestOneOf.md)
230232
- [AnnotationRequestRelationships](docs/AnnotationRequestRelationships.md)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# AnnotationPipelineExtension
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**pipelines** | [**List[AnnotationPipelineExtensionPipelinesInner]**](AnnotationPipelineExtensionPipelinesInner.md) | Optional pipeline descriptors used to populate annotation notes with feature columns. Each entry should include the pipeline name and the list of columns to import, along with optional version and config id. | [optional]
9+
10+
## Example
11+
12+
```python
13+
from neurostore_sdk.models.annotation_pipeline_extension import AnnotationPipelineExtension
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of AnnotationPipelineExtension from a JSON string
18+
annotation_pipeline_extension_instance = AnnotationPipelineExtension.from_json(json)
19+
# print the JSON string representation of the object
20+
print(AnnotationPipelineExtension.to_json())
21+
22+
# convert the object into a dict
23+
annotation_pipeline_extension_dict = annotation_pipeline_extension_instance.to_dict()
24+
# create an instance of AnnotationPipelineExtension from a dict
25+
annotation_pipeline_extension_from_dict = AnnotationPipelineExtension.from_dict(annotation_pipeline_extension_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# AnnotationPipelineExtensionPipelinesInner
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**name** | **str** | Pipeline extractor name. |
9+
**version** | **str** | Optional pipeline version to use; latest is selected when omitted. | [optional]
10+
**config_id** | **str** | Optional specific pipeline config identifier to use. | [optional]
11+
**columns** | **List[str]** | Feature columns to add to each annotation note. |
12+
13+
## Example
14+
15+
```python
16+
from neurostore_sdk.models.annotation_pipeline_extension_pipelines_inner import AnnotationPipelineExtensionPipelinesInner
17+
18+
# TODO update the JSON string below
19+
json = "{}"
20+
# create an instance of AnnotationPipelineExtensionPipelinesInner from a JSON string
21+
annotation_pipeline_extension_pipelines_inner_instance = AnnotationPipelineExtensionPipelinesInner.from_json(json)
22+
# print the JSON string representation of the object
23+
print(AnnotationPipelineExtensionPipelinesInner.to_json())
24+
25+
# convert the object into a dict
26+
annotation_pipeline_extension_pipelines_inner_dict = annotation_pipeline_extension_pipelines_inner_instance.to_dict()
27+
# create an instance of AnnotationPipelineExtensionPipelinesInner from a dict
28+
annotation_pipeline_extension_pipelines_inner_from_dict = AnnotationPipelineExtensionPipelinesInner.from_dict(annotation_pipeline_extension_pipelines_inner_dict)
29+
```
30+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
31+
32+

docs/AnnotationRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**name** | **str** | Descriptive name for the annotation. | [optional]
1111
**description** | **str** | Long form description of the annotation. | [optional]
1212
**note_keys** | **object** | The keys (columns) in the annotation and the key's respective data type (such as an integer or string). | [optional]
13+
**pipelines** | [**List[AnnotationPipelineExtensionPipelinesInner]**](AnnotationPipelineExtensionPipelinesInner.md) | Optional pipeline descriptors used to populate annotation notes with feature columns. Each entry should include the pipeline name and the list of columns to import, along with optional version and config id. | [optional]
1314
**notes** | [**AnnotationRequestRelationshipsNotes**](AnnotationRequestRelationshipsNotes.md) | | [optional]
1415
**id** | **str** | short UUID specifying the location of this resource | [optional]
1516
**public** | **bool** | whether the resource is listed in public searches or not | [optional] [default to True]

docs/AnnotationRequestOneOf.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**description** | **str** | Long form description of the annotation. | [optional]
1010
**metadata** | **object** | object describing metadata about the annotation, such as software used or descriptions of the keys used in the annotation. | [optional]
1111
**note_keys** | **object** | The keys (columns) in the annotation and the key's respective data type (such as an integer or string). | [optional]
12+
**pipelines** | [**List[AnnotationPipelineExtensionPipelinesInner]**](AnnotationPipelineExtensionPipelinesInner.md) | Optional pipeline descriptors used to populate annotation notes with feature columns. Each entry should include the pipeline name and the list of columns to import, along with optional version and config id. | [optional]
1213
**notes** | [**AnnotationRequestRelationshipsNotes**](AnnotationRequestRelationshipsNotes.md) | | [optional]
1314
**id** | **str** | short UUID specifying the location of this resource | [optional]
1415
**public** | **bool** | whether the resource is listed in public searches or not | [optional] [default to True]

neurostore_sdk/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
from neurostore_sdk.models.annotation_common import AnnotationCommon
6262
from neurostore_sdk.models.annotation_export import AnnotationExport
6363
from neurostore_sdk.models.annotation_list import AnnotationList
64+
from neurostore_sdk.models.annotation_pipeline_extension import AnnotationPipelineExtension
65+
from neurostore_sdk.models.annotation_pipeline_extension_pipelines_inner import AnnotationPipelineExtensionPipelinesInner
6466
from neurostore_sdk.models.annotation_request import AnnotationRequest
6567
from neurostore_sdk.models.annotation_request_one_of import AnnotationRequestOneOf
6668
from neurostore_sdk.models.annotation_request_relationships import AnnotationRequestRelationships

neurostore_sdk/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
from neurostore_sdk.models.annotation_common import AnnotationCommon
3333
from neurostore_sdk.models.annotation_export import AnnotationExport
3434
from neurostore_sdk.models.annotation_list import AnnotationList
35+
from neurostore_sdk.models.annotation_pipeline_extension import AnnotationPipelineExtension
36+
from neurostore_sdk.models.annotation_pipeline_extension_pipelines_inner import AnnotationPipelineExtensionPipelinesInner
3537
from neurostore_sdk.models.annotation_request import AnnotationRequest
3638
from neurostore_sdk.models.annotation_request_one_of import AnnotationRequestOneOf
3739
from neurostore_sdk.models.annotation_request_relationships import AnnotationRequestRelationships
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# coding: utf-8
2+
3+
"""
4+
neurostore api
5+
6+
Create studysets for meta-analysis
7+
8+
The version of the OpenAPI document: 1.0
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
16+
from __future__ import annotations
17+
import pprint
18+
import re # noqa: F401
19+
import json
20+
21+
from pydantic import BaseModel, ConfigDict, Field
22+
from typing import Any, ClassVar, Dict, List, Optional
23+
from neurostore_sdk.models.annotation_pipeline_extension_pipelines_inner import AnnotationPipelineExtensionPipelinesInner
24+
from typing import Optional, Set
25+
from typing_extensions import Self
26+
27+
class AnnotationPipelineExtension(BaseModel):
28+
"""
29+
AnnotationPipelineExtension
30+
""" # noqa: E501
31+
pipelines: Optional[List[AnnotationPipelineExtensionPipelinesInner]] = Field(default=None, description="Optional pipeline descriptors used to populate annotation notes with feature columns. Each entry should include the pipeline name and the list of columns to import, along with optional version and config id. ")
32+
__properties: ClassVar[List[str]] = ["pipelines"]
33+
34+
model_config = ConfigDict(
35+
populate_by_name=True,
36+
validate_assignment=True,
37+
protected_namespaces=(),
38+
)
39+
40+
41+
def to_str(self) -> str:
42+
"""Returns the string representation of the model using alias"""
43+
return pprint.pformat(self.model_dump(by_alias=True))
44+
45+
def to_json(self) -> str:
46+
"""Returns the JSON representation of the model using alias"""
47+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48+
return json.dumps(self.to_dict())
49+
50+
@classmethod
51+
def from_json(cls, json_str: str) -> Optional[Self]:
52+
"""Create an instance of AnnotationPipelineExtension from a JSON string"""
53+
return cls.from_dict(json.loads(json_str))
54+
55+
def to_dict(self) -> Dict[str, Any]:
56+
"""Return the dictionary representation of the model using alias.
57+
58+
This has the following differences from calling pydantic's
59+
`self.model_dump(by_alias=True)`:
60+
61+
* `None` is only added to the output dict for nullable fields that
62+
were set at model initialization. Other fields with value `None`
63+
are ignored.
64+
"""
65+
excluded_fields: Set[str] = set([
66+
])
67+
68+
_dict = self.model_dump(
69+
by_alias=True,
70+
exclude=excluded_fields,
71+
exclude_none=True,
72+
)
73+
# override the default output from pydantic by calling `to_dict()` of each item in pipelines (list)
74+
_items = []
75+
if self.pipelines:
76+
for _item_pipelines in self.pipelines:
77+
if _item_pipelines:
78+
_items.append(_item_pipelines.to_dict())
79+
_dict['pipelines'] = _items
80+
return _dict
81+
82+
@classmethod
83+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84+
"""Create an instance of AnnotationPipelineExtension from a dict"""
85+
if obj is None:
86+
return None
87+
88+
if not isinstance(obj, dict):
89+
return cls.model_validate(obj)
90+
91+
_obj = cls.model_validate({
92+
"pipelines": [AnnotationPipelineExtensionPipelinesInner.from_dict(_item) for _item in obj["pipelines"]] if obj.get("pipelines") is not None else None
93+
})
94+
return _obj
95+
96+
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# coding: utf-8
2+
3+
"""
4+
neurostore api
5+
6+
Create studysets for meta-analysis
7+
8+
The version of the OpenAPI document: 1.0
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
16+
from __future__ import annotations
17+
import pprint
18+
import re # noqa: F401
19+
import json
20+
21+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
22+
from typing import Any, ClassVar, Dict, List, Optional
23+
from typing_extensions import Annotated
24+
from typing import Optional, Set
25+
from typing_extensions import Self
26+
27+
class AnnotationPipelineExtensionPipelinesInner(BaseModel):
28+
"""
29+
AnnotationPipelineExtensionPipelinesInner
30+
""" # noqa: E501
31+
name: StrictStr = Field(description="Pipeline extractor name.")
32+
version: Optional[StrictStr] = Field(default=None, description="Optional pipeline version to use; latest is selected when omitted.")
33+
config_id: Optional[StrictStr] = Field(default=None, description="Optional specific pipeline config identifier to use.")
34+
columns: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Feature columns to add to each annotation note.")
35+
__properties: ClassVar[List[str]] = ["name", "version", "config_id", "columns"]
36+
37+
model_config = ConfigDict(
38+
populate_by_name=True,
39+
validate_assignment=True,
40+
protected_namespaces=(),
41+
)
42+
43+
44+
def to_str(self) -> str:
45+
"""Returns the string representation of the model using alias"""
46+
return pprint.pformat(self.model_dump(by_alias=True))
47+
48+
def to_json(self) -> str:
49+
"""Returns the JSON representation of the model using alias"""
50+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51+
return json.dumps(self.to_dict())
52+
53+
@classmethod
54+
def from_json(cls, json_str: str) -> Optional[Self]:
55+
"""Create an instance of AnnotationPipelineExtensionPipelinesInner from a JSON string"""
56+
return cls.from_dict(json.loads(json_str))
57+
58+
def to_dict(self) -> Dict[str, Any]:
59+
"""Return the dictionary representation of the model using alias.
60+
61+
This has the following differences from calling pydantic's
62+
`self.model_dump(by_alias=True)`:
63+
64+
* `None` is only added to the output dict for nullable fields that
65+
were set at model initialization. Other fields with value `None`
66+
are ignored.
67+
"""
68+
excluded_fields: Set[str] = set([
69+
])
70+
71+
_dict = self.model_dump(
72+
by_alias=True,
73+
exclude=excluded_fields,
74+
exclude_none=True,
75+
)
76+
# set to None if version (nullable) is None
77+
# and model_fields_set contains the field
78+
if self.version is None and "version" in self.model_fields_set:
79+
_dict['version'] = None
80+
81+
# set to None if config_id (nullable) is None
82+
# and model_fields_set contains the field
83+
if self.config_id is None and "config_id" in self.model_fields_set:
84+
_dict['config_id'] = None
85+
86+
return _dict
87+
88+
@classmethod
89+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90+
"""Create an instance of AnnotationPipelineExtensionPipelinesInner from a dict"""
91+
if obj is None:
92+
return None
93+
94+
if not isinstance(obj, dict):
95+
return cls.model_validate(obj)
96+
97+
_obj = cls.model_validate({
98+
"name": obj.get("name"),
99+
"version": obj.get("version"),
100+
"config_id": obj.get("config_id"),
101+
"columns": obj.get("columns")
102+
})
103+
return _obj
104+
105+

0 commit comments

Comments
 (0)