Skip to content

Commit f7314e8

Browse files
a6099c6eb209735d9955c63b24da3cc27b946791
1 parent a143cdd commit f7314e8

20 files changed

+1382
-7
lines changed

.openapi-generator/FILES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ docs/Pipeline.md
6161
docs/PipelineConfig.md
6262
docs/PipelineConfigList.md
6363
docs/PipelineConfigsApi.md
64+
docs/PipelineEmbedding.md
65+
docs/PipelineEmbeddingList.md
66+
docs/PipelineEmbeddingsApi.md
6467
docs/PipelineList.md
6568
docs/PipelineStudyResult.md
6669
docs/PipelineStudyResultList.md
@@ -113,6 +116,7 @@ neurostore_sdk/api/annotations_api.py
113116
neurostore_sdk/api/conditions_api.py
114117
neurostore_sdk/api/images_api.py
115118
neurostore_sdk/api/pipeline_configs_api.py
119+
neurostore_sdk/api/pipeline_embeddings_api.py
116120
neurostore_sdk/api/pipeline_study_results_api.py
117121
neurostore_sdk/api/pipelines_api.py
118122
neurostore_sdk/api/points_api.py
@@ -178,6 +182,8 @@ neurostore_sdk/models/note_collection_return.py
178182
neurostore_sdk/models/pipeline.py
179183
neurostore_sdk/models/pipeline_config.py
180184
neurostore_sdk/models/pipeline_config_list.py
185+
neurostore_sdk/models/pipeline_embedding.py
186+
neurostore_sdk/models/pipeline_embedding_list.py
181187
neurostore_sdk/models/pipeline_list.py
182188
neurostore_sdk/models/pipeline_study_result.py
183189
neurostore_sdk/models/pipeline_study_result_list.py
@@ -223,4 +229,7 @@ setup.cfg
223229
setup.py
224230
test-requirements.txt
225231
test/__init__.py
232+
test/test_pipeline_embedding.py
233+
test/test_pipeline_embedding_list.py
234+
test/test_pipeline_embeddings_api.py
226235
tox.ini

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ Class | Method | HTTP request | Description
127127
*PipelineConfigsApi* | [**pipeline_configs_id_get**](docs/PipelineConfigsApi.md#pipeline_configs_id_get) | **GET** /pipeline-configs/{id} | GET a pipeline config by ID
128128
*PipelineConfigsApi* | [**pipeline_configs_id_put**](docs/PipelineConfigsApi.md#pipeline_configs_id_put) | **PUT** /pipeline-configs/{id} | PUT/update a pipeline config by ID
129129
*PipelineConfigsApi* | [**pipeline_configs_post**](docs/PipelineConfigsApi.md#pipeline_configs_post) | **POST** /pipeline-configs/ | POST/create a pipeline config
130+
*PipelineEmbeddingsApi* | [**pipeline_embeddings_get**](docs/PipelineEmbeddingsApi.md#pipeline_embeddings_get) | **GET** /pipeline-embeddings/ | List pipeline embeddings
131+
*PipelineEmbeddingsApi* | [**pipeline_embeddings_id_get**](docs/PipelineEmbeddingsApi.md#pipeline_embeddings_id_get) | **GET** /pipeline-embeddings/{id} | Get a pipeline embedding by id
130132
*PipelineStudyResultsApi* | [**pipeline_study_results_get**](docs/PipelineStudyResultsApi.md#pipeline_study_results_get) | **GET** /pipeline-study-results/ | GET a list of pipeline run results
131133
*PipelineStudyResultsApi* | [**pipeline_study_results_pipeline_study_result_id_delete**](docs/PipelineStudyResultsApi.md#pipeline_study_results_pipeline_study_result_id_delete) | **DELETE** /pipeline-study-results/{pipeline_study_result_id} | DELETE a pipeline run result by ID
132134
*PipelineStudyResultsApi* | [**pipeline_study_results_pipeline_study_result_id_get**](docs/PipelineStudyResultsApi.md#pipeline_study_results_pipeline_study_result_id_get) | **GET** /pipeline-study-results/{pipeline_study_result_id} | GET a pipeline run result by ID
@@ -259,6 +261,8 @@ Class | Method | HTTP request | Description
259261
- [Pipeline](docs/Pipeline.md)
260262
- [PipelineConfig](docs/PipelineConfig.md)
261263
- [PipelineConfigList](docs/PipelineConfigList.md)
264+
- [PipelineEmbedding](docs/PipelineEmbedding.md)
265+
- [PipelineEmbeddingList](docs/PipelineEmbeddingList.md)
262266
- [PipelineList](docs/PipelineList.md)
263267
- [PipelineStudyResult](docs/PipelineStudyResult.md)
264268
- [PipelineStudyResultList](docs/PipelineStudyResultList.md)

docs/PipelineConfigsApi.md

Lines changed: 6 additions & 2 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(pipeline=pipeline, paginate=paginate)
15+
> PipelineConfigList pipeline_configs_get(pipeline=pipeline, paginate=paginate, has_embeddings=has_embeddings, embedding_dimensions=embedding_dimensions)
1616
1717
GET a list of pipeline configs
1818

@@ -38,10 +38,12 @@ with neurostore_sdk.ApiClient(configuration) as api_client:
3838
api_instance = neurostore_sdk.PipelineConfigsApi(api_client)
3939
pipeline = ['pipeline_example'] # List[str] | Filter configs by pipeline name (optional)
4040
paginate = True # bool | whether to paginate results (true) or return all results at once (false) (optional) (default to True)
41+
has_embeddings = True # bool | Filter configs as whether they have embeddings saved. (optional)
42+
embedding_dimensions = 56 # int | Filter configs by number of dimensions in the embeddings. (optional)
4143

4244
try:
4345
# GET a list of pipeline configs
44-
api_response = api_instance.pipeline_configs_get(pipeline=pipeline, paginate=paginate)
46+
api_response = api_instance.pipeline_configs_get(pipeline=pipeline, paginate=paginate, has_embeddings=has_embeddings, embedding_dimensions=embedding_dimensions)
4547
print("The response of PipelineConfigsApi->pipeline_configs_get:\n")
4648
pprint(api_response)
4749
except Exception as e:
@@ -57,6 +59,8 @@ Name | Type | Description | Notes
5759
------------- | ------------- | ------------- | -------------
5860
**pipeline** | [**List[str]**](str.md)| Filter configs by pipeline name | [optional]
5961
**paginate** | **bool**| whether to paginate results (true) or return all results at once (false) | [optional] [default to True]
62+
**has_embeddings** | **bool**| Filter configs as whether they have embeddings saved. | [optional]
63+
**embedding_dimensions** | **int**| Filter configs by number of dimensions in the embeddings. | [optional]
6064

6165
### Return type
6266

docs/PipelineEmbedding.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# PipelineEmbedding
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**created_at** | **datetime** | time the resource was created on the database | [optional] [readonly]
9+
**updated_at** | **str** | when the resource was last modified/updated. | [optional] [readonly]
10+
**config_id** | **str** | |
11+
**base_study_id** | **str** | | [optional]
12+
**date_executed** | **datetime** | | [optional]
13+
**file_inputs** | **object** | | [optional]
14+
**status** | **str** | Current status of the pipeline execution (e.g. SUCCESS, FAILURE, ERROR, UNKNOWN) |
15+
**embedding** | **List[float]** | |
16+
17+
## Example
18+
19+
```python
20+
from neurostore_sdk.models.pipeline_embedding import PipelineEmbedding
21+
22+
# TODO update the JSON string below
23+
json = "{}"
24+
# create an instance of PipelineEmbedding from a JSON string
25+
pipeline_embedding_instance = PipelineEmbedding.from_json(json)
26+
# print the JSON string representation of the object
27+
print(PipelineEmbedding.to_json())
28+
29+
# convert the object into a dict
30+
pipeline_embedding_dict = pipeline_embedding_instance.to_dict()
31+
# create an instance of PipelineEmbedding from a dict
32+
pipeline_embedding_from_dict = PipelineEmbedding.from_dict(pipeline_embedding_dict)
33+
```
34+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
35+
36+

docs/PipelineEmbeddingList.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PipelineEmbeddingList
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**results** | [**List[PipelineEmbedding]**](PipelineEmbedding.md) | | [optional]
9+
**metadata** | [**Metadata**](Metadata.md) | | [optional]
10+
11+
## Example
12+
13+
```python
14+
from neurostore_sdk.models.pipeline_embedding_list import PipelineEmbeddingList
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of PipelineEmbeddingList from a JSON string
19+
pipeline_embedding_list_instance = PipelineEmbeddingList.from_json(json)
20+
# print the JSON string representation of the object
21+
print(PipelineEmbeddingList.to_json())
22+
23+
# convert the object into a dict
24+
pipeline_embedding_list_dict = pipeline_embedding_list_instance.to_dict()
25+
# create an instance of PipelineEmbeddingList from a dict
26+
pipeline_embedding_list_from_dict = PipelineEmbeddingList.from_dict(pipeline_embedding_list_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+

docs/PipelineEmbeddingsApi.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# neurostore_sdk.PipelineEmbeddingsApi
2+
3+
All URIs are relative to *https://neurostore.org/api*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**pipeline_embeddings_get**](PipelineEmbeddingsApi.md#pipeline_embeddings_get) | **GET** /pipeline-embeddings/ | List pipeline embeddings
8+
[**pipeline_embeddings_id_get**](PipelineEmbeddingsApi.md#pipeline_embeddings_id_get) | **GET** /pipeline-embeddings/{id} | Get a pipeline embedding by id
9+
10+
11+
# **pipeline_embeddings_get**
12+
> PipelineEmbeddingList pipeline_embeddings_get(paginate=paginate)
13+
14+
List pipeline embeddings
15+
16+
### Example
17+
18+
19+
```python
20+
import neurostore_sdk
21+
from neurostore_sdk.models.pipeline_embedding_list import PipelineEmbeddingList
22+
from neurostore_sdk.rest import ApiException
23+
from pprint import pprint
24+
25+
# Defining the host is optional and defaults to https://neurostore.org/api
26+
# See configuration.py for a list of all supported configuration parameters.
27+
configuration = neurostore_sdk.Configuration(
28+
host = "https://neurostore.org/api"
29+
)
30+
31+
32+
# Enter a context with an instance of the API client
33+
with neurostore_sdk.ApiClient(configuration) as api_client:
34+
# Create an instance of the API class
35+
api_instance = neurostore_sdk.PipelineEmbeddingsApi(api_client)
36+
paginate = True # bool | whether to paginate results (true) or return all results at once (false) (optional) (default to True)
37+
38+
try:
39+
# List pipeline embeddings
40+
api_response = api_instance.pipeline_embeddings_get(paginate=paginate)
41+
print("The response of PipelineEmbeddingsApi->pipeline_embeddings_get:\n")
42+
pprint(api_response)
43+
except Exception as e:
44+
print("Exception when calling PipelineEmbeddingsApi->pipeline_embeddings_get: %s\n" % e)
45+
```
46+
47+
48+
49+
### Parameters
50+
51+
52+
Name | Type | Description | Notes
53+
------------- | ------------- | ------------- | -------------
54+
**paginate** | **bool**| whether to paginate results (true) or return all results at once (false) | [optional] [default to True]
55+
56+
### Return type
57+
58+
[**PipelineEmbeddingList**](PipelineEmbeddingList.md)
59+
60+
### Authorization
61+
62+
No authorization required
63+
64+
### HTTP request headers
65+
66+
- **Content-Type**: Not defined
67+
- **Accept**: application/json
68+
69+
### HTTP response details
70+
71+
| Status code | Description | Response headers |
72+
|-------------|-------------|------------------|
73+
**200** | OK | - |
74+
75+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
76+
77+
# **pipeline_embeddings_id_get**
78+
> PipelineEmbedding pipeline_embeddings_id_get(id)
79+
80+
Get a pipeline embedding by id
81+
82+
### Example
83+
84+
85+
```python
86+
import neurostore_sdk
87+
from neurostore_sdk.models.pipeline_embedding import PipelineEmbedding
88+
from neurostore_sdk.rest import ApiException
89+
from pprint import pprint
90+
91+
# Defining the host is optional and defaults to https://neurostore.org/api
92+
# See configuration.py for a list of all supported configuration parameters.
93+
configuration = neurostore_sdk.Configuration(
94+
host = "https://neurostore.org/api"
95+
)
96+
97+
98+
# Enter a context with an instance of the API client
99+
with neurostore_sdk.ApiClient(configuration) as api_client:
100+
# Create an instance of the API class
101+
api_instance = neurostore_sdk.PipelineEmbeddingsApi(api_client)
102+
id = 'id_example' # str |
103+
104+
try:
105+
# Get a pipeline embedding by id
106+
api_response = api_instance.pipeline_embeddings_id_get(id)
107+
print("The response of PipelineEmbeddingsApi->pipeline_embeddings_id_get:\n")
108+
pprint(api_response)
109+
except Exception as e:
110+
print("Exception when calling PipelineEmbeddingsApi->pipeline_embeddings_id_get: %s\n" % e)
111+
```
112+
113+
114+
115+
### Parameters
116+
117+
118+
Name | Type | Description | Notes
119+
------------- | ------------- | ------------- | -------------
120+
**id** | **str**| |
121+
122+
### Return type
123+
124+
[**PipelineEmbedding**](PipelineEmbedding.md)
125+
126+
### Authorization
127+
128+
No authorization required
129+
130+
### HTTP request headers
131+
132+
- **Content-Type**: Not defined
133+
- **Accept**: application/json
134+
135+
### HTTP response details
136+
137+
| Status code | Description | Response headers |
138+
|-------------|-------------|------------------|
139+
**200** | OK | - |
140+
**404** | Example response | - |
141+
142+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
143+

docs/StoreApi.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ Name | Type | Description | Notes
11201120
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
11211121

11221122
# **base_studies_get**
1123-
> BaseStudyList base_studies_get(year_min=year_min, x=x, y=y, z=z, radius=radius, year_max=year_max, feature_filter=feature_filter, pipeline_config=pipeline_config, feature_display=feature_display, feature_flatten=feature_flatten, search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info, paginate=paginate)
1123+
> BaseStudyList base_studies_get(year_min=year_min, x=x, y=y, z=z, radius=radius, year_max=year_max, feature_filter=feature_filter, pipeline_config=pipeline_config, feature_display=feature_display, semantic_search=semantic_search, pipeline_config_id=pipeline_config_id, distance_threshold=distance_threshold, overall_cap=overall_cap, feature_flatten=feature_flatten, search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info, paginate=paginate)
11241124
11251125

11261126

@@ -1163,6 +1163,10 @@ with neurostore_sdk.ApiClient(configuration) as api_client:
11631163
feature_filter = ['feature_filter_example'] # List[str] | Filter studies by feature content. Format: \"PipelineName[:version]:field_path=value\". Examples: - \"TestPipeline:1.0.0:predictions.age_mean>20\" (specific version) - \"TestPipeline:groups.diagnosis=ADHD\" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. (optional)
11641164
pipeline_config = ['pipeline_config_example'] # List[str] | Filter studies by pipeline config content. Format: \"PipelineName[:version]:config_path=value\". Examples: - \"TestPipeline:1.0.0:settings.min_age=20\" (specific version) - \"TestPipeline:model.type=linear\" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. (optional)
11651165
feature_display = 'feature_display_example' # str | display features from pipelines (optional)
1166+
semantic_search = 'semantic_search_example' # str | Semantic search query string (optional)
1167+
pipeline_config_id = 'pipeline_config_id_example' # str | Pipeline configuration identifier to filter studies (optional)
1168+
distance_threshold = 0.5 # float | Distance threshold for semantic search (default 0.5) (optional)
1169+
overall_cap = 3000 # int | Maximum number of overall results to return (default 3000) (optional)
11661170
feature_flatten = True # bool | (optional)
11671171
search = 'imagin' # str | search for entries that contain the substring (optional)
11681172
sort = 'created_at' # str | Parameter to sort results on (optional) (default to 'created_at')
@@ -1183,7 +1187,7 @@ with neurostore_sdk.ApiClient(configuration) as api_client:
11831187

11841188
try:
11851189
#
1186-
api_response = api_instance.base_studies_get(year_min=year_min, x=x, y=y, z=z, radius=radius, year_max=year_max, feature_filter=feature_filter, pipeline_config=pipeline_config, feature_display=feature_display, feature_flatten=feature_flatten, search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info, paginate=paginate)
1190+
api_response = api_instance.base_studies_get(year_min=year_min, x=x, y=y, z=z, radius=radius, year_max=year_max, feature_filter=feature_filter, pipeline_config=pipeline_config, feature_display=feature_display, semantic_search=semantic_search, pipeline_config_id=pipeline_config_id, distance_threshold=distance_threshold, overall_cap=overall_cap, feature_flatten=feature_flatten, search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info, paginate=paginate)
11871191
print("The response of StoreApi->base_studies_get:\n")
11881192
pprint(api_response)
11891193
except Exception as e:
@@ -1206,6 +1210,10 @@ Name | Type | Description | Notes
12061210
**feature_filter** | [**List[str]**](str.md)| Filter studies by feature content. Format: \&quot;PipelineName[:version]:field_path&#x3D;value\&quot;. Examples: - \&quot;TestPipeline:1.0.0:predictions.age_mean&gt;20\&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]
12071211
**pipeline_config** | [**List[str]**](str.md)| Filter studies by pipeline config content. Format: \&quot;PipelineName[:version]:config_path&#x3D;value\&quot;. Examples: - \&quot;TestPipeline:1.0.0:settings.min_age&#x3D;20\&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]
12081212
**feature_display** | **str**| display features from pipelines | [optional]
1213+
**semantic_search** | **str**| Semantic search query string | [optional]
1214+
**pipeline_config_id** | **str**| Pipeline configuration identifier to filter studies | [optional]
1215+
**distance_threshold** | **float**| Distance threshold for semantic search (default 0.5) | [optional]
1216+
**overall_cap** | **int**| Maximum number of overall results to return (default 3000) | [optional]
12091217
**feature_flatten** | **bool**| | [optional]
12101218
**search** | **str**| search for entries that contain the substring | [optional]
12111219
**sort** | **str**| Parameter to sort results on | [optional] [default to &#39;created_at&#39;]

0 commit comments

Comments
 (0)