qmenta-client 1.1.dev1226__py3-none-any.whl → 1.1.dev1245__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.
qmenta/client/Project.py
CHANGED
|
@@ -91,15 +91,16 @@ class Project:
|
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
93
|
def __init__(self, account: Account, project_id, max_upload_retries=5):
|
|
94
|
-
|
|
95
94
|
# if project_id is a string (the name of the project), get the
|
|
96
95
|
# project id (int)
|
|
97
|
-
if
|
|
96
|
+
if isinstance(project_id, str):
|
|
98
97
|
project_name = project_id
|
|
99
98
|
project_id = next(iter(filter(
|
|
100
99
|
lambda proj: proj["name"] == project_id, account.projects)
|
|
101
100
|
))["id"]
|
|
102
101
|
else:
|
|
102
|
+
if isinstance(project_id, float):
|
|
103
|
+
project_id = int(project_id)
|
|
103
104
|
project_name = next(iter(filter(
|
|
104
105
|
lambda proj: proj["id"] == project_id, account.projects)
|
|
105
106
|
))["name"]
|
|
@@ -328,12 +329,32 @@ class Project:
|
|
|
328
329
|
else:
|
|
329
330
|
return None
|
|
330
331
|
|
|
331
|
-
def list_analysis(self,
|
|
332
|
+
def list_analysis(self, search_condition={}, items=(0, 9999)):
|
|
332
333
|
"""
|
|
333
334
|
List the analysis available to the user.
|
|
335
|
+
search condition example:
|
|
336
|
+
search_condition = {
|
|
337
|
+
"secret_name":"014_S_6920",
|
|
338
|
+
"from_d": "06.02.2025",
|
|
339
|
+
"with_child_analysis": 1,
|
|
340
|
+
"state": "completed"
|
|
341
|
+
}
|
|
334
342
|
|
|
335
343
|
Parameters
|
|
336
344
|
----------
|
|
345
|
+
search_condition : dict
|
|
346
|
+
p_n: str # analysis_name
|
|
347
|
+
type: str # analysis_type
|
|
348
|
+
from_d: str # dd.mm.yyyy
|
|
349
|
+
to_d: str # dd.mm.yyyy
|
|
350
|
+
qa_status: str # pass/fail/nd
|
|
351
|
+
secret_name: str # Subject_ID
|
|
352
|
+
tags: str #
|
|
353
|
+
with_child_analysis: 1
|
|
354
|
+
# if 1, child analysis of workflows will appear
|
|
355
|
+
id: str # container_id
|
|
356
|
+
state: # running, completed, pending, exception
|
|
357
|
+
username: str #
|
|
337
358
|
limit : int
|
|
338
359
|
Max number of results
|
|
339
360
|
|
|
@@ -342,11 +363,44 @@ class Project:
|
|
|
342
363
|
dict
|
|
343
364
|
List of analysis, each a dictionary
|
|
344
365
|
"""
|
|
345
|
-
|
|
366
|
+
assert len(items) == 2, f"The number of elements in items " \
|
|
367
|
+
f"'{len(items)}' should be equal to two."
|
|
368
|
+
assert all([isinstance(item, int) for item in items]), \
|
|
369
|
+
f"All items elements '{items}' should be integers."
|
|
370
|
+
search_keys = {
|
|
371
|
+
"p_n": str,
|
|
372
|
+
"type": str,
|
|
373
|
+
"from_d": str,
|
|
374
|
+
"to_d": str,
|
|
375
|
+
"qa_status": str,
|
|
376
|
+
"secret_name": str,
|
|
377
|
+
"tags": str,
|
|
378
|
+
"with_child_analysis": int,
|
|
379
|
+
"id": int,
|
|
380
|
+
"state": str,
|
|
381
|
+
"username": str,
|
|
382
|
+
}
|
|
383
|
+
for key in search_condition.keys():
|
|
384
|
+
if key not in search_keys.keys():
|
|
385
|
+
raise Exception(
|
|
386
|
+
(
|
|
387
|
+
f"This key '{key}' is not accepted by this"
|
|
388
|
+
"search condition"
|
|
389
|
+
)
|
|
390
|
+
)
|
|
391
|
+
if not isinstance(search_condition[key], search_keys[key]):
|
|
392
|
+
raise Exception(
|
|
393
|
+
(
|
|
394
|
+
f"The key {key} in the search condition"
|
|
395
|
+
f"is not type {search_keys[key]}"
|
|
396
|
+
)
|
|
397
|
+
)
|
|
398
|
+
req_headers = {"X-Range": f"items={items[0]}-{items[1] - 1}"}
|
|
346
399
|
return platform.parse_response(platform.post(
|
|
347
400
|
auth=self._account.auth,
|
|
348
401
|
endpoint="analysis_manager/get_analysis_list",
|
|
349
|
-
headers=req_headers
|
|
402
|
+
headers=req_headers,
|
|
403
|
+
data=search_condition
|
|
350
404
|
))
|
|
351
405
|
|
|
352
406
|
def get_container(self, subject_name):
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: qmenta-client
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.dev1245
|
|
4
4
|
Summary: Python client lib to interact with the QMENTA platform.
|
|
5
|
-
Home-page: https://www.qmenta.com/
|
|
6
5
|
Author: QMENTA
|
|
7
6
|
Author-email: dev@qmenta.com
|
|
8
7
|
Requires-Python: >=3.10,<4.0
|
|
@@ -12,5 +11,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Requires-Dist: future (>=0.18.2,<0.19.0)
|
|
16
16
|
Requires-Dist: qmenta-core (>=4.0.1,<5.0.0)
|
|
17
|
+
Project-URL: Homepage, https://www.qmenta.com/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
qmenta/__init__.py,sha256=jv2YF__bseklT3OWEzlqJ5qE24c4aWd5F4r0TTjOrWQ,65
|
|
2
2
|
qmenta/client/Account.py,sha256=MEljEy9cmg2uP2FG1d3TZAgfj66EE2_3PQAZ9rvpCXY,9647
|
|
3
3
|
qmenta/client/File.py,sha256=ZgvSqejIosUt4uoX7opUnPnp5XGEaJNMRwFC0mQVB8k,5344
|
|
4
|
-
qmenta/client/Project.py,sha256=
|
|
4
|
+
qmenta/client/Project.py,sha256=hWow6ZjVNh_mAtUs4joLJ801oMfXuBqkxUc3Ov0zuQ4,50310
|
|
5
5
|
qmenta/client/Subject.py,sha256=lhxxVdQ6d-GNoQC8mrJwa4L1f44nJc4PcJtDspmKN7I,8756
|
|
6
6
|
qmenta/client/__init__.py,sha256=AjTojBhZeW5nl0i605KS8S1Gl5tPNc1hdzD47BGNfoI,147
|
|
7
7
|
qmenta/client/utils.py,sha256=5DK2T_HQprrCwLS0Ycm2CjseaYmAUKaJkJvYoW-Rqzc,2479
|
|
8
|
-
qmenta_client-1.1.
|
|
9
|
-
qmenta_client-1.1.
|
|
10
|
-
qmenta_client-1.1.
|
|
8
|
+
qmenta_client-1.1.dev1245.dist-info/METADATA,sha256=HbS0xu5wSlXrV-7QB9Dr_gi0jRwwDj1zTQ0roFEr5p8,672
|
|
9
|
+
qmenta_client-1.1.dev1245.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
10
|
+
qmenta_client-1.1.dev1245.dist-info/RECORD,,
|