lamindb 0.77.0__py3-none-any.whl → 0.77.2__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/_artifact.py +6 -3
- lamindb/_can_curate.py +3 -1
- lamindb/_collection.py +1 -1
- lamindb/_curate.py +387 -318
- lamindb/_feature.py +84 -58
- lamindb/_feature_set.py +6 -4
- lamindb/_finish.py +68 -13
- lamindb/_from_values.py +10 -6
- lamindb/_query_set.py +321 -102
- lamindb/_record.py +5 -3
- lamindb/_save.py +1 -0
- lamindb/_view.py +105 -9
- lamindb/core/__init__.py +2 -2
- lamindb/core/_context.py +9 -13
- lamindb/core/_data.py +58 -88
- lamindb/core/_describe.py +139 -0
- lamindb/core/_django.py +5 -6
- lamindb/core/_feature_manager.py +408 -198
- lamindb/core/_label_manager.py +147 -109
- lamindb/core/datasets/__init__.py +31 -2
- lamindb/core/datasets/_core.py +0 -27
- lamindb/core/datasets/_small.py +100 -0
- lamindb/core/exceptions.py +1 -1
- lamindb/core/storage/paths.py +9 -4
- lamindb/core/types.py +12 -2
- {lamindb-0.77.0.dist-info → lamindb-0.77.2.dist-info}/METADATA +7 -8
- {lamindb-0.77.0.dist-info → lamindb-0.77.2.dist-info}/RECORD +30 -28
- {lamindb-0.77.0.dist-info → lamindb-0.77.2.dist-info}/LICENSE +0 -0
- {lamindb-0.77.0.dist-info → lamindb-0.77.2.dist-info}/WHEEL +0 -0
lamindb/__init__.py
CHANGED
lamindb/_artifact.py
CHANGED
@@ -28,6 +28,7 @@ from lnschema_core.types import (
|
|
28
28
|
VisibilityChoice,
|
29
29
|
)
|
30
30
|
|
31
|
+
from ._parents import view_lineage
|
31
32
|
from ._utils import attach_func_to_class_method
|
32
33
|
from .core._data import (
|
33
34
|
_track_run_input,
|
@@ -36,7 +37,6 @@ from .core._data import (
|
|
36
37
|
get_run,
|
37
38
|
save_feature_set_links,
|
38
39
|
save_feature_sets,
|
39
|
-
view_lineage,
|
40
40
|
)
|
41
41
|
from .core._settings import settings
|
42
42
|
from .core.exceptions import IntegrityError, InvalidArgument
|
@@ -615,11 +615,14 @@ def __init__(artifact: Artifact, *args, **kwargs):
|
|
615
615
|
|
616
616
|
init_self_from_db(artifact, kwargs_or_artifact)
|
617
617
|
# adding "key" here is dangerous because key might be auto-populated
|
618
|
-
|
619
|
-
if
|
618
|
+
attr_to_update = {"description": description}
|
619
|
+
if kwargs_or_artifact._key_is_virtual and kwargs_or_artifact.key is None:
|
620
|
+
attr_to_update["key"] = key
|
621
|
+
elif artifact.key != key and key is not None:
|
620
622
|
logger.warning(
|
621
623
|
f"key {artifact.key} on existing artifact differs from passed key {key}"
|
622
624
|
)
|
625
|
+
update_attributes(artifact, attr_to_update)
|
623
626
|
return None
|
624
627
|
else:
|
625
628
|
kwargs = kwargs_or_artifact
|
lamindb/_can_curate.py
CHANGED
@@ -20,6 +20,8 @@ if TYPE_CHECKING:
|
|
20
20
|
from lamin_utils._inspect import InspectResult
|
21
21
|
from lnschema_core.types import ListLike, StrField
|
22
22
|
|
23
|
+
from lamindb._query_set import RecordList
|
24
|
+
|
23
25
|
|
24
26
|
# from_values doesn't apply for QuerySet or Manager
|
25
27
|
@classmethod # type:ignore
|
@@ -32,7 +34,7 @@ def from_values(
|
|
32
34
|
organism: Record | str | None = None,
|
33
35
|
source: Record | None = None,
|
34
36
|
mute: bool = False,
|
35
|
-
) ->
|
37
|
+
) -> RecordList:
|
36
38
|
"""{}""" # noqa: D415
|
37
39
|
from_source = True if cls.__module__.startswith("bionty.") else False
|
38
40
|
|
lamindb/_collection.py
CHANGED
@@ -21,6 +21,7 @@ from lnschema_core.models import (
|
|
21
21
|
from lnschema_core.types import VisibilityChoice
|
22
22
|
|
23
23
|
from . import Artifact, Run
|
24
|
+
from ._parents import view_lineage
|
24
25
|
from ._record import init_self_from_db, update_attributes
|
25
26
|
from ._utils import attach_func_to_class_method
|
26
27
|
from .core._data import (
|
@@ -30,7 +31,6 @@ from .core._data import (
|
|
30
31
|
get_run,
|
31
32
|
save_feature_set_links,
|
32
33
|
save_feature_sets,
|
33
|
-
view_lineage,
|
34
34
|
)
|
35
35
|
from .core._mapped_collection import MappedCollection
|
36
36
|
from .core._settings import settings
|