junifer 0.0.5.dev39__py3-none-any.whl → 0.0.5.dev42__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.
junifer/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.5.dev39'
16
- __version_tuple__ = version_tuple = (0, 0, 5, 'dev39')
15
+ __version__ = version = '0.0.5.dev42'
16
+ __version_tuple__ = version_tuple = (0, 0, 5, 'dev42')
junifer/api/functions.py CHANGED
@@ -5,6 +5,7 @@
5
5
  # Synchon Mandal <s.mandal@fz-juelich.de>
6
6
  # License: AGPL
7
7
 
8
+ import os
8
9
  import shutil
9
10
  import typing
10
11
  from pathlib import Path
@@ -339,12 +340,12 @@ def reset(config: Dict) -> None:
339
340
  storage = config["storage"]
340
341
  storage_uri = Path(storage["uri"])
341
342
  logger.info(f"Deleting {storage_uri.resolve()!s}")
342
- # Delete storage; will be str
343
+ # Delete storage
343
344
  if storage_uri.exists():
344
- # Delete files in the directory
345
- for file in storage_uri.iterdir():
345
+ # Delete files in the job storage directory
346
+ for file in storage_uri.parent.iterdir():
346
347
  file.unlink(missing_ok=True)
347
- # Remove directory
348
+ # Remove job storage directory
348
349
  storage_uri.parent.rmdir()
349
350
 
350
351
  # Fetch job name (if present)
@@ -359,8 +360,9 @@ def reset(config: Dict) -> None:
359
360
  if job_dir.exists():
360
361
  # Remove files and directories
361
362
  shutil.rmtree(job_dir)
362
- # Remove directory
363
- job_dir.parent.rmdir()
363
+ # Remove parent directory (if empty)
364
+ if not next(os.scandir(job_dir.parent), None):
365
+ job_dir.parent.rmdir()
364
366
 
365
367
 
366
368
  def list_elements(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junifer
3
- Version: 0.0.5.dev39
3
+ Version: 0.0.5.dev42
4
4
  Summary: JUelich NeuroImaging FEature extractoR
5
5
  Author-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
6
6
  Maintainer-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
@@ -1,10 +1,10 @@
1
1
  junifer/__init__.py,sha256=x1UR2jUcrUdm2HNl-3Qvyi4UUrU6ms5qm2qcmNY7zZk,391
2
- junifer/_version.py,sha256=l1LfA0OgiHtlGqU1WbRoivsWTb_BlPL87yDQLjByFJY,426
2
+ junifer/_version.py,sha256=GC-Zk4bYfeDF8BRadMXm7umiKtz6yuOvNxmCwdxJoMU,426
3
3
  junifer/stats.py,sha256=jN22_qFvWYBU9ZIMnCSzN4iOscWnWrcrUPIdLeDkV64,6163
4
4
  junifer/api/__init__.py,sha256=pSj8V8tmwOAQ3sshWJfRfB-n3z5bcJj3pHOBX4-8ONc,251
5
5
  junifer/api/cli.py,sha256=wtU7Rv9tDIT-4KQAkG6WxiE6mop3cuz6XxGDewceHPs,15329
6
6
  junifer/api/decorators.py,sha256=8bnwHPAe7VgzKxl--M_e0umdAlTVSzaJQHEJZ5kof5k,2580
7
- junifer/api/functions.py,sha256=29bGcpFueL3mjOcoNWU0xaHpM5aIrRQod-U2o-5_TSs,12938
7
+ junifer/api/functions.py,sha256=zCWLXDZ_cAqRZ5bFeky0KeqBztuoa6L3-djI65tqtpY,13055
8
8
  junifer/api/parser.py,sha256=a3SSC2xO-PF1pqXZXFq8Sh9aVd-dmHolJbCkGyOUTAM,4416
9
9
  junifer/api/utils.py,sha256=dyjTdPMwX9qeCrn8SQT2Pjshfnu-y1FEyujV7lCzvm0,3333
10
10
  junifer/api/queue_context/__init__.py,sha256=_yXJ8woTxLNLoSR3yLxAW7MtC5sa-oCRxewsZ9D3j98,271
@@ -256,10 +256,10 @@ junifer/utils/logging.py,sha256=furcU3XIUpUvnpe4PEwzWWIWgmH4j2ZA4MQdvSGWjj0,9216
256
256
  junifer/utils/tests/test_fs.py,sha256=WQS7cKlKEZ742CIuiOYYpueeAhY9PqlastfDVpVVtvE,923
257
257
  junifer/utils/tests/test_helpers.py,sha256=k5qqfxK8dFyuewTJyR1Qn6-nFaYNuVr0ysc18bfPjyU,929
258
258
  junifer/utils/tests/test_logging.py,sha256=l8oo-AiBV7H6_IzlsNcj__cLeZBUvgIGoaMszD9VaJg,7754
259
- junifer-0.0.5.dev39.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
260
- junifer-0.0.5.dev39.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
261
- junifer-0.0.5.dev39.dist-info/METADATA,sha256=TtMlS1WQvAo-VPc3ntTj7-SSkK4bbFB2MKivxcTPKok,8234
262
- junifer-0.0.5.dev39.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
263
- junifer-0.0.5.dev39.dist-info/entry_points.txt,sha256=DxFvKq0pOqRunAK0FxwJcoDfV1-dZvsFDpD5HRqSDhw,48
264
- junifer-0.0.5.dev39.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
265
- junifer-0.0.5.dev39.dist-info/RECORD,,
259
+ junifer-0.0.5.dev42.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
260
+ junifer-0.0.5.dev42.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
261
+ junifer-0.0.5.dev42.dist-info/METADATA,sha256=jfY04v7LExnFrN28b_6_AxpFz0_YdCK1x_iTqsnKa9M,8234
262
+ junifer-0.0.5.dev42.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
263
+ junifer-0.0.5.dev42.dist-info/entry_points.txt,sha256=DxFvKq0pOqRunAK0FxwJcoDfV1-dZvsFDpD5HRqSDhw,48
264
+ junifer-0.0.5.dev42.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
265
+ junifer-0.0.5.dev42.dist-info/RECORD,,