qmenta-client 2.1.dev1508__py3-none-any.whl → 2.1.dev1509__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/Account.py +43 -11
- qmenta/client/File.py +44 -12
- qmenta/client/Project.py +849 -322
- qmenta/client/Subject.py +10 -3
- qmenta/client/utils.py +6 -2
- {qmenta_client-2.1.dev1508.dist-info → qmenta_client-2.1.dev1509.dist-info}/METADATA +2 -1
- qmenta_client-2.1.dev1509.dist-info/RECORD +10 -0
- qmenta_client-2.1.dev1508.dist-info/RECORD +0 -10
- {qmenta_client-2.1.dev1508.dist-info → qmenta_client-2.1.dev1509.dist-info}/WHEEL +0 -0
qmenta/client/Subject.py
CHANGED
|
@@ -30,7 +30,9 @@ class Subject:
|
|
|
30
30
|
self._all_data = None
|
|
31
31
|
|
|
32
32
|
def __repr__(self):
|
|
33
|
-
rep = "<Subject {} ({})>".format(
|
|
33
|
+
rep = "<Subject {} ({})>".format(
|
|
34
|
+
self.name, self.project or "No project"
|
|
35
|
+
)
|
|
34
36
|
return rep
|
|
35
37
|
|
|
36
38
|
@property
|
|
@@ -113,7 +115,10 @@ class Subject:
|
|
|
113
115
|
platform.post(
|
|
114
116
|
auth=self.project._account.auth,
|
|
115
117
|
endpoint="patient_manager/get_patient_profile_data",
|
|
116
|
-
data={
|
|
118
|
+
data={
|
|
119
|
+
"patient_id": self.subject_id,
|
|
120
|
+
"patient_secret_name": self.name,
|
|
121
|
+
},
|
|
117
122
|
)
|
|
118
123
|
)
|
|
119
124
|
return self._all_data
|
|
@@ -240,7 +245,9 @@ class Subject:
|
|
|
240
245
|
List of dictionaries with the data of each analysis performed.
|
|
241
246
|
"""
|
|
242
247
|
all_analysis = self.project.list_analysis(limit=10000000)
|
|
243
|
-
return [
|
|
248
|
+
return [
|
|
249
|
+
a for a in all_analysis if a["patient_secret_name"] == self._name
|
|
250
|
+
]
|
|
244
251
|
|
|
245
252
|
def upload_mri(self, path):
|
|
246
253
|
"""
|
qmenta/client/utils.py
CHANGED
|
@@ -67,10 +67,14 @@ def unzip_dicoms(zip_path, output_folder, exclude_members=None):
|
|
|
67
67
|
if exclude_members is not None:
|
|
68
68
|
# Filter members according to the passed exclusion rules
|
|
69
69
|
for exclude_members_rule in exclude_members:
|
|
70
|
-
members = [
|
|
70
|
+
members = [
|
|
71
|
+
x for x in members if not re.match(exclude_members_rule, x)
|
|
72
|
+
]
|
|
71
73
|
|
|
72
74
|
# Extract all files and add them to the list of extracted files
|
|
73
75
|
zfile.extractall(path=output_folder, members=members)
|
|
74
|
-
current_extracted_files = [
|
|
76
|
+
current_extracted_files = [
|
|
77
|
+
os.path.join(output_folder, fpath) for fpath in members
|
|
78
|
+
]
|
|
75
79
|
extracted_files.extend(current_extracted_files)
|
|
76
80
|
os.unlink(zip_path)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: qmenta-client
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.dev1509
|
|
4
4
|
Summary: Python client lib to interact with the QMENTA platform.
|
|
5
5
|
Author: QMENTA
|
|
6
6
|
Author-email: dev@qmenta.com
|
|
@@ -13,5 +13,6 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Requires-Dist: future (>=0.18.2,<0.19.0)
|
|
16
|
+
Requires-Dist: pytest-cov (>=6.1.1,<7.0.0)
|
|
16
17
|
Requires-Dist: qmenta-core (>=4.0.1,<5.0.0)
|
|
17
18
|
Project-URL: Homepage, https://www.qmenta.com/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
qmenta/__init__.py,sha256=ED6jHcYiuYpr_0vjGz0zx2lrrmJT9sDJCzIljoDfmlM,65
|
|
2
|
+
qmenta/client/Account.py,sha256=7oockGEJpbOfESCBXS4I5dWHP78CSJmW1c2F7abpwwY,9936
|
|
3
|
+
qmenta/client/File.py,sha256=kEa6-a6jRz9QGoC186Pu1t6Thn5_XZ1PGrp-zAt1V0M,5440
|
|
4
|
+
qmenta/client/Project.py,sha256=3xWWW1Eo0OZaz5DRqXg4KEZ6QoDHXQKaIvtFuRqojHA,111477
|
|
5
|
+
qmenta/client/Subject.py,sha256=madwhqFpz9su5OAynoLzIRQ6F1camzi6NOlbpWvs4Qk,8803
|
|
6
|
+
qmenta/client/__init__.py,sha256=Mtqe4zf8n3wuwMXSALENQgp5atQY5VcsyXWs2hjBs28,133
|
|
7
|
+
qmenta/client/utils.py,sha256=5DK2T_HQprrCwLS0Ycm2CjseaYmAUKaJkJvYoW-Rqzc,2479
|
|
8
|
+
qmenta_client-2.1.dev1509.dist-info/METADATA,sha256=8CGD2NsFgdiKTvm4ICQjksacE4jQBZrYAb9EwZIQAwA,715
|
|
9
|
+
qmenta_client-2.1.dev1509.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
10
|
+
qmenta_client-2.1.dev1509.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
qmenta/__init__.py,sha256=ED6jHcYiuYpr_0vjGz0zx2lrrmJT9sDJCzIljoDfmlM,65
|
|
2
|
-
qmenta/client/Account.py,sha256=7BOWHtRbHdfpBYQqv9v2m2Fag13pExZSxFsjDA7UsW0,9500
|
|
3
|
-
qmenta/client/File.py,sha256=iCrzrd7rIfjjW2AgMgUoK-ZF2wf-95wCcPKxKw6PGyg,4816
|
|
4
|
-
qmenta/client/Project.py,sha256=TP_CHoyKQsqlQ7AALnjx2kwcgQ-5os26lJGH5XW--5E,101305
|
|
5
|
-
qmenta/client/Subject.py,sha256=b5sg9UFtn11bmPM-xFXP8aehOm_HGxnhgT7IPKbrZnE,8688
|
|
6
|
-
qmenta/client/__init__.py,sha256=Mtqe4zf8n3wuwMXSALENQgp5atQY5VcsyXWs2hjBs28,133
|
|
7
|
-
qmenta/client/utils.py,sha256=vWUAW0r9yDetdlwNo86sdzKn03FNGvwa7D9UtOA3TEc,2419
|
|
8
|
-
qmenta_client-2.1.dev1508.dist-info/METADATA,sha256=zV7x_6f673FhaUoFQ8f_5f42D4VGxojIx0mCwuQP8cg,672
|
|
9
|
-
qmenta_client-2.1.dev1508.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
10
|
-
qmenta_client-2.1.dev1508.dist-info/RECORD,,
|
|
File without changes
|