lamindb 0.73.0__py3-none-any.whl → 0.73.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 +1 -1
- lamindb/_annotate.py +5 -2
- lamindb/_artifact.py +2 -1
- lamindb/_registry.py +0 -21
- lamindb/core/_label_manager.py +2 -2
- lamindb/core/schema.py +3 -3
- lamindb/core/versioning.py +1 -1
- lamindb/integrations/_vitessce.py +7 -3
- {lamindb-0.73.0.dist-info → lamindb-0.73.1.dist-info}/METADATA +3 -3
- {lamindb-0.73.0.dist-info → lamindb-0.73.1.dist-info}/RECORD +12 -12
- {lamindb-0.73.0.dist-info → lamindb-0.73.1.dist-info}/LICENSE +0 -0
- {lamindb-0.73.0.dist-info → lamindb-0.73.1.dist-info}/WHEEL +0 -0
lamindb/__init__.py
CHANGED
lamindb/_annotate.py
CHANGED
@@ -813,7 +813,10 @@ def standardize_and_inspect(
|
|
813
813
|
values: Iterable[str], field: FieldAttr, registry: Registry, **kwargs
|
814
814
|
):
|
815
815
|
"""Standardize and inspect values using a registry."""
|
816
|
-
if hasattr(registry, "standardize")
|
816
|
+
if hasattr(registry, "standardize") and hasattr(
|
817
|
+
registry,
|
818
|
+
"synonyms", # https://github.com/laminlabs/lamindb/issues/1685
|
819
|
+
):
|
817
820
|
values = registry.standardize(values, field=field, mute=True, **kwargs)
|
818
821
|
return registry.inspect(values, field=field, mute=True, **kwargs)
|
819
822
|
|
@@ -976,7 +979,7 @@ def save_artifact(
|
|
976
979
|
except ImportError:
|
977
980
|
pass
|
978
981
|
if artifact is None:
|
979
|
-
raise ValueError("data must be a DataFrame, AnnData or MuData object")
|
982
|
+
raise ValueError("data must be a DataFrame, AnnData or MuData object.")
|
980
983
|
artifact.save()
|
981
984
|
|
982
985
|
feature_kwargs = check_registry_organism(
|
lamindb/_artifact.py
CHANGED
@@ -196,6 +196,8 @@ def get_stat_or_artifact(
|
|
196
196
|
if not isinstance(path, LocalPathClasses):
|
197
197
|
size, hash, hash_type = None, None, None
|
198
198
|
if stat is not None:
|
199
|
+
# convert UPathStatResult to fsspec info dict
|
200
|
+
stat = stat.as_info()
|
199
201
|
if "ETag" in stat: # is file
|
200
202
|
size, hash, hash_type = get_stat_file_cloud(stat)
|
201
203
|
elif stat["type"] == "directory":
|
@@ -1109,6 +1111,5 @@ for name in METHOD_NAMES:
|
|
1109
1111
|
Artifact._delete_skip_storage = _delete_skip_storage
|
1110
1112
|
Artifact._save_skip_storage = _save_skip_storage
|
1111
1113
|
Artifact.path = path
|
1112
|
-
Artifact.stage = cache
|
1113
1114
|
# this seems a Django-generated function
|
1114
1115
|
delattr(Artifact, "get_visibility_display")
|
lamindb/_registry.py
CHANGED
@@ -549,24 +549,3 @@ if ln_setup._TESTING: # type: ignore
|
|
549
549
|
|
550
550
|
for name in METHOD_NAMES:
|
551
551
|
attach_func_to_class_method(name, Registry, globals())
|
552
|
-
|
553
|
-
|
554
|
-
@classmethod # type: ignore
|
555
|
-
def __get_schema_name__(cls) -> str:
|
556
|
-
schema_module_name = cls.__module__.split(".")[0]
|
557
|
-
schema_name = schema_module_name.replace("lnschema_", "")
|
558
|
-
return schema_name
|
559
|
-
|
560
|
-
|
561
|
-
@classmethod # type: ignore
|
562
|
-
def __get_name_with_schema__(cls) -> str:
|
563
|
-
schema_name = cls.__get_schema_name__()
|
564
|
-
if schema_name == "core":
|
565
|
-
schema_prefix = ""
|
566
|
-
else:
|
567
|
-
schema_prefix = f"{schema_name}."
|
568
|
-
return f"{schema_prefix}{cls.__name__}"
|
569
|
-
|
570
|
-
|
571
|
-
Registry.__get_schema_name__ = __get_schema_name__
|
572
|
-
Registry.__get_name_with_schema__ = __get_name_with_schema__
|
lamindb/core/_label_manager.py
CHANGED
@@ -125,13 +125,13 @@ def validate_labels(labels: QuerySet | list | dict, parents: bool = True):
|
|
125
125
|
|
126
126
|
|
127
127
|
class LabelManager:
|
128
|
-
"""Label manager (:attr:`~lamindb.core.
|
128
|
+
"""Label manager (:attr:`~lamindb.core.HasFeatures.labels`).
|
129
129
|
|
130
130
|
This allows to manage untyped labels :class:`~lamindb.ULabel` and arbitrary
|
131
131
|
typed labels (e.g., :class:`~bionty.CellLine`) and associate labels
|
132
132
|
with features.
|
133
133
|
|
134
|
-
See :class:`~lamindb.core.
|
134
|
+
See :class:`~lamindb.core.HasFeatures` for more information.
|
135
135
|
"""
|
136
136
|
|
137
137
|
def __init__(self, host: Artifact | Collection):
|
lamindb/core/schema.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
from
|
1
|
+
from __future__ import annotations
|
2
2
|
|
3
3
|
from django.db.models import ManyToManyField
|
4
4
|
from lnschema_core.models import Feature, FeatureSet, LinkORM, Registry
|
5
5
|
|
6
6
|
|
7
|
-
def dict_schema_name_to_model_name(orm:
|
7
|
+
def dict_schema_name_to_model_name(orm: type[Registry]) -> dict[str, Registry]:
|
8
8
|
d: dict = {
|
9
9
|
i.related_model.__get_name_with_schema__(): i.related_model
|
10
10
|
for i in orm._meta.related_objects
|
@@ -21,7 +21,7 @@ def dict_schema_name_to_model_name(orm: Type[Registry]) -> dict[str, Registry]:
|
|
21
21
|
|
22
22
|
|
23
23
|
def dict_related_model_to_related_name(
|
24
|
-
orm:
|
24
|
+
orm: type[Registry], links: bool = False
|
25
25
|
) -> dict[str, str]:
|
26
26
|
def include(model: Registry):
|
27
27
|
return not links != issubclass(model, LinkORM)
|
lamindb/core/versioning.py
CHANGED
@@ -138,7 +138,7 @@ def process_is_new_version_of(
|
|
138
138
|
if is_new_version_of is not None and not isinstance(is_new_version_of, type):
|
139
139
|
raise TypeError(f"is_new_version_of has to be of type {type}")
|
140
140
|
if is_new_version_of is None:
|
141
|
-
uid = init_uid(version=version, n_full_id=type.
|
141
|
+
uid = init_uid(version=version, n_full_id=type._len_full_uid)
|
142
142
|
else:
|
143
143
|
uid, version = get_uid_from_old_version(is_new_version_of, version)
|
144
144
|
if name is None:
|
@@ -39,9 +39,13 @@ def save_vitessce_config(vitessce_config: VitessceConfig, description: str) -> A
|
|
39
39
|
if "url" not in file:
|
40
40
|
raise ValueError("Each file must have a 'url' key.")
|
41
41
|
filename = file["url"].split("/")[-1]
|
42
|
-
assert filename.endswith(
|
43
|
-
|
44
|
-
|
42
|
+
assert filename.endswith(
|
43
|
+
(".anndata.zarr", ".spatialdata.zarr", ".ome.zarr")
|
44
|
+
)
|
45
|
+
filestem = (
|
46
|
+
filename.replace(".anndata.zarr", "")
|
47
|
+
.replace(".spatialdata.zarr", "")
|
48
|
+
.replace(".ome.zarr", "")
|
45
49
|
)
|
46
50
|
artifact = Artifact.filter(uid__startswith=filestem).one_or_none()
|
47
51
|
if artifact is None:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lamindb
|
3
|
-
Version: 0.73.
|
3
|
+
Version: 0.73.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,8 +9,8 @@ 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.68.
|
13
|
-
Requires-Dist: lamindb_setup==0.73.
|
12
|
+
Requires-Dist: lnschema_core==0.68.1
|
13
|
+
Requires-Dist: lamindb_setup==0.73.1
|
14
14
|
Requires-Dist: lamin_utils==0.13.2
|
15
15
|
Requires-Dist: lamin_cli==0.14.0
|
16
16
|
Requires-Dist: rapidfuzz
|
@@ -1,6 +1,6 @@
|
|
1
|
-
lamindb/__init__.py,sha256=
|
2
|
-
lamindb/_annotate.py,sha256=
|
3
|
-
lamindb/_artifact.py,sha256=
|
1
|
+
lamindb/__init__.py,sha256=gdITn70-3HoUMrn3iMBej3cwEYPot50lGkLAkm4WgY4,2207
|
2
|
+
lamindb/_annotate.py,sha256=CScyKVB3k_x5p0pihxO1UrTFBCvPcSSjBXvGY3YgTLs,44381
|
3
|
+
lamindb/_artifact.py,sha256=uMUlXCGU1JYSnOYMxCwEe_1MslbcnZACP9SYL-a4zRk,40816
|
4
4
|
lamindb/_can_validate.py,sha256=s1q0lxplqnhytrVgArBTm05XKMMmpreK0ZlVCsd2jjk,14849
|
5
5
|
lamindb/_collection.py,sha256=AGiztgM_OIet617aF86muL6lIv6GEDcmXorize6V62U,14657
|
6
6
|
lamindb/_feature.py,sha256=Aawz4jCgjhuneZnmoty7JkZI3zjA_50vr_0dnFjSN3U,7348
|
@@ -12,7 +12,7 @@ lamindb/_is_versioned.py,sha256=0PgRCmxEmYDcAjllLSOYZm132B1lW6QgmBBERhRyFt0,1341
|
|
12
12
|
lamindb/_parents.py,sha256=kb5AHkntpTP5g2lk1aPL0FmIilYZYVZvj6stddFOI40,15075
|
13
13
|
lamindb/_query_manager.py,sha256=qxwrBM8UmNQnUiNOfe84YN6NpfJBg2wQ2JqUfH6HHhc,4225
|
14
14
|
lamindb/_query_set.py,sha256=JgdJY2pACCqjC4AHjFiMAdq_qjeuhEo2NUX68f6ODwk,11597
|
15
|
-
lamindb/_registry.py,sha256=
|
15
|
+
lamindb/_registry.py,sha256=VRyWgDEYtuaV_krMzLDfg2uBwSCMCBPwelISGLOHuQw,18755
|
16
16
|
lamindb/_run.py,sha256=b7A52M1On3QzFgIYyfQoz5Kk7V3wcu9p_Prq5bzd8v8,1838
|
17
17
|
lamindb/_save.py,sha256=It4XO448D8NG2cReo9Xy0lQBQdkMm_rCx_TGD1qZWWc,11864
|
18
18
|
lamindb/_storage.py,sha256=VW8xq3VRv58-ciholvOdlcgvp_OIlLxx5GxLt-e2Irs,614
|
@@ -23,7 +23,7 @@ lamindb/_view.py,sha256=GV1FrqIMmdooEkA-5zvcTWgV1nqx1sehi6WdWEaFpxM,2171
|
|
23
23
|
lamindb/core/__init__.py,sha256=RkE5BrdOWNHQIz60z1npYoRim-Ot24-L7JTmLXd2WTU,1363
|
24
24
|
lamindb/core/_data.py,sha256=xkjEvAhWeEEYRIZIi9Qbb0aEWiUPttq-qnCLx_2xy48,16172
|
25
25
|
lamindb/core/_feature_manager.py,sha256=h7puH83LjaiJrBlmw3wSkUVO5c_LVfubCJKklPryP84,26205
|
26
|
-
lamindb/core/_label_manager.py,sha256=
|
26
|
+
lamindb/core/_label_manager.py,sha256=d9r3tiNDFbpZQmxE1jmgdgnMYPOfTPpAKGKtRRLmVj8,9640
|
27
27
|
lamindb/core/_mapped_collection.py,sha256=_OwFZh5SePDUD70XIK5kngv3we_Z5-YdGHNfpUSatSQ,19469
|
28
28
|
lamindb/core/_run_context.py,sha256=aGdZv4IeYo7QpXl9H9U7RNwpgzqGeCDKPuoSdtP-CAE,18988
|
29
29
|
lamindb/core/_settings.py,sha256=rW1KfEXfT56XErwcnSuQxaCytpOy1kJ-u7tVmkmNmxY,6131
|
@@ -32,9 +32,9 @@ lamindb/core/_track_environment.py,sha256=xLZ6kgzxWS6MWZ5LQ_wkbJX99vmYOT8iQ-Fz4O
|
|
32
32
|
lamindb/core/_transform_settings.py,sha256=eV96QKX9jOojjzF-a0oo0wXQsMXN2F6QV7orE06oFC8,161
|
33
33
|
lamindb/core/exceptions.py,sha256=bbm-PeSy24qFcqh2HpucZWpwGAvk-TL_3FUoAPb3e3E,867
|
34
34
|
lamindb/core/fields.py,sha256=Jgi_XI-iTe6cT7oD8FV_JqEpjN1Q9rZWwL8VLtj4jkA,164
|
35
|
-
lamindb/core/schema.py,sha256=
|
35
|
+
lamindb/core/schema.py,sha256=BbG7JGrXVLwEX_6eQb8ouJc9Q-MgazwqHvAM5dtrWtM,1861
|
36
36
|
lamindb/core/types.py,sha256=xeQF2x40p2pR9eIVQrXT74RrS810z2fbjmTRTSQUqPM,230
|
37
|
-
lamindb/core/versioning.py,sha256=
|
37
|
+
lamindb/core/versioning.py,sha256=zbp3wAWOqU1uDF9wRrpaS9JfmRglUQtVHvFpWWoJHZk,4943
|
38
38
|
lamindb/core/datasets/__init__.py,sha256=zRP98oqUAaXhqWyKMiH0s_ImVIuNeziQQ2kQ_t0f-DI,1353
|
39
39
|
lamindb/core/datasets/_core.py,sha256=bMNtx2tXhzvjLkHmg9I5jE1xMTxPH68hovnX6_NjT6g,19858
|
40
40
|
lamindb/core/datasets/_fake.py,sha256=BZF9R_1iF0HDnvtZNqL2FtsjSMuqDIfuFxnw_LJYIh4,953
|
@@ -46,10 +46,10 @@ lamindb/core/storage/_zarr.py,sha256=5ceEz6YIvgvUnVVNWhK5Z4W0WfrvyvY82Yna5jSX1_E
|
|
46
46
|
lamindb/core/storage/objects.py,sha256=OzvBCS-Urz5mr-O95qYt6RGBDDX5HmjfRRKWPPDn1ZE,1797
|
47
47
|
lamindb/core/storage/paths.py,sha256=H9OPCuI7fPNRmvtQRFda92VIi6whnW6Q9BAZ6U8VWI4,8203
|
48
48
|
lamindb/integrations/__init__.py,sha256=aH2PmO2m4-vwIifMYTB0Fyyr_gZWtVnV71jT0tVWSw0,123
|
49
|
-
lamindb/integrations/_vitessce.py,sha256=
|
49
|
+
lamindb/integrations/_vitessce.py,sha256=Qd39OuNsL0GXU7nMvEWLRRESFQ0mwGf_ePMJE_FDYm8,2639
|
50
50
|
lamindb/setup/__init__.py,sha256=OwZpZzPDv5lPPGXZP7-zK6UdO4FHvvuBh439yZvIp3A,410
|
51
51
|
lamindb/setup/core/__init__.py,sha256=SevlVrc2AZWL3uALbE5sopxBnIZPWZ1IB0NBDudiAL8,167
|
52
|
-
lamindb-0.73.
|
53
|
-
lamindb-0.73.
|
54
|
-
lamindb-0.73.
|
55
|
-
lamindb-0.73.
|
52
|
+
lamindb-0.73.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
53
|
+
lamindb-0.73.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
54
|
+
lamindb-0.73.1.dist-info/METADATA,sha256=wJj1zRW8leb93Gj0ouXl-ujvE3UzjfNZ4i_oXQEZEvE,2735
|
55
|
+
lamindb-0.73.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|