dve-lumipy-testing 1.0.490__py3-none-any.whl → 1.0.492__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dve_lumipy_testing-1.0.490.dist-info → dve_lumipy_testing-1.0.492.dist-info}/METADATA +1 -1
- {dve_lumipy_testing-1.0.490.dist-info → dve_lumipy_testing-1.0.492.dist-info}/RECORD +9 -9
- lumipy/client.py +33 -14
- lumipy/lumiflex/_metadata/dtype.py +1 -1
- lumipy/lumiflex/_table/operation.py +20 -4
- lumipy/provider/max_version.py +1 -1
- {dve_lumipy_testing-1.0.490.dist-info → dve_lumipy_testing-1.0.492.dist-info}/WHEEL +0 -0
- {dve_lumipy_testing-1.0.490.dist-info → dve_lumipy_testing-1.0.492.dist-info}/entry_points.txt +0 -0
- {dve_lumipy_testing-1.0.490.dist-info → dve_lumipy_testing-1.0.492.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
lumipy/__init__.py,sha256=Ei0SkyOIPS-aC-ZSdaHwfiH7xWMBelLY-EXJ0--jzUo,443
|
|
2
2
|
lumipy/_config_manager.py,sha256=0ziIk7EyZb44uDw84Pw9UBrY9PmcMYe92WbgF58xylM,8675
|
|
3
|
-
lumipy/client.py,sha256=
|
|
3
|
+
lumipy/client.py,sha256=r1Yk8vIUb34qQWFaGWb-omtVndg3lTiL7Wi3lbqbDls,23201
|
|
4
4
|
lumipy/common.py,sha256=wMCeQ8SdCdPiAqyHmVCTy8Wpxs8uJU7sSbYkgu3k5Ls,1701
|
|
5
5
|
lumipy/query_job.py,sha256=f13vvK1n4czNNg0Jxq8ACrVHdZ20bRQi2rAV_HlfKBA,5395
|
|
6
6
|
lumipy/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -44,7 +44,7 @@ lumipy/lumiflex/_common/node.py,sha256=F9b70oGK4laKevzXVSYQNhHEtQnXloX7i-5dNxw-w
|
|
|
44
44
|
lumipy/lumiflex/_common/str_utils.py,sha256=nWVC_LYyGHl5bnICLypa3MuQvJ103em-Cj_0CiICLcg,1387
|
|
45
45
|
lumipy/lumiflex/_common/widgets.py,sha256=ej2G981apfmwE4NUSgFRX9F4D6BD9fi4YWAm5FmrT_0,2034
|
|
46
46
|
lumipy/lumiflex/_metadata/__init__.py,sha256=tegc409IH_54zs8BQdFvlmnGQ9Oh1Bd_rRVxb5weojM,92
|
|
47
|
-
lumipy/lumiflex/_metadata/dtype.py,sha256=
|
|
47
|
+
lumipy/lumiflex/_metadata/dtype.py,sha256=ifbCqe5QJorTy9F9c8GvJ8qF--wxT1u8nuv-EgVHSig,4707
|
|
48
48
|
lumipy/lumiflex/_metadata/field.py,sha256=a3lDl_HhJ27qlf2NugjbS_JwlLFTYS-z9hipcfte79U,4041
|
|
49
49
|
lumipy/lumiflex/_metadata/table.py,sha256=_2bOlxw5GKzUra9xwa2wFhJAyrUkzvdjZ_eNF1Ceflk,9442
|
|
50
50
|
lumipy/lumiflex/_metadata/var_name.py,sha256=_EB1Sdk-TVogsUpHRrq4GuYmOg4nbCPFljcVBbeJ03c,508
|
|
@@ -57,7 +57,7 @@ lumipy/lumiflex/_table/__init__.py,sha256=FdLm71ndJXKlXjp8zxRrgnmVtIC1RoGrHO1J6B
|
|
|
57
57
|
lumipy/lumiflex/_table/base_table.py,sha256=TdNmDCrx2nhmJKE4iFI_vWGgq6YEOVaFZ8ZkIVGunvE,8969
|
|
58
58
|
lumipy/lumiflex/_table/content.py,sha256=yrMUNvD0pQkh-0XyusfHjSvVyctjPMn2miSiDKwebfc,7519
|
|
59
59
|
lumipy/lumiflex/_table/join.py,sha256=KrzBjB0CtHLKSYX4D1QN6BOaR8Ct9ADQz7ia9g3LF78,7407
|
|
60
|
-
lumipy/lumiflex/_table/operation.py,sha256=
|
|
60
|
+
lumipy/lumiflex/_table/operation.py,sha256=V9BttjaYY-8CTklgc1CqFhLYMy8xKam7GOfgDgBLnnw,33873
|
|
61
61
|
lumipy/lumiflex/_table/parameter.py,sha256=7P6RbI8OCMxXZhpgAOSd0oHJW8X1wlfxKPHXBBpimcs,1757
|
|
62
62
|
lumipy/lumiflex/_table/variable.py,sha256=iqoUqY-AQpHua69VsHciNELppmsDtYbAgb2-9ZEz-cI,9637
|
|
63
63
|
lumipy/lumiflex/_table/widgets.py,sha256=wCjNE5WXo8DaH7qVlY7WRNQf4dLWweme6uhV5_6_Eh8,2926
|
|
@@ -78,7 +78,7 @@ lumipy/provider/common.py,sha256=95210WHs_s2PmFqQBFeIFHm3KeJVbTsy8kOLysvkvD4,696
|
|
|
78
78
|
lumipy/provider/context.py,sha256=VwsHZO46HP3G9BN4Eot_jQlbfETGKyNg2vG5wm1zL_4,5401
|
|
79
79
|
lumipy/provider/factory.py,sha256=QFuSCT_byJwbFmHF669I2iz0vLAF0T9Or1ghIEUZ0ok,9257
|
|
80
80
|
lumipy/provider/manager.py,sha256=A4bxCO__m5nc9GL8veOLtySbK1giMNDMml_r3B-q8y8,7218
|
|
81
|
-
lumipy/provider/max_version.py,sha256=
|
|
81
|
+
lumipy/provider/max_version.py,sha256=spf8rhyti1KyMQxBj4HEzcb653EZo1DaRuoeLDe85wo,28
|
|
82
82
|
lumipy/provider/metadata.py,sha256=WGfMv_tLn5W29-zMKipqBpueroe0eF-w9Hj_6QRdZAI,5483
|
|
83
83
|
lumipy/provider/provider_sets.py,sha256=Z_VyiN2dBP1xuIdRiuGgyzLD7LfO4wxFvodprME2Uls,1478
|
|
84
84
|
lumipy/provider/implementation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -379,8 +379,8 @@ lumipy/test/unit/provider_tests/test_provider_factory.py,sha256=ICHlEiYS-GvKFoI5
|
|
|
379
379
|
lumipy/test/unit/provider_tests/test_provider_manager.py,sha256=-TT-3ZGpDsFKMz4efWIy7TGAUVtZ2gTDa67DiorIioc,13456
|
|
380
380
|
lumipy/test/unit/queryjob_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
381
381
|
lumipy/test/unit/queryjob_tests/test_queryjob.py,sha256=CVcMaezQ578Qh_5sukr6BqKMHJxs9Pawiik0J1rVObo,1539
|
|
382
|
-
dve_lumipy_testing-1.0.
|
|
383
|
-
dve_lumipy_testing-1.0.
|
|
384
|
-
dve_lumipy_testing-1.0.
|
|
385
|
-
dve_lumipy_testing-1.0.
|
|
386
|
-
dve_lumipy_testing-1.0.
|
|
382
|
+
dve_lumipy_testing-1.0.492.dist-info/METADATA,sha256=VuZ5POqq7NOhYA_EluLmHC3frVNs64DLZrqXyPrm3IQ,14827
|
|
383
|
+
dve_lumipy_testing-1.0.492.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
384
|
+
dve_lumipy_testing-1.0.492.dist-info/entry_points.txt,sha256=L7hRlqwmvzHMwaOQzygKLK-gx4k4e1q4Qz5m0DGihW8,46
|
|
385
|
+
dve_lumipy_testing-1.0.492.dist-info/top_level.txt,sha256=DVww8LaQM3Xm0WOgo4JE0epePgCM1xGWWWxh7wuv-CY,7
|
|
386
|
+
dve_lumipy_testing-1.0.492.dist-info/RECORD,,
|
lumipy/client.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ast
|
|
1
2
|
import asyncio
|
|
2
3
|
import io
|
|
3
4
|
import json
|
|
@@ -126,7 +127,9 @@ class Client:
|
|
|
126
127
|
Returns:
|
|
127
128
|
DataFrame: dataframe containing table field catalog information.
|
|
128
129
|
"""
|
|
129
|
-
|
|
130
|
+
res = self._catalog_api.get_catalog()
|
|
131
|
+
d = ast.literal_eval(res)
|
|
132
|
+
return pd.DataFrame(d)
|
|
130
133
|
|
|
131
134
|
def query_and_fetch(
|
|
132
135
|
self,
|
|
@@ -170,7 +173,14 @@ class Client:
|
|
|
170
173
|
"""
|
|
171
174
|
return self._design_api.put_query_to_format(body=_add_lumipy_tag(sql), **pretty_params)
|
|
172
175
|
|
|
173
|
-
def start_query(
|
|
176
|
+
def start_query(
|
|
177
|
+
self,
|
|
178
|
+
sql: str,
|
|
179
|
+
name: Optional[str] = "query",
|
|
180
|
+
timeout: Optional[int] = 3600,
|
|
181
|
+
keep_for: Optional[int] = 7200,
|
|
182
|
+
correlation_id: Optional[str] = None,
|
|
183
|
+
) -> str:
|
|
174
184
|
"""Send an asynchronous query to Luminesce. Starts the query but does not wait and fetch the result.
|
|
175
185
|
|
|
176
186
|
Args:
|
|
@@ -178,19 +188,26 @@ class Client:
|
|
|
178
188
|
name (str): name of the query (defaults to just 'query')
|
|
179
189
|
timeout (int): max time for the query to run in seconds (defaults to 3600)
|
|
180
190
|
keep_for (int): time to keep the query result for in seconds (defaults to 7200)
|
|
191
|
+
correlation_id (str): optional correlation id for the query (defaults to None)
|
|
181
192
|
|
|
182
193
|
Returns:
|
|
183
194
|
str: string containing the execution ID
|
|
184
195
|
|
|
185
196
|
"""
|
|
186
|
-
|
|
197
|
+
if correlation_id:
|
|
198
|
+
headers_kw = {"_headers": {"CorrelationId": correlation_id, "X-LUSID-Application": "luminesce/lumipy"}}
|
|
199
|
+
else:
|
|
200
|
+
headers_kw = {}
|
|
201
|
+
|
|
202
|
+
res = self._sql_bkg_exec_api.start_query_with_http_info(
|
|
187
203
|
body=_add_lumipy_tag(sql),
|
|
188
204
|
query_name=name,
|
|
189
205
|
timeout_seconds=timeout,
|
|
190
|
-
keep_for_seconds=keep_for
|
|
206
|
+
keep_for_seconds=keep_for,
|
|
207
|
+
**headers_kw,
|
|
191
208
|
)
|
|
192
209
|
|
|
193
|
-
return res.execution_id
|
|
210
|
+
return res.data.execution_id
|
|
194
211
|
|
|
195
212
|
def get_status(self, execution_id: str) -> Dict[str, str]:
|
|
196
213
|
"""Get the status of a Luminesce query
|
|
@@ -280,14 +297,15 @@ class Client:
|
|
|
280
297
|
""")
|
|
281
298
|
|
|
282
299
|
def run(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
300
|
+
self,
|
|
301
|
+
sql: str,
|
|
302
|
+
timeout: Optional[int] = 3600,
|
|
303
|
+
keep_for: Optional[int] = 7200,
|
|
304
|
+
quiet: Optional[bool] = False,
|
|
305
|
+
return_job: Optional[bool] = False,
|
|
306
|
+
correlation_id: Optional[str] = None,
|
|
307
|
+
_print_fn: Optional[Callable] = None,
|
|
308
|
+
**read_csv_params,
|
|
291
309
|
) -> DataFrame:
|
|
292
310
|
"""Run a sql string in Luminesce. This method can either run synchonously which will print query progress to the
|
|
293
311
|
screen and then return the result or return a QueryJob instance that allows you to manage the query job yourself.
|
|
@@ -299,6 +317,7 @@ class Client:
|
|
|
299
317
|
quiet (Optional[bool]): whether to print query progress or not
|
|
300
318
|
return_job (Optional[bool]): whether to return a QueryJob instance or to wait until completion and return
|
|
301
319
|
the result as a pandas dataframe
|
|
320
|
+
correlation_id: a correlation id for the query (defaults to None)
|
|
302
321
|
_print_fn (Optional[Callable]): alternative print function for showing progress. This is mainly for internal use with
|
|
303
322
|
the streamlit utility functions that show query progress in a cell. Defaults to the normal python print() fn.
|
|
304
323
|
**read_csv_params (Any): keyword arguments to pass down to pandas read_csv. See https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
|
|
@@ -308,7 +327,7 @@ class Client:
|
|
|
308
327
|
represents the running query.
|
|
309
328
|
|
|
310
329
|
"""
|
|
311
|
-
ex_id = self.start_query(sql, timeout=timeout, keep_for=keep_for)
|
|
330
|
+
ex_id = self.start_query(sql, timeout=timeout, keep_for=keep_for, correlation_id=correlation_id)
|
|
312
331
|
job = QueryJob(ex_id, client=self, _print_fn=_print_fn)
|
|
313
332
|
if return_job:
|
|
314
333
|
return job
|
|
@@ -141,7 +141,7 @@ class DType(Enum):
|
|
|
141
141
|
if self == DType.Double:
|
|
142
142
|
return lambda c: c.astype(np.float64)
|
|
143
143
|
if self == DType.Boolean:
|
|
144
|
-
return lambda c: c.replace(bool_map).astype(pd.BooleanDtype())
|
|
144
|
+
return lambda c: c.replace(bool_map).infer_objects(copy=False).astype(pd.BooleanDtype())
|
|
145
145
|
if self == DType.Decimal:
|
|
146
146
|
return lambda c: c.astype(np.float64)
|
|
147
147
|
if self == DType.Date or self == DType.DateTime:
|
|
@@ -35,13 +35,20 @@ class TableOperation(Node, ABC):
|
|
|
35
35
|
def content(self):
|
|
36
36
|
return self.get_parents()[-1]
|
|
37
37
|
|
|
38
|
-
def go(
|
|
38
|
+
def go(
|
|
39
|
+
self,
|
|
40
|
+
timeout: Optional[int] = 3600,
|
|
41
|
+
keep_for: Optional[int] = 7200,
|
|
42
|
+
quiet: Optional[bool] = False,
|
|
43
|
+
correlation_id: Optional[str] = None,
|
|
44
|
+
) -> DataFrame:
|
|
39
45
|
"""Send query off to Luminesce, monitor progress and then get the result back as a pandas dataframe.
|
|
40
46
|
|
|
41
47
|
Args:
|
|
42
48
|
timeout (Optional[int]): max time for the query to run in seconds (defaults to 3600)
|
|
43
49
|
keep_for (Optional[int]): time to keep the query result for in seconds (defaults to 7200)
|
|
44
50
|
quiet (Optional[bool]): whether to print query progress or not
|
|
51
|
+
correlation_id (Optional[str]): correlation id for the query (defaults to None)
|
|
45
52
|
|
|
46
53
|
Returns:
|
|
47
54
|
DataFrame: the result of the query as a pandas dataframe.
|
|
@@ -50,15 +57,23 @@ class TableOperation(Node, ABC):
|
|
|
50
57
|
f"-- built with fluent syntax\n{self.get_sql()}",
|
|
51
58
|
timeout=timeout,
|
|
52
59
|
keep_for=keep_for,
|
|
53
|
-
quiet=quiet
|
|
60
|
+
quiet=quiet,
|
|
61
|
+
correlation_id=correlation_id,
|
|
54
62
|
)
|
|
55
63
|
|
|
56
|
-
def go_async(
|
|
64
|
+
def go_async(
|
|
65
|
+
self,
|
|
66
|
+
timeout: Optional[int] = 3600,
|
|
67
|
+
keep_for: Optional[int] = 7200,
|
|
68
|
+
correlation_id: Optional[str] = None,
|
|
69
|
+
_print_fn: Optional[Callable] = None,
|
|
70
|
+
):
|
|
57
71
|
"""Just send the query to luminesce. Don't monitor progress or fetch result, just return a job object.
|
|
58
72
|
|
|
59
73
|
Args:
|
|
60
74
|
timeout (Optional[int]): max time for the query to run in seconds (defaults to 3600)
|
|
61
75
|
keep_for (Optional[int]): time to keep the query result for in seconds (defaults to 7200)
|
|
76
|
+
correlation_id (Optional[int]): optional correlation id for the query (defaults to None)
|
|
62
77
|
_print_fn (Optional[callable]): alternative print function for showing progress. This is mainly for internal use with
|
|
63
78
|
the streamlit utility functions that show query progress in a cell. Defaults to the normal python print() fn.
|
|
64
79
|
|
|
@@ -70,7 +85,8 @@ class TableOperation(Node, ABC):
|
|
|
70
85
|
timeout=timeout,
|
|
71
86
|
keep_for=keep_for,
|
|
72
87
|
return_job=True,
|
|
73
|
-
|
|
88
|
+
correlation_id=correlation_id,
|
|
89
|
+
_print_fn=_print_fn,
|
|
74
90
|
)
|
|
75
91
|
|
|
76
92
|
def get_sql(self) -> str:
|
lumipy/provider/max_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
max_version_str = '1.18.
|
|
1
|
+
max_version_str = '1.18.723'
|
|
File without changes
|
{dve_lumipy_testing-1.0.490.dist-info → dve_lumipy_testing-1.0.492.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|