qmenta-client 1.1.dev1337__py3-none-any.whl → 1.1.dev1349__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 +74 -27
- {qmenta_client-1.1.dev1337.dist-info → qmenta_client-1.1.dev1349.dist-info}/METADATA +1 -1
- {qmenta_client-1.1.dev1337.dist-info → qmenta_client-1.1.dev1349.dist-info}/RECORD +4 -4
- {qmenta_client-1.1.dev1337.dist-info → qmenta_client-1.1.dev1349.dist-info}/WHEEL +0 -0
qmenta/client/Project.py
CHANGED
|
@@ -675,10 +675,27 @@ class Project:
|
|
|
675
675
|
return data["fields"]
|
|
676
676
|
|
|
677
677
|
def get_analysis(self, analysis_name_or_id):
|
|
678
|
+
"""
|
|
679
|
+
Returns the analysis corresponding with the analysis id or analysis name
|
|
680
|
+
|
|
681
|
+
Parameters
|
|
682
|
+
----------
|
|
683
|
+
analysis_name_or_id : int, str
|
|
684
|
+
analysis_id or analysis name to search for
|
|
685
|
+
|
|
686
|
+
Returns
|
|
687
|
+
-------
|
|
688
|
+
analysis: dict
|
|
689
|
+
A dictionary containing the analysis information
|
|
690
|
+
"""
|
|
678
691
|
if isinstance(analysis_name_or_id, int):
|
|
679
692
|
search_tag = "id"
|
|
680
693
|
elif isinstance(analysis_name_or_id, str):
|
|
681
|
-
|
|
694
|
+
if analysis_name_or_id.isdigit():
|
|
695
|
+
search_tag = "id"
|
|
696
|
+
analysis_name_or_id = int(analysis_name_or_id)
|
|
697
|
+
else:
|
|
698
|
+
search_tag = "p_n"
|
|
682
699
|
else:
|
|
683
700
|
raise Exception("The analysis identifier must be its name or an " "integer")
|
|
684
701
|
|
|
@@ -698,32 +715,37 @@ class Project:
|
|
|
698
715
|
|
|
699
716
|
def list_analysis(self, search_condition={}, items=(0, 9999)):
|
|
700
717
|
"""
|
|
701
|
-
List the analysis available to the user
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
718
|
+
List the analysis available to the user.\n
|
|
719
|
+
|
|
720
|
+
Examples
|
|
721
|
+
--------
|
|
722
|
+
|
|
723
|
+
>>> search_condition = {
|
|
724
|
+
"secret_name":"014_S_6920",
|
|
725
|
+
"from_d": "06.02.2025",
|
|
726
|
+
"with_child_analysis": 1,
|
|
727
|
+
"state": "completed"
|
|
708
728
|
}
|
|
729
|
+
list_analysis(search_condition=search_condition)
|
|
709
730
|
|
|
710
731
|
Parameters
|
|
711
732
|
----------
|
|
712
733
|
search_condition : dict
|
|
713
|
-
p_n: str
|
|
714
|
-
type: str
|
|
715
|
-
from_d: str
|
|
716
|
-
to_d: str
|
|
717
|
-
qa_status: str
|
|
718
|
-
secret_name: str
|
|
719
|
-
tags: str
|
|
720
|
-
with_child_analysis: 1
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
734
|
+
- p_n: str Analysis name
|
|
735
|
+
- type: str Type
|
|
736
|
+
- from_d: str dd.mm.yyyy Date from
|
|
737
|
+
- to_d: str dd.mm.yyyy Date to
|
|
738
|
+
- qa_status: str pass/fail/nd QC status
|
|
739
|
+
- secret_name: str Subject ID
|
|
740
|
+
- tags: str
|
|
741
|
+
- with_child_analysis: 1 if 1, child analysis of workflows will appear
|
|
742
|
+
- id: str ID
|
|
743
|
+
- state: running, completed, pending, exception
|
|
744
|
+
- username: str
|
|
745
|
+
|
|
746
|
+
items : List[int]
|
|
747
|
+
list containing two elements [min, max] that correspond to the
|
|
748
|
+
mininum and maximum range of analysis listed
|
|
727
749
|
|
|
728
750
|
Returns
|
|
729
751
|
-------
|
|
@@ -842,23 +864,48 @@ class Project:
|
|
|
842
864
|
]
|
|
843
865
|
return containers
|
|
844
866
|
|
|
845
|
-
def list_result_containers(self,
|
|
867
|
+
def list_result_containers(self, search_condition={}, items=(0, 9999)):
|
|
846
868
|
"""
|
|
847
869
|
List the result containers available to the user.
|
|
870
|
+
Examples
|
|
871
|
+
--------
|
|
872
|
+
|
|
873
|
+
>>> search_condition = {
|
|
874
|
+
"secret_name":"014_S_6920",
|
|
875
|
+
"from_d": "06.02.2025",
|
|
876
|
+
"with_child_analysis": 1,
|
|
877
|
+
"state": "completed"
|
|
878
|
+
}
|
|
879
|
+
list_result_containers(search_condition=search_condition)
|
|
848
880
|
|
|
849
881
|
Parameters
|
|
850
882
|
----------
|
|
851
|
-
|
|
852
|
-
|
|
883
|
+
search_condition : dict
|
|
884
|
+
- p_n: str Analysis name
|
|
885
|
+
- type: str Type
|
|
886
|
+
- from_d: str dd.mm.yyyy Date from
|
|
887
|
+
- to_d: str dd.mm.yyyy Date to
|
|
888
|
+
- qa_status: str pass/fail/nd QC status
|
|
889
|
+
- secret_name: str Subject ID
|
|
890
|
+
- tags: str
|
|
891
|
+
- with_child_analysis: 1 if 1, child analysis of workflows will appear
|
|
892
|
+
- id: str ID
|
|
893
|
+
- state: running, completed, pending, exception
|
|
894
|
+
- username: str
|
|
895
|
+
items : List[int]
|
|
896
|
+
list containing two elements [min, max] that correspond to the
|
|
897
|
+
mininum and maximum range of analysis listed
|
|
853
898
|
|
|
854
899
|
Returns
|
|
855
900
|
-------
|
|
856
901
|
dict
|
|
857
902
|
List of containers, each a dictionary
|
|
858
903
|
{"name": "container-name", "id": "container_id"}
|
|
904
|
+
if "id": None, that analysis did not had an output container,
|
|
905
|
+
probably it is a workflow
|
|
859
906
|
"""
|
|
860
|
-
|
|
861
|
-
return [{"name":
|
|
907
|
+
analyses = self.list_analysis(search_condition, items)
|
|
908
|
+
return [{"name": analysis["name"], "id": (analysis.get("out_container_id") or None)} for analysis in analyses]
|
|
862
909
|
|
|
863
910
|
def list_container_files(
|
|
864
911
|
self,
|
|
@@ -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=xk-C4kf2i7RLsIp3fiwHQzlEOZpb1sL-KqxGqDex8Mc,76953
|
|
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.dev1349.dist-info/METADATA,sha256=RBQVZKHts7FiBDWvv9C5Nf6lCj8I5YH6N_shy1JRBsc,672
|
|
9
|
+
qmenta_client-1.1.dev1349.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
10
|
+
qmenta_client-1.1.dev1349.dist-info/RECORD,,
|
|
File without changes
|