Skip to content

Commit 1437fea

Browse files
e6669aa6d0658ed9689de6022b091e7f9e269edc
1 parent aff9cd2 commit 1437fea

File tree

5 files changed

+60
-8
lines changed

5 files changed

+60
-8
lines changed

docs/PipelineConfigsApi.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Method | HTTP request | Description
1212

1313

1414
# **pipeline_configs_get**
15-
> PipelineConfigList pipeline_configs_get()
15+
> PipelineConfigList pipeline_configs_get(pipeline=pipeline)
1616
1717
GET a list of pipeline configs
1818

@@ -36,10 +36,11 @@ configuration = neurostore_sdk.Configuration(
3636
with neurostore_sdk.ApiClient(configuration) as api_client:
3737
# Create an instance of the API class
3838
api_instance = neurostore_sdk.PipelineConfigsApi(api_client)
39+
pipeline = ['pipeline_example'] # List[str] | Filter configs by pipeline name (optional)
3940

4041
try:
4142
# GET a list of pipeline configs
42-
api_response = api_instance.pipeline_configs_get()
43+
api_response = api_instance.pipeline_configs_get(pipeline=pipeline)
4344
print("The response of PipelineConfigsApi->pipeline_configs_get:\n")
4445
pprint(api_response)
4546
except Exception as e:
@@ -50,7 +51,10 @@ with neurostore_sdk.ApiClient(configuration) as api_client:
5051

5152
### Parameters
5253

53-
This endpoint does not need any parameter.
54+
55+
Name | Type | Description | Notes
56+
------------- | ------------- | ------------- | -------------
57+
**pipeline** | [**List[str]**](str.md)| Filter configs by pipeline name | [optional]
5458

5559
### Return type
5660

docs/PipelineStudyResultsApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Method | HTTP request | Description
1212

1313

1414
# **pipeline_study_results_get**
15-
> PipelineStudyResultList pipeline_study_results_get(feature_filter=feature_filter, pipeline_config=pipeline_config, study_id=study_id, version=version)
15+
> PipelineStudyResultList pipeline_study_results_get(feature_filter=feature_filter, feature_flatten=feature_flatten, pipeline_config=pipeline_config, study_id=study_id, version=version)
1616
1717
GET a list of pipeline run results
1818

@@ -37,13 +37,14 @@ with neurostore_sdk.ApiClient(configuration) as api_client:
3737
# Create an instance of the API class
3838
api_instance = neurostore_sdk.PipelineStudyResultsApi(api_client)
3939
feature_filter = ['feature_filter_example'] # List[str] | Filter results by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:groups.diagnosis=ADHD\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. (optional)
40+
feature_flatten = True # bool | (optional)
4041
pipeline_config = ['pipeline_config_example'] # List[str] | Filter results by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:preprocessing.smoothing=8\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. (optional)
4142
study_id = ['study_id_example'] # List[str] | Filter results by base study ID (optional)
4243
version = 'version_example' # str | Filter results by pipeline config version (optional)
4344

4445
try:
4546
# GET a list of pipeline run results
46-
api_response = api_instance.pipeline_study_results_get(feature_filter=feature_filter, pipeline_config=pipeline_config, study_id=study_id, version=version)
47+
api_response = api_instance.pipeline_study_results_get(feature_filter=feature_filter, feature_flatten=feature_flatten, pipeline_config=pipeline_config, study_id=study_id, version=version)
4748
print("The response of PipelineStudyResultsApi->pipeline_study_results_get:\n")
4849
pprint(api_response)
4950
except Exception as e:
@@ -58,6 +59,7 @@ with neurostore_sdk.ApiClient(configuration) as api_client:
5859
Name | Type | Description | Notes
5960
------------- | ------------- | ------------- | -------------
6061
**feature_filter** | [**List[str]**](str.md)| Filter results by feature content. Format: \&quot;PipelineName[:version]:field_path&#x3D;value\&quot;. Examples: - \&quot;TestPipeline:1.0.0:groups.diagnosis&#x3D;ADHD\&quot; (specific version) - \&quot;TestPipeline:groups.diagnosis&#x3D;ADHD\&quot; (latest version) Field path supports array notation with [], regex search with ~, and comparisons with &#x3D;, &gt;, &lt;, &gt;&#x3D;, &lt;&#x3D;. | [optional]
62+
**feature_flatten** | **bool**| | [optional]
6163
**pipeline_config** | [**List[str]**](str.md)| Filter results by pipeline config content. Format: \&quot;PipelineName[:version]:config_path&#x3D;value\&quot;. Examples: - \&quot;TestPipeline:1.0.0:preprocessing.smoothing&#x3D;8\&quot; (specific version) - \&quot;TestPipeline:model.type&#x3D;linear\&quot; (latest version) Config path supports array notation with [], regex search with ~, and comparisons with &#x3D;, &gt;, &lt;, &gt;&#x3D;, &lt;&#x3D;. | [optional]
6264
**study_id** | [**List[str]**](str.md)| Filter results by base study ID | [optional]
6365
**version** | **str**| Filter results by pipeline config version | [optional]

neurostore_sdk/api/pipeline_configs_api.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
from typing import Any, Dict, List, Optional, Tuple, Union
1818
from typing_extensions import Annotated
1919

20-
from pydantic import StrictStr
21-
from typing import Optional
20+
from pydantic import Field, StrictStr
21+
from typing import List, Optional
22+
from typing_extensions import Annotated
2223
from neurostore_sdk.models.pipeline_config import PipelineConfig
2324
from neurostore_sdk.models.pipeline_config_list import PipelineConfigList
2425

@@ -43,6 +44,7 @@ def __init__(self, api_client=None) -> None:
4344
@validate_call
4445
def pipeline_configs_get(
4546
self,
47+
pipeline: Annotated[Optional[List[StrictStr]], Field(description="Filter configs by pipeline name")] = None,
4648
_request_timeout: Union[
4749
None,
4850
Annotated[StrictFloat, Field(gt=0)],
@@ -59,6 +61,8 @@ def pipeline_configs_get(
5961
"""GET a list of pipeline configs
6062
6163
64+
:param pipeline: Filter configs by pipeline name
65+
:type pipeline: List[str]
6266
:param _request_timeout: timeout setting for this request. If one
6367
number provided, it will be total request
6468
timeout. It can also be a pair (tuple) of
@@ -82,6 +86,7 @@ def pipeline_configs_get(
8286
""" # noqa: E501
8387

8488
_param = self._pipeline_configs_get_serialize(
89+
pipeline=pipeline,
8590
_request_auth=_request_auth,
8691
_content_type=_content_type,
8792
_headers=_headers,
@@ -105,6 +110,7 @@ def pipeline_configs_get(
105110
@validate_call
106111
def pipeline_configs_get_with_http_info(
107112
self,
113+
pipeline: Annotated[Optional[List[StrictStr]], Field(description="Filter configs by pipeline name")] = None,
108114
_request_timeout: Union[
109115
None,
110116
Annotated[StrictFloat, Field(gt=0)],
@@ -121,6 +127,8 @@ def pipeline_configs_get_with_http_info(
121127
"""GET a list of pipeline configs
122128
123129
130+
:param pipeline: Filter configs by pipeline name
131+
:type pipeline: List[str]
124132
:param _request_timeout: timeout setting for this request. If one
125133
number provided, it will be total request
126134
timeout. It can also be a pair (tuple) of
@@ -144,6 +152,7 @@ def pipeline_configs_get_with_http_info(
144152
""" # noqa: E501
145153

146154
_param = self._pipeline_configs_get_serialize(
155+
pipeline=pipeline,
147156
_request_auth=_request_auth,
148157
_content_type=_content_type,
149158
_headers=_headers,
@@ -167,6 +176,7 @@ def pipeline_configs_get_with_http_info(
167176
@validate_call
168177
def pipeline_configs_get_without_preload_content(
169178
self,
179+
pipeline: Annotated[Optional[List[StrictStr]], Field(description="Filter configs by pipeline name")] = None,
170180
_request_timeout: Union[
171181
None,
172182
Annotated[StrictFloat, Field(gt=0)],
@@ -183,6 +193,8 @@ def pipeline_configs_get_without_preload_content(
183193
"""GET a list of pipeline configs
184194
185195
196+
:param pipeline: Filter configs by pipeline name
197+
:type pipeline: List[str]
186198
:param _request_timeout: timeout setting for this request. If one
187199
number provided, it will be total request
188200
timeout. It can also be a pair (tuple) of
@@ -206,6 +218,7 @@ def pipeline_configs_get_without_preload_content(
206218
""" # noqa: E501
207219

208220
_param = self._pipeline_configs_get_serialize(
221+
pipeline=pipeline,
209222
_request_auth=_request_auth,
210223
_content_type=_content_type,
211224
_headers=_headers,
@@ -224,6 +237,7 @@ def pipeline_configs_get_without_preload_content(
224237

225238
def _pipeline_configs_get_serialize(
226239
self,
240+
pipeline,
227241
_request_auth,
228242
_content_type,
229243
_headers,
@@ -233,6 +247,7 @@ def _pipeline_configs_get_serialize(
233247
_host = None
234248

235249
_collection_formats: Dict[str, str] = {
250+
'pipeline': 'multi',
236251
}
237252

238253
_path_params: Dict[str, str] = {}
@@ -246,6 +261,10 @@ def _pipeline_configs_get_serialize(
246261

247262
# process the path parameters
248263
# process the query parameters
264+
if pipeline is not None:
265+
266+
_query_params.append(('pipeline', pipeline))
267+
249268
# process the header parameters
250269
# process the form parameters
251270
# process the body parameter

neurostore_sdk/api/pipeline_study_results_api.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from typing import Any, Dict, List, Optional, Tuple, Union
1818
from typing_extensions import Annotated
1919

20-
from pydantic import Field, StrictStr
20+
from pydantic import Field, StrictBool, StrictStr
2121
from typing import List, Optional
2222
from typing_extensions import Annotated
2323
from neurostore_sdk.models.pipeline_study_result import PipelineStudyResult
@@ -45,6 +45,7 @@ def __init__(self, api_client=None) -> None:
4545
def pipeline_study_results_get(
4646
self,
4747
feature_filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:groups.diagnosis=ADHD\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. ")] = None,
48+
feature_flatten: Optional[StrictBool] = None,
4849
pipeline_config: Annotated[Optional[List[StrictStr]], Field(description="Filter results by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:preprocessing.smoothing=8\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. ")] = None,
4950
study_id: Annotated[Optional[List[StrictStr]], Field(description="Filter results by base study ID")] = None,
5051
version: Annotated[Optional[StrictStr], Field(description="Filter results by pipeline config version")] = None,
@@ -66,6 +67,8 @@ def pipeline_study_results_get(
6667
6768
:param feature_filter: Filter results by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:groups.diagnosis=ADHD\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=.
6869
:type feature_filter: List[str]
70+
:param feature_flatten:
71+
:type feature_flatten: bool
6972
:param pipeline_config: Filter results by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:preprocessing.smoothing=8\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=.
7073
:type pipeline_config: List[str]
7174
:param study_id: Filter results by base study ID
@@ -96,6 +99,7 @@ def pipeline_study_results_get(
9699

97100
_param = self._pipeline_study_results_get_serialize(
98101
feature_filter=feature_filter,
102+
feature_flatten=feature_flatten,
99103
pipeline_config=pipeline_config,
100104
study_id=study_id,
101105
version=version,
@@ -123,6 +127,7 @@ def pipeline_study_results_get(
123127
def pipeline_study_results_get_with_http_info(
124128
self,
125129
feature_filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:groups.diagnosis=ADHD\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. ")] = None,
130+
feature_flatten: Optional[StrictBool] = None,
126131
pipeline_config: Annotated[Optional[List[StrictStr]], Field(description="Filter results by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:preprocessing.smoothing=8\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. ")] = None,
127132
study_id: Annotated[Optional[List[StrictStr]], Field(description="Filter results by base study ID")] = None,
128133
version: Annotated[Optional[StrictStr], Field(description="Filter results by pipeline config version")] = None,
@@ -144,6 +149,8 @@ def pipeline_study_results_get_with_http_info(
144149
145150
:param feature_filter: Filter results by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:groups.diagnosis=ADHD\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=.
146151
:type feature_filter: List[str]
152+
:param feature_flatten:
153+
:type feature_flatten: bool
147154
:param pipeline_config: Filter results by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:preprocessing.smoothing=8\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=.
148155
:type pipeline_config: List[str]
149156
:param study_id: Filter results by base study ID
@@ -174,6 +181,7 @@ def pipeline_study_results_get_with_http_info(
174181

175182
_param = self._pipeline_study_results_get_serialize(
176183
feature_filter=feature_filter,
184+
feature_flatten=feature_flatten,
177185
pipeline_config=pipeline_config,
178186
study_id=study_id,
179187
version=version,
@@ -201,6 +209,7 @@ def pipeline_study_results_get_with_http_info(
201209
def pipeline_study_results_get_without_preload_content(
202210
self,
203211
feature_filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:groups.diagnosis=ADHD\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. ")] = None,
212+
feature_flatten: Optional[StrictBool] = None,
204213
pipeline_config: Annotated[Optional[List[StrictStr]], Field(description="Filter results by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:preprocessing.smoothing=8\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. ")] = None,
205214
study_id: Annotated[Optional[List[StrictStr]], Field(description="Filter results by base study ID")] = None,
206215
version: Annotated[Optional[StrictStr], Field(description="Filter results by pipeline config version")] = None,
@@ -222,6 +231,8 @@ def pipeline_study_results_get_without_preload_content(
222231
223232
:param feature_filter: Filter results by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:groups.diagnosis=ADHD\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=.
224233
:type feature_filter: List[str]
234+
:param feature_flatten:
235+
:type feature_flatten: bool
225236
:param pipeline_config: Filter results by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:preprocessing.smoothing=8\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=.
226237
:type pipeline_config: List[str]
227238
:param study_id: Filter results by base study ID
@@ -252,6 +263,7 @@ def pipeline_study_results_get_without_preload_content(
252263

253264
_param = self._pipeline_study_results_get_serialize(
254265
feature_filter=feature_filter,
266+
feature_flatten=feature_flatten,
255267
pipeline_config=pipeline_config,
256268
study_id=study_id,
257269
version=version,
@@ -274,6 +286,7 @@ def pipeline_study_results_get_without_preload_content(
274286
def _pipeline_study_results_get_serialize(
275287
self,
276288
feature_filter,
289+
feature_flatten,
277290
pipeline_config,
278291
study_id,
279292
version,
@@ -306,6 +319,10 @@ def _pipeline_study_results_get_serialize(
306319

307320
_query_params.append(('feature_filter', feature_filter))
308321

322+
if feature_flatten is not None:
323+
324+
_query_params.append(('feature_flatten', feature_flatten))
325+
309326
if pipeline_config is not None:
310327

311328
_query_params.append(('pipeline_config', pipeline_config))

neurostore_sdk/models/pipeline.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ def to_dict(self) -> Dict[str, Any]:
7676
exclude=excluded_fields,
7777
exclude_none=True,
7878
)
79+
# set to None if description (nullable) is None
80+
# and model_fields_set contains the field
81+
if self.description is None and "description" in self.model_fields_set:
82+
_dict['description'] = None
83+
84+
# set to None if derived_from (nullable) is None
85+
# and model_fields_set contains the field
86+
if self.derived_from is None and "derived_from" in self.model_fields_set:
87+
_dict['derived_from'] = None
88+
7989
return _dict
8090

8191
@classmethod

0 commit comments

Comments
 (0)