lamindb 0.69.8__py3-none-any.whl → 0.69.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.
lamindb/__init__.py CHANGED
@@ -40,7 +40,7 @@ Modules & settings:
40
40
 
41
41
  """
42
42
 
43
- __version__ = "0.69.8" # denote a release candidate for 0.1.0 with 0.1rc1
43
+ __version__ = "0.69.9" # denote a release candidate for 0.1.0 with 0.1rc1
44
44
 
45
45
  import os as _os
46
46
 
lamindb/_artifact.py CHANGED
@@ -22,7 +22,6 @@ from lamindb_setup.core.upath import (
22
22
  from lnschema_core import Artifact, Run, Storage
23
23
  from lnschema_core.models import IsTree
24
24
  from lnschema_core.types import (
25
- DataLike,
26
25
  VisibilityChoice,
27
26
  )
28
27
 
@@ -114,7 +113,7 @@ def process_pathlike(
114
113
 
115
114
  def process_data(
116
115
  provisional_uid: str,
117
- data: UPathStr | DataLike,
116
+ data: UPathStr | pd.DataFrame | AnnData,
118
117
  format: str | None,
119
118
  key: str | None,
120
119
  default_storage: Storage,
@@ -138,7 +137,7 @@ def process_data(
138
137
  )
139
138
  suffix = extract_suffix_from_path(path)
140
139
  memory_rep = None
141
- elif isinstance(data, (pd.DataFrame, AnnData)): # DataLike, spelled out
140
+ elif isinstance(data, (pd.DataFrame, AnnData)):
142
141
  storage = default_storage
143
142
  memory_rep = data
144
143
  if key is not None:
@@ -427,7 +426,7 @@ def log_storage_hint(
427
426
  logger.hint(hint)
428
427
 
429
428
 
430
- def data_is_anndata(data: DataLike):
429
+ def data_is_anndata(data: AnnData | UPathStr):
431
430
  if isinstance(data, AnnData):
432
431
  return True
433
432
  if isinstance(data, (str, Path, UPath)):
@@ -435,7 +434,7 @@ def data_is_anndata(data: DataLike):
435
434
  return False # pragma: no cover
436
435
 
437
436
 
438
- def data_is_mudata(data: DataLike): # pragma: no cover
437
+ def data_is_mudata(data: Any | UPathStr): # pragma: no cover
439
438
  try:
440
439
  from mudata import MuData
441
440
  except ModuleNotFoundError:
@@ -725,7 +724,7 @@ def from_dir(
725
724
  # docstring handled through attach_func_to_class_method
726
725
  def replace(
727
726
  self,
728
- data: UPathStr | DataLike,
727
+ data: UPathStr,
729
728
  run: Run | None = None,
730
729
  format: str | None = None,
731
730
  ) -> None:
@@ -808,9 +807,7 @@ def backed(self, is_run_input: bool | None = None) -> AnnDataAccessor | BackedAc
808
807
 
809
808
 
810
809
  # docstring handled through attach_func_to_class_method
811
- def load(
812
- self, is_run_input: bool | None = None, stream: bool = False, **kwargs
813
- ) -> DataLike:
810
+ def load(self, is_run_input: bool | None = None, stream: bool = False, **kwargs) -> Any:
814
811
  _track_run_input(self, is_run_input)
815
812
  if hasattr(self, "_memory_rep") and self._memory_rep is not None:
816
813
  return self._memory_rep
lamindb/_collection.py CHANGED
@@ -16,7 +16,7 @@ from lamin_utils import logger
16
16
  from lamindb_setup.core._docs import doc_args
17
17
  from lamindb_setup.core.hashing import hash_set
18
18
  from lnschema_core.models import Collection, CollectionArtifact, FeatureSet
19
- from lnschema_core.types import DataLike, VisibilityChoice
19
+ from lnschema_core.types import VisibilityChoice
20
20
 
21
21
  from lamindb._utils import attach_func_to_class_method
22
22
  from lamindb.core._data import _track_run_input
@@ -65,7 +65,7 @@ def __init__(
65
65
  data: Artifact | Iterable[Artifact] = (
66
66
  kwargs.pop("data") if len(args) == 0 else args[0]
67
67
  )
68
- meta: str | None = kwargs.pop("meta") if "meta" in kwargs else None
68
+ meta: Artifact | None = kwargs.pop("meta") if "meta" in kwargs else None
69
69
  name: str | None = kwargs.pop("name") if "name" in kwargs else None
70
70
  description: str | None = (
71
71
  kwargs.pop("description") if "description" in kwargs else None
@@ -273,7 +273,7 @@ def load(
273
273
  join: Literal["inner", "outer"] = "outer",
274
274
  is_run_input: bool | None = None,
275
275
  **kwargs,
276
- ) -> DataLike:
276
+ ) -> Any:
277
277
  # cannot call _track_run_input here, see comment further down
278
278
  all_artifacts = self.artifacts.all()
279
279
  suffixes = [artifact.suffix for artifact in all_artifacts]
@@ -23,7 +23,7 @@ from lamindb.core.storage import LocalPathClasses
23
23
  from ._settings import settings
24
24
 
25
25
  if TYPE_CHECKING:
26
- from lnschema_core.types import AnnDataLike, FieldAttr
26
+ from lnschema_core.types import FieldAttr
27
27
 
28
28
  from lamindb._query_set import QuerySet
29
29
 
@@ -132,7 +132,7 @@ def print_features(self: Data) -> str:
132
132
 
133
133
 
134
134
  def parse_feature_sets_from_anndata(
135
- adata: AnnDataLike,
135
+ adata: AnnData,
136
136
  var_field: FieldAttr,
137
137
  obs_field: FieldAttr = Feature.name,
138
138
  **kwargs,
@@ -136,6 +136,9 @@ def delete_storage_using_key(
136
136
 
137
137
  def delete_storage(storagepath: Path):
138
138
  """Delete arbitrary artifact."""
139
+ # TODO is_relative_to is not available in 3.8 and deprecated since 3.12
140
+ # replace with check_path_is_child_of_root but this needs to first be debugged
141
+ # if not check_path_is_child_of_root(storagepath, settings.storage):
139
142
  if not storagepath.is_relative_to(settings.storage): # type: ignore
140
143
  logger.warning("couldn't delete files outside of default storage")
141
144
  return "did-not-delete"
lamindb/core/types.py CHANGED
@@ -4,14 +4,12 @@
4
4
  :toctree: .
5
5
 
6
6
  UPathStr
7
- DataLike
8
7
  StrField
9
8
  ListLike
10
9
  TransformType
11
10
  """
