lamindb 0.64.0__py3-none-any.whl → 0.64.1__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.
lamindb/__init__.py CHANGED
@@ -54,7 +54,7 @@ Modules & settings:
54
54
 
55
55
  """
56
56
 
57
- __version__ = "0.64.0" # denote a release candidate for 0.1.0 with 0.1rc1
57
+ __version__ = "0.64.1" # denote a release candidate for 0.1.0 with 0.1rc1
58
58
 
59
59
  import os as _os
60
60
 
lamindb/_artifact.py CHANGED
@@ -201,7 +201,9 @@ def get_stat_dir_gs(path: UPath) -> Tuple[int, str, str, int]:
201
201
 
202
202
  bucket, key, _ = path.fs.split_path(path.as_posix())
203
203
  # assuming this here is the fastest way of querying for many objects
204
- client = gc_storage.Client.create_anonymous_client()
204
+ client = gc_storage.Client(
205
+ credentials=path.fs.credentials.credentials, project=path.fs.project
206
+ )
205
207
  objects = client.Bucket(bucket).list_blobs(prefix=key)
206
208
  sizes, md5s = [], []
207
209
  for object in objects:
@@ -230,18 +232,18 @@ def get_stat_or_artifact(
230
232
  return size, None, None, n_objects
231
233
  stat = path.stat() # one network request
232
234
  if not isinstance(path, LocalPathClasses):
235
+ size, hash, hash_type = None, None, None
233
236
  if stat is not None:
234
237
  if "ETag" in stat: # is file
235
238
  size, hash, hash_type = get_stat_file_cloud(stat)
236
- else: # is directory
237
- assert path.is_dir() # try to remove this network request
239
+ elif path.is_dir():
238
240
  if path.protocol == "s3":
239
241
  size, hash, hash_type, n_objects = get_stat_dir_s3(path)
240
242
  elif path.protocol == "gs":
241
243
  size, hash, hash_type, n_objects = get_stat_dir_gs(path)
242
- else:
244
+ if hash is None:
243
245
  logger.warning(f"did not add hash for {path}")
244
- return size, None, None, n_objects
246
+ return size, hash, hash_type, n_objects
245
247
  else:
246
248
  if path.is_dir():
247
249
  md5s = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamindb
3
- Version: 0.64.0
3
+ Version: 0.64.1
4
4
  Summary: A data framework for biology.
5
5
  Author-email: Lamin Labs <open-source@lamin.ai>
6
6
  Requires-Python: >=3.8
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3.8
9
9
  Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Requires-Dist: lnschema_core==0.58.1
12
- Requires-Dist: lamindb_setup==0.61.3
12
+ Requires-Dist: lamindb_setup==0.61.4
13
13
  Requires-Dist: lamin_utils==0.12.0
14
14
  Requires-Dist: lamin_cli==0.3.0
15
15
  Requires-Dist: rapidfuzz
@@ -1,5 +1,5 @@
1
- lamindb/__init__.py,sha256=tpG4g8cCspyklxN2NX8KCB50dDCi9s8NHqho95L6PiM,2826
2
- lamindb/_artifact.py,sha256=LmSBu2yFFX5o6RjgCkwdDFX2QQbjBsh2di7UaVVLato,38450
1
+ lamindb/__init__.py,sha256=p8sA7vnVgcf5Xi8zfLL9d3iftj3msKBrxApZf5s73zE,2826
2
+ lamindb/_artifact.py,sha256=BbZ9DmCUr94qB39m3QwID0WiasXIbHh6P2MeK5NmqeQ,38496
3
3
  lamindb/_dataset.py,sha256=7LmHG-Ax3TO0wVJTis8wTijRjjYmWvyiwO2tpkC5z9s,17057
4
4
  lamindb/_delete.py,sha256=29bZ9l_TiXT5fl1KY9mqdAVJsEqQCqunB_XhmS2BUbg,1976
5
5
  lamindb/_feature.py,sha256=X5PygRkAHAI_vhgVXnSq9vEmB8kjRYhge2CuNhuWUKs,5970
@@ -42,7 +42,7 @@ lamindb/dev/storage/file.py,sha256=gZ_Px3wjD-mkqHT-lr0xxM2datbE447qR2U0wkmza3o,5
42
42
  lamindb/dev/storage/object.py,sha256=KGuOwwYuN2yCJxTXn9v0LanC0fjKwy_62P-WksHcf40,1140
43
43
  lamindb/setup/__init__.py,sha256=8-0F2C4Glx23-b8-D_1CBGgRBM5PppVhazhoXZYOLsg,275
44
44
  lamindb/setup/dev/__init__.py,sha256=tBty426VGF2PGqqt2XuNU-WgvOrbOp1aZBDowjLuzgA,242
45
- lamindb-0.64.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
46
- lamindb-0.64.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
47
- lamindb-0.64.0.dist-info/METADATA,sha256=VQKhCV_rs961elMgAaC1ThhkRaMEAMxrLG6RA8HxEUs,3114
48
- lamindb-0.64.0.dist-info/RECORD,,
45
+ lamindb-0.64.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
46
+ lamindb-0.64.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
47
+ lamindb-0.64.1.dist-info/METADATA,sha256=dIykcbtt7uCkgct7FSwbHEN_2oEfX42P9LZVs0TVyAA,3114
48
+ lamindb-0.64.1.dist-info/RECORD,,