Skip to content

Commit ee7ab33

Browse files
authored
Merge pull request #19 from tuneinsight/release-v1.3.0
v1.3.0 release
2 parents f7b799b + 3e400d3 commit ee7ab33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+942
-359
lines changed

PKG-INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: tuneinsight
3-
Version: 1.2.3
3+
Version: 1.3.0
44
Summary: Official Python SDK for the Tune Insight API. The current version is compatible with the same version of the API.
55
License: Apache-2.0
66
Author: Tune Insight SA
@@ -22,7 +22,7 @@ Requires-Dist: ipython (==8.18.1)
2222
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
2323
Requires-Dist: jupyter (>=1.1.1,<2.0.0) ; extra == "full"
2424
Requires-Dist: jupyter-client (>=8.6.3,<9.0.0) ; extra == "full"
25-
Requires-Dist: jupyterlab (>=4.3.6,<5.0.0) ; extra == "full"
25+
Requires-Dist: jupyterlab (>=4.4.8,<5.0.0) ; extra == "full"
2626
Requires-Dist: matplotlib (>=3.5.0,<4.0.0)
2727
Requires-Dist: notebook (>=7.3.3,<8.0.0) ; extra == "full"
2828
Requires-Dist: pandas (>=2.2.3,<3.0.0)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "tuneinsight"
3-
version = "1.2.3" # Ignored.
3+
version = "1.3.0" # Ignored.
44
description = "Official Python SDK for the Tune Insight API. The current version is compatible with the same version of the API."
55
authors = ["Tune Insight SA"]
66
license = "Apache-2.0"
@@ -46,7 +46,7 @@ cryptography = "^44.0.1"
4646
# Extras for the "full" install (somewhat heavy packages).
4747
notebook = { version = "^7.3.3", optional = true}
4848
jupyter = { version = "^1.1.1", optional = true}
49-
jupyterlab = { version = "^4.3.6", optional = true}
49+
jupyterlab = { version = "^4.4.8", optional = true}
5050
tornado = { version = "^6.5.0", optional = true}
5151
jupyter-client = { version = "^8.6.3", optional = true}
5252

src/tuneinsight/api/api-checksum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0dd37e1807bf51ece84bc941f8c7521fd124ef5f3384bcba294809ac098ecaa1
1+
45ef3a4d2aed31f445016f57fd45409cd6b70cf9d8d4a2520e336b5573fee9a3

src/tuneinsight/api/sdk/models/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@
186186
from .get_query_list_sort_by import GetQueryListSortBy
187187
from .get_result_list_order import GetResultListOrder
188188
from .get_result_list_sort_by import GetResultListSortBy
189+
from .get_translated_query_command import GetTranslatedQueryCommand
190+
from .get_translated_query_command_result import GetTranslatedQueryCommandResult
189191
from .get_user_preference_key import GetUserPreferenceKey
190192
from .group_by_type import GroupByType
191193
from .group_info import GroupInfo
@@ -276,6 +278,7 @@
276278
from .privacy_summary_computation import PrivacySummaryComputation
277279
from .privacy_warning import PrivacyWarning
278280
from .privacy_warning_severity import PrivacyWarningSeverity
281+
from .privacy_warning_type import PrivacyWarningType
279282
from .private_search import PrivateSearch
280283
from .private_search_database import PrivateSearchDatabase
281284
from .private_search_query import PrivateSearchQuery
@@ -298,6 +301,7 @@
298301
from .quantiles import Quantiles
299302
from .query import Query
300303
from .query_bookmark_definition import QueryBookmarkDefinition
304+
from .query_output_variable import QueryOutputVariable
301305
from .query_status import QueryStatus
302306
from .realm_role import RealmRole
303307
from .regression_type import RegressionType
@@ -568,6 +572,8 @@
568572
"GetQueryListSortBy",
569573
"GetResultListOrder",
570574
"GetResultListSortBy",
575+
"GetTranslatedQueryCommand",
576+
"GetTranslatedQueryCommandResult",
571577
"GetUserPreferenceKey",
572578
"GroupByType",
573579
"GroupInfo",
@@ -658,6 +664,7 @@
658664
"PrivacySummaryComputation",
659665
"PrivacyWarning",
660666
"PrivacyWarningSeverity",
667+
"PrivacyWarningType",
661668
"PrivateSearch",
662669
"PrivateSearchDatabase",
663670
"PrivateSearchQuery",
@@ -680,6 +687,7 @@
680687
"Quantiles",
681688
"Query",
682689
"QueryBookmarkDefinition",
690+
"QueryOutputVariable",
683691
"QueryStatus",
684692
"RealmRole",
685693
"RegressionType",

