qmenta-client 1.1.dev1507__py3-none-any.whl → 2.1.dev1508__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
@@ -376,6 +376,29 @@ class Project:
376
376
  logger.info(message)
377
377
  return True
378
378
 
379
+ def delete_file(self, container_id, filenames):
380
+ """
381
+ Delete a file or files from a container.
382
+ Can be an input or an output container
383
+
384
+ Parameters
385
+ ----------
386
+ container_id : int
387
+ filenames : str or list of str
388
+
389
+ """
390
+ if not isinstance(filenames, str):
391
+ if isinstance(filenames, list):
392
+ if not all([isinstance(f, str) for f in filenames]):
393
+ raise TypeError("Elements of `filenames` must be str")
394
+ filenames = ";".join(filenames)
395
+ else:
396
+ raise TypeError("`filenames` must be str or list of str")
397
+
398
+ platform.post(
399
+ self._account.auth, "file_manager/delete_files", data={"container_id": container_id, "files": filenames}
400
+ )
401
+
379
402
  def upload_mri(self, file_path, subject_name):
380
403
  """
381
404
  Upload new MRI data to the subject.
@@ -2198,7 +2221,8 @@ class Project:
2198
2221
  "failed_rules": 0,
2199
2222
  "subjects_passed": 0,
2200
2223
  "subjects_with_failed": 0,
2201
- "num_passed_files_distribution": defaultdict(int), # How many rules have N passed files
2224
+ "num_passed_files_distribution": defaultdict(int),
2225
+ # How many rules have N passed files
2202
2226
  "file_stats": {"total": 0, "passed": 0, "failed": 0, "pass_percentage": 0.0},
2203
2227
  "condition_failure_rates": defaultdict(lambda: {"count": 0, "percentage": 0.0}),
2204
2228
  "rule_success_rates": defaultdict(lambda: {"passed": 0, "failed": 0, "success_rate": 0.0}),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: qmenta-client
3
- Version: 1.1.dev1507
3
+ Version: 2.1.dev1508
4
4
  Summary: Python client lib to interact with the QMENTA platform.
5
5
  Author: QMENTA
6
6
  Author-email: dev@qmenta.com
@@ -1,10 +1,10 @@
1
1
  qmenta/__init__.py,sha256=ED6jHcYiuYpr_0vjGz0zx2lrrmJT9sDJCzIljoDfmlM,65
2
2
  qmenta/client/Account.py,sha256=7BOWHtRbHdfpBYQqv9v2m2Fag13pExZSxFsjDA7UsW0,9500
3
3
  qmenta/client/File.py,sha256=iCrzrd7rIfjjW2AgMgUoK-ZF2wf-95wCcPKxKw6PGyg,4816
4
- qmenta/client/Project.py,sha256=pV9mW90BzPIMOFauPiAONBIsYJfGsbi_Xabbe9DW32U,100493
4
+ qmenta/client/Project.py,sha256=TP_CHoyKQsqlQ7AALnjx2kwcgQ-5os26lJGH5XW--5E,101305
5
5
  qmenta/client/Subject.py,sha256=b5sg9UFtn11bmPM-xFXP8aehOm_HGxnhgT7IPKbrZnE,8688
6
6
  qmenta/client/__init__.py,sha256=Mtqe4zf8n3wuwMXSALENQgp5atQY5VcsyXWs2hjBs28,133
7
7
  qmenta/client/utils.py,sha256=vWUAW0r9yDetdlwNo86sdzKn03FNGvwa7D9UtOA3TEc,2419
8
- qmenta_client-1.1.dev1507.dist-info/METADATA,sha256=hGQLiIggQT0NX8tOF8VIklAu9VdsOSldflacTNBIo9g,672
9
- qmenta_client-1.1.dev1507.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
10
- qmenta_client-1.1.dev1507.dist-info/RECORD,,
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any