12
11
  from lamindb_setup.core.types import UPathStr
13
12
  from lnschema_core.types import (
14
- DataLike,
15
13
  ListLike,
16
14
  StrField,
17
15
  TransformType,
@@ -1,15 +1,4 @@
1
- """Core setup library.
1
+ import lamindb_setup as _lamindb_setup
2
+ from lamindb_setup.core import * # noqa: F403
2
3
 
3
- .. autosummary::
4
- :toctree:
5
-
6
- UserSettings
7
- InstanceSettings
8
- StorageSettings
9
-
10
- """
11
- from lamindb_setup.core import ( # pragma: no cover
12
- InstanceSettings,
13
- StorageSettings,
14
- UserSettings,
15
- )
4
+ __doc__ = _lamindb_setup.core.__doc__.replace("lamindb_setup", "lamindb.setup")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamindb
3
- Version: 0.69.8
3
+ Version: 0.69.9
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,10 +9,10 @@ Classifier: Programming Language :: Python :: 3.8
9
9
  Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
- Requires-Dist: lnschema_core==0.64.5
13
- Requires-Dist: lamindb_setup==0.68.5
12
+ Requires-Dist: lnschema_core==0.64.6
13
+ Requires-Dist: lamindb_setup==0.69.0
14
14
  Requires-Dist: lamin_utils==0.13.1
15
- Requires-Dist: lamin_cli==0.12.0
15
+ Requires-Dist: lamin_cli==0.12.1
16
16
  Requires-Dist: rapidfuzz
17
17
  Requires-Dist: pyarrow
18
18
  Requires-Dist: typing_extensions!=4.6.0
@@ -1,8 +1,8 @@
1
- lamindb/__init__.py,sha256=sZVLIGCk1KRIVzcEW76yuJ3Hcdhaz-ZbKi2OIEELTeE,2163
1
+ lamindb/__init__.py,sha256=rt70wiLn5OUFrtCA3UOodGkQp8M-1gdp4oB506MZ8ac,2163
2
2
  lamindb/_annotate.py,sha256=9YU0mC2ll8MDrgytFHy6xVBbHQSLRsYB9BlAu-3YA94,29918
3
- lamindb/_artifact.py,sha256=mB8QyQKozzQsUxC8fOslwZyDegendQCR4BDIUJmAZ8M,35569
3
+ lamindb/_artifact.py,sha256=Y5FN6kFhOYn47ls14mOw1dToojg0akqlPcQ6XYsNv5w,35538
4
4
  lamindb/_can_validate.py,sha256=rvoL5py40L5MldqYMm_vB-0x9pj1MDNhcSUDLumw-nc,14498
5
- lamindb/_collection.py,sha256=w33zyFP5w4P5VoD8axwcZ_KPCqP2hjmWhIfOTtCjNN4,14418
5
+ lamindb/_collection.py,sha256=P9B1jQul3umfNJ84bHKHbsjmze36Eh6jDQT9EqpvDFc,14408
6
6
  lamindb/_feature.py,sha256=srAKchY7gqD-h-cWlEiAWuHlpFKFwv0PWIA-JX0Go8c,6758
7
7
  lamindb/_feature_set.py,sha256=x9e6VWKq4iM_jDy-Al_YXL3LYveG8NN22KVbfr1yYuA,8710
8
8
  lamindb/_filter.py,sha256=xnjJzjF3Zj4dK_Kfymvhgczk27MhhXz5ZYc7XINbgHY,1331
@@ -22,7 +22,7 @@ lamindb/_utils.py,sha256=LGdiW4k3GClLz65vKAVRkL6Tw-Gkx9DWAdez1jyA5bE,428
22
22
  lamindb/_view.py,sha256=GV1FrqIMmdooEkA-5zvcTWgV1nqx1sehi6WdWEaFpxM,2171
23
23
  lamindb/core/__init__.py,sha256=Mw4sI-xgnMXNsu84oYFQBZOF8mxxxhp6-e3BjTQqjlA,1131
24
24
  lamindb/core/_data.py,sha256=A8NUs2Ii2R4FC_31zFGsi3Dae4Rzs66JtAK9MYn6M0k,17262
25
- lamindb/core/_feature_manager.py,sha256=pGRWUZ0hhGZcexD3LsSfGzfQUCit7FoIEwzt6HANowo,13914
25
+ lamindb/core/_feature_manager.py,sha256=B65Rc1wlsc7QFQUH6H9bhiwy5bf6X_Y38LJKaqsGRoY,13897
26
26
  lamindb/core/_label_manager.py,sha256=duThEEgQxdNQBeTE1ssXX0XujUQa_M14B9e1TQKPwsQ,9078
27
27
  lamindb/core/_mapped_collection.py,sha256=nnXVqHAbSPe34lN79VthoAOkJVxSD6ZbzZqXgv9H6Y8,17244
28
28
  lamindb/core/_run_context.py,sha256=GS593lxHsbQyhbrp6ppzZ0r-fVe6W099NDXM6xyg8-U,17509
@@ -33,7 +33,7 @@ lamindb/core/_transform_settings.py,sha256=eV96QKX9jOojjzF-a0oo0wXQsMXN2F6QV7orE
33
33
  lamindb/core/_view_tree.py,sha256=PTwmKZSQL2UhKuSdV5Wp7o1JDjv1qwgsVCj3ThkbKb8,3447
34
34
  lamindb/core/exceptions.py,sha256=PHk5lyBdJPrrEQcid3ItfdNzz3fgiQsUmsEDdz063F0,197
35
35
  lamindb/core/fields.py,sha256=Jgi_XI-iTe6cT7oD8FV_JqEpjN1Q9rZWwL8VLtj4jkA,164
36
- lamindb/core/types.py,sha256=2CJdqGXxbYv4oOB_t6p2PJdg_5j9qDUSJJYEV-lcnqA,256
36
+ lamindb/core/types.py,sha256=xeQF2x40p2pR9eIVQrXT74RrS810z2fbjmTRTSQUqPM,230
37
37
  lamindb/core/versioning.py,sha256=DsEHpCueNwhRiIaRH5-O8H_1fJVNtWslCRx30YiIS5o,3080
38
38
  lamindb/core/datasets/__init__.py,sha256=zRP98oqUAaXhqWyKMiH0s_ImVIuNeziQQ2kQ_t0f-DI,1353
39
39
  lamindb/core/datasets/_core.py,sha256=o1c8vGhO-Hss-osBGdxldDFYh_hwsksh8H1bm6rYIi0,18861
@@ -42,13 +42,13 @@ lamindb/core/storage/__init__.py,sha256=9alBNtyH59VnoWJS-IdjLwFKlK-kgeCGl6jXk0_w
42
42
  lamindb/core/storage/_anndata_sizes.py,sha256=aXO3OB--tF5MChenSsigW6Q-RuE8YJJOUTVukkLrv9A,1029
43
43
  lamindb/core/storage/_backed_access.py,sha256=6grFzub43w_k-Zxa4iqSY6GAoCewE1FZTx52wfGKZIg,24383
44
44
  lamindb/core/storage/_zarr.py,sha256=0i9-cJPjieIsp5UpK-IyRPkHAF-iKkWgpkWviSni2MM,2900
45
- lamindb/core/storage/file.py,sha256=N_t_EiWP29XwMDsbVz1Kw2ksVBmXnHYkPtWEXemknOM,7287
45
+ lamindb/core/storage/file.py,sha256=qxIdPTXqtedXc1Zc4WunBorRLSo4bkYXbTAgQkWc-dE,7519
46
46
  lamindb/core/storage/object.py,sha256=5f_E4xLUjy4rG_klSmVjZWuVMxdzme-bQxCKfbY9nhM,1158
47
47
  lamindb/integrations/__init__.py,sha256=aH2PmO2m4-vwIifMYTB0Fyyr_gZWtVnV71jT0tVWSw0,123
48
48
  lamindb/integrations/_vitessce.py,sha256=xLlFr_GzoY5RjyouPFEO-W7crBlTVQdHR2ns1IcCZFc,1673
49
49
  lamindb/setup/__init__.py,sha256=OwZpZzPDv5lPPGXZP7-zK6UdO4FHvvuBh439yZvIp3A,410
50
- lamindb/setup/core/__init__.py,sha256=LqIIvJNcONxkqjbnP6CUaP4d45Lbd6TSMAcXFp4C7_8,231
51
- lamindb-0.69.8.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
52
- lamindb-0.69.8.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
53
- lamindb-0.69.8.dist-info/METADATA,sha256=YmH_AI9gO24-zfttptrppfCdnp7c62ucvnN5xbW_ccw,2887
54
- lamindb-0.69.8.dist-info/RECORD,,
50
+ lamindb/setup/core/__init__.py,sha256=SevlVrc2AZWL3uALbE5sopxBnIZPWZ1IB0NBDudiAL8,167
51
+ lamindb-0.69.9.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
52
+ lamindb-0.69.9.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
53
+ lamindb-0.69.9.dist-info/METADATA,sha256=TviWVIwvJbMOdMe6PeCFHeQNmuujUSETcBfUJO6a_C0,2887
54
+ lamindb-0.69.9.dist-info/RECORD,,