src/tuneinsight/api/sdk/models/aggregated_dataset_length.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
1+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
22

33
import attr
44

@@ -47,6 +47,8 @@ class AggregatedDatasetLength:
4747
...}
4848
local_input_id (Union[Unset, str]): Unique identifier of a data object.
4949
owner (Union[Unset, str]): The username of the end user who requested the computation.
50+
participants (Union[Unset, List[str]]): list of preferred participants (using their alias) to run the
51+
computation with.
5052
precision (Union[Unset, None, int]): optional minimum required bit precision to guarantee when aggregating
5153
results.
5254
If the precision is set to `x`, then the user can expect the results error to be bounded by `2^(-x)`
@@ -92,6 +94,7 @@ class AggregatedDatasetLength:
9294
local_input: Union[Unset, "LocalInput"] = UNSET
9395
local_input_id: Union[Unset, str] = UNSET
9496
owner: Union[Unset, str] = UNSET
97+
participants: Union[Unset, List[str]] = UNSET
9598
precision: Union[Unset, None, int] = UNSET
9699
preprocessing_parameters: Union[Unset, "ComputationPreprocessingParameters"] = UNSET
97100
project_id: Union[Unset, str] = UNSET
@@ -133,6 +136,10 @@ def to_dict(self) -> Dict[str, Any]:
133136

134137
local_input_id = self.local_input_id
135138
owner = self.owner
139+
participants: Union[Unset, List[str]] = UNSET
140+
if not isinstance(self.participants, Unset):
141+
participants = self.participants
142+
136143
precision = self.precision
137144
preprocessing_parameters: Union[Unset, Dict[str, Any]] = UNSET
138145
if not isinstance(self.preprocessing_parameters, Unset):
@@ -191,6 +198,8 @@ def to_dict(self) -> Dict[str, Any]:
191198
field_dict["localInputID"] = local_input_id
192199
if owner is not UNSET:
193200
field_dict["owner"] = owner
201+
if participants is not UNSET:
202+
field_dict["participants"] = participants
194203
if precision is not UNSET:
195204
field_dict["precision"] = precision
196205
if preprocessing_parameters is not UNSET:
@@ -273,6 +282,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
273282

274283
owner = d.pop("owner", UNSET)
275284

285+
participants = cast(List[str], d.pop("participants", UNSET))
286+
276287
precision = d.pop("precision", UNSET)
277288

278289
_preprocessing_parameters = d.pop("preprocessingParameters", UNSET)
@@ -325,6 +336,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
325336
local_input=local_input,
326337
local_input_id=local_input_id,
327338
owner=owner,
339+
participants=participants,
328340
precision=precision,
329341
preprocessing_parameters=preprocessing_parameters,
330342
project_id=project_id,

src/tuneinsight/api/sdk/models/collective_key_switch.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
1+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
22

33
import attr
44

@@ -48,6 +48,8 @@ class CollectiveKeySwitch:
4848
...}
4949
local_input_id (Union[Unset, str]): Unique identifier of a data object.
5050
owner (Union[Unset, str]): The username of the end user who requested the computation.
51+
participants (Union[Unset, List[str]]): list of preferred participants (using their alias) to run the
52+
computation with.
5153
precision (Union[Unset, None, int]): optional minimum required bit precision to guarantee when aggregating
5254
results.
5355
If the precision is set to `x`, then the user can expect the results error to be bounded by `2^(-x)`
@@ -95,6 +97,7 @@ class CollectiveKeySwitch:
9597
local_input: Union[Unset, "LocalInput"] = UNSET
9698
local_input_id: Union[Unset, str] = UNSET
9799
owner: Union[Unset, str] = UNSET
100+
participants: Union[Unset, List[str]] = UNSET
98101
precision: Union[Unset, None, int] = UNSET
99102
preprocessing_parameters: Union[Unset, "ComputationPreprocessingParameters"] = UNSET
100103
project_id: Union[Unset, str] = UNSET
@@ -138,6 +141,10 @@ def to_dict(self) -> Dict[str, Any]:
138141

