bio2zarr 0.0.6__py3-none-any.whl → 0.0.9__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.
bio2zarr/_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.6'
16
- __version_tuple__ = version_tuple = (0, 0, 6)
15
+ __version__ = version = '0.0.9'
16
+ __version_tuple__ = version_tuple = (0, 0, 9)
bio2zarr/cli.py CHANGED
@@ -233,7 +233,7 @@ def dexplode_partition(icf_path, partition, verbose):
233
233
  from 0 (inclusive) to the number of paritions returned by dexplode_init (exclusive).
234
234
  """
235
235
  setup_logging(verbose)
236
- vcf.explode_partition(icf_path, partition, show_progress=False)
236
+ vcf.explode_partition(icf_path, partition)
237
237
 
238
238
 
239
239
  @click.command
bio2zarr/core.py CHANGED
@@ -3,6 +3,8 @@ import contextlib
3
3
  import dataclasses
4
4
  import logging
5
5
  import multiprocessing
6
+ import os
7
+ import os.path
6
8
  import threading
7
9
  import time
8
10
 
@@ -45,6 +47,22 @@ def chunk_aligned_slices(z, n, max_chunks=None):
45
47
  return slices
46
48
 
47
49
 
50
+ def du(path):
51
+ """
52
+ Return the total bytes stored at this path.
53
+ """
54
+ total = os.path.getsize(path)
55
+ # pathlib walk method doesn't exist until 3.12 :(
56
+ for root, dirs, files in os.walk(path):
57
+ for lst in [dirs, files]:
58
+ for name in lst:
59
+ fullname = os.path.join(root, name)
60
+ size = os.path.getsize(fullname)
61
+ total += size
62
+ logger.debug(f"du({path}) = {total}")
63
+ return total
64
+
65
+
48
66
  class SynchronousExecutor(cf.Executor):
49
67
  def submit(self, fn, /, *args, **kwargs):
50
68
  future = cf.Future()