qmenta-client 1.1.dev1230__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
@@ -329,12 +329,32 @@ class Project:
329
329
  else:
330
330
  return None
331
331
 
332
- def list_analysis(self, limit=10000000):
332
+ def list_analysis(self, search_condition={}, items=(0, 9999)):
333
333
  """
334
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
+ }
335
342
 
336
343
  Parameters
337
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 #
338
358
  limit : int
339
359
  Max number of results
340
360
 
@@ -343,11 +363,44 @@ class Project:
343
363
  dict
344
364
  List of analysis, each a dictionary
345
365
  """
346
- req_headers = {"X-Range": "items=0-" + str(limit - 1)}
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}"}
347
399
  return platform.parse_response(platform.post(
348
400
  auth=self._account.auth,
349
401
  endpoint="analysis_manager/get_analysis_list",
350
- headers=req_headers
402
+ headers=req_headers,
403
+ data=search_condition
351
404
  ))
352
405
 
353
406
  def get_container(self, subject_name):
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: qmenta-client
3
- Version: 1.1.dev1230
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=rxOd03sZXCrZjHbxQlgV7qbEXc2STX-sTSXprBKkIOA,48357
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.dev1230.dist-info/METADATA,sha256=GVsXH4eCCog-jbYRrB-vthtUbOnvsemdnc-yAmeNdak,609
9
- qmenta_client-1.1.dev1230.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
10
- qmenta_client-1.1.dev1230.dist-info/RECORD,,
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 2.0.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any