139142
local_input_id = self.local_input_id
140143
owner = self.owner
144+
participants: Union[Unset, List[str]] = UNSET
145+
if not isinstance(self.participants, Unset):
146+
participants = self.participants
147+
141148
precision = self.precision
142149
preprocessing_parameters: Union[Unset, Dict[str, Any]] = UNSET
143150
if not isinstance(self.preprocessing_parameters, Unset):
@@ -198,6 +205,8 @@ def to_dict(self) -> Dict[str, Any]:
198205
field_dict["localInputID"] = local_input_id
199206
if owner is not UNSET:
200207
field_dict["owner"] = owner
208+
if participants is not UNSET:
209+
field_dict["participants"] = participants
201210
if precision is not UNSET:
202211
field_dict["precision"] = precision
203212
if preprocessing_parameters is not UNSET:
@@ -284,6 +293,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
284293

285294
owner = d.pop("owner", UNSET)
286295

296+
participants = cast(List[str], d.pop("participants", UNSET))
297+
287298
precision = d.pop("precision", UNSET)
288299

289300
_preprocessing_parameters = d.pop("preprocessingParameters", UNSET)
@@ -339,6 +350,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
339350
local_input=local_input,
340351
local_input_id=local_input_id,
341352
owner=owner,
353+
participants=participants,
342354
precision=precision,
343355
preprocessing_parameters=preprocessing_parameters,
344356
project_id=project_id,

src/tuneinsight/api/sdk/models/computation_definition.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
1+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
22

33
import attr
44

@@ -48,6 +48,8 @@ class ComputationDefinition:
4848
...}
4949
local_input_id (Union[Unset, str]): Unique identifier of a data object.
5050
owner (Union[Unset, str]): The username of the end user who requested the computation.
51+
participants (Union[Unset, List[str]]): list of preferred participants (using their alias) to run the
52+
computation with.
5153
precision (Union[Unset, None, int]): optional minimum required bit precision to guarantee when aggregating
5254
results.
5355
If the precision is set to `x`, then the user can expect the results error to be bounded by `2^(-x)`
@@ -92,6 +94,7 @@ class ComputationDefinition:
9294
local_input: Union[Unset, "LocalInput"] = UNSET
9395
local_input_id: Union[Unset, str] = UNSET
9496
owner: Union[Unset, str] = UNSET
97+
participants: Union[Unset, List[str]] = UNSET
9598
precision: Union[Unset, None, int] = UNSET
9699
preprocessing_parameters: Union[Unset, "ComputationPreprocessingParameters"] = UNSET
97100
project_id: Union[Unset, str] = UNSET
@@ -132,6 +135,10 @@ def to_dict(self) -> Dict[str, Any]:
132135

133136
local_input_id = self.local_input_id
134137
owner = self.owner
138+
participants: Union[Unset, List[str]] = UNSET
139+
if not isinstance(self.participants, Unset):
140+
participants = self.participants
141+
135142
precision = self.precision
136143
preprocessing_parameters: Union[Unset, Dict[str, Any]] = UNSET
137144
if not isinstance(self.preprocessing_parameters, Unset):
@@ -189,6 +196,8 @@ def to_dict(self) -> Dict[str, Any]:
189196
field_dict["localInputID"] = local_input_id
190197
if owner is not UNSET:
191198
field_dict["owner"] = owner
199+
if participants is not UNSET:
200+
field_dict["participants"] = participants
192201
if precision is not UNSET:
193202
field_dict["precision"] = precision
194203
if preprocessing_parameters is not UNSET:
@@ -269,6 +278,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
269278

270279
owner = d.pop("owner", UNSET)
271280

281+
participants = cast(List[str], d.pop("participants", UNSET))
282+
272283
precision = d.pop("precision", UNSET)
273284

274285
_preprocessing_parameters = d.pop("preprocessingParameters", UNSET)
@@ -319,6 +330,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
319330
local_input=local_input,
320331
local_input_id=local_input_id,
321332
owner=owner,
333+
participants=participants,
322334
precision=precision,
323335
preprocessing_parameters=preprocessing_parameters,
324336
project_id=project_id,

src/tuneinsight/api/sdk/models/cross_standard_query.py

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
if TYPE_CHECKING:
88
from ..models.advanced_filter import AdvancedFilter
9+
from ..models.query_output_variable import QueryOutputVariable
910

1011

1112
T = TypeVar("T", bound="CrossStandardQuery")
@@ -24,13 +25,17 @@ class CrossStandardQuery:
2425
2526
Attributes:
2627
filter_ (Union[Unset, AdvancedFilter]): Abstract subclass of a filter for cross-standard queries.
27-
variables (Union[Unset, List[str]]): The variables to be extracted from the cohort. Each variable should either
28-
be the name
28+
output_variables (Union[Unset, List['QueryOutputVariable']]): The variables to be extracted from the cohort.
29+
Each variable should either be the name
2930
of a feature (directly attached to a record), or a unique identifier defined in a filter
3031
for series variables (variables attached to a record that contain a list of values).
32+
unit (Union[Unset, str]): The unit of the feasibility query (i.e., what is a record -- should be "patient").
33+
variables (Union[Unset, List[str]]): Legacy version of the above output variables
3134
"""
3235

3336
filter_: Union[Unset, "AdvancedFilter"] = UNSET
37+
output_variables: Union[Unset, List["QueryOutputVariable"]] = UNSET
38+
unit: Union[Unset, str] = UNSET
3439
variables: Union[Unset, List[str]] = UNSET
3540
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
3641

@@ -39,6 +44,15 @@ def to_dict(self) -> Dict[str, Any]:
3944
if not isinstance(self.filter_, Unset):
4045
filter_ = self.filter_.to_dict()
4146

47+
output_variables: Union[Unset, List[Dict[str, Any]]] = UNSET
48+
if not isinstance(self.output_variables, Unset):
49+
output_variables = []
50+
for output_variables_item_data in self.output_variables:
51+
output_variables_item = output_variables_item_data.to_dict()
52+
53+
output_variables.append(output_variables_item)
54+
55+
unit = self.unit
4256
variables: Union[Unset, List[str]] = UNSET
4357
if not isinstance(self.variables, Unset):
4458
variables = self.variables
@@ -48,6 +62,10 @@ def to_dict(self) -> Dict[str, Any]:
4862
field_dict.update({})
4963
if filter_ is not UNSET:
5064
field_dict["filter"] = filter_
65+
if output_variables is not UNSET:
66+
field_dict["outputVariables"] = output_variables
67+
if unit is not UNSET:
68+
field_dict["unit"] = unit
5169
if variables is not UNSET:
5270
field_dict["variables"] = variables
5371

@@ -56,6 +74,7 @@ def to_dict(self) -> Dict[str, Any]:
5674
@classmethod
5775
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
5876
from ..models.advanced_filter import AdvancedFilter
77+
from ..models.query_output_variable import QueryOutputVariable
5978

6079
d = src_dict.copy()
6180
_filter_ = d.pop("filter", UNSET)
@@ -65,10 +84,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
6584
else:
6685
filter_ = AdvancedFilter.from_dict(_filter_)
6786

87+
output_variables = []
88+
_output_variables = d.pop("outputVariables", UNSET)
89+
for output_variables_item_data in _output_variables or []:
90+
output_variables_item = QueryOutputVariable.from_dict(output_variables_item_data)
91+
92+
output_variables.append(output_variables_item)
93+
94+
unit = d.pop("unit", UNSET)
95+
6896
variables = cast(List[str], d.pop("variables", UNSET))
6997

7098
cross_standard_query = cls(
7199
filter_=filter_,
100+
output_variables=output_variables,
101+
unit=unit,
72102
variables=variables,
73103
)
74104

src/tuneinsight/api/sdk/models/data_schema.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ class DataSchema:
1616
"""aims to provide a flexible definition of a data schema, which includes the tables and their relationships.
1717
1818
Attributes:
19+
name (Union[Unset, str]): optional name for the schema.
1920
tables (Union[Unset, List['SchemaTable']]):
2021
"""
2122

23+
name: Union[Unset, str] = UNSET
2224
tables: Union[Unset, List["SchemaTable"]] = UNSET
2325
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
2426

2527
def to_dict(self) -> Dict[str, Any]:
28+
name = self.name
2629
tables: Union[Unset, List[Dict[str, Any]]] = UNSET
2730
if not isinstance(self.tables, Unset):
2831
tables = []
@@ -34,6 +37,8 @@ def to_dict(self) -> Dict[str, Any]:
3437
field_dict: Dict[str, Any] = {}
3538
field_dict.update(self.additional_properties)
3639
field_dict.update({})
40+
if name is not UNSET:
41+
field_dict["name"] = name
3742
if tables is not UNSET:
3843
field_dict["tables"] = tables
3944

@@ -44,6 +49,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
4449
from ..models.schema_table import SchemaTable
4550

4651
d = src_dict.copy()
52+
name = d.pop("name", UNSET)
53+
4754
tables = []
4855
_tables = d.pop("tables", UNSET)
4956
for tables_item_data in _tables or []:
@@ -52,6 +59,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
5259
tables.append(tables_item)
5360

5461
data_schema = cls(
62+
name=name,
5563
tables=tables,
5664
)
5765

0 commit comments

Comments
 (0)