lamindb 0.77.2__py3-none-any.whl → 0.77.4__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/_can_curate.py +6 -4
- lamindb/_curate.py +589 -45
- lamindb/_finish.py +7 -7
- lamindb/_from_values.py +7 -7
- lamindb/_record.py +7 -5
- lamindb/_save.py +9 -2
- lamindb/_view.py +2 -1
- lamindb/core/__init__.py +2 -0
- lamindb/core/_context.py +2 -4
- lamindb/core/_django.py +30 -17
- lamindb/core/_feature_manager.py +64 -41
- lamindb/core/_label_manager.py +15 -14
- lamindb/core/loaders.py +18 -1
- lamindb/core/storage/_tiledbsoma.py +2 -0
- {lamindb-0.77.2.dist-info → lamindb-0.77.4.dist-info}/METADATA +5 -4
- {lamindb-0.77.2.dist-info → lamindb-0.77.4.dist-info}/RECORD +19 -19
- {lamindb-0.77.2.dist-info → lamindb-0.77.4.dist-info}/WHEEL +1 -1
- {lamindb-0.77.2.dist-info → lamindb-0.77.4.dist-info}/LICENSE +0 -0
lamindb/__init__.py
CHANGED
lamindb/_can_curate.py
CHANGED
@@ -10,7 +10,7 @@ from lamin_utils import colors, logger
|
|
10
10
|
from lamindb_setup.core._docs import doc_args
|
11
11
|
from lnschema_core import CanCurate, Record
|
12
12
|
|
13
|
-
from ._from_values import
|
13
|
+
from ._from_values import _format_values, _has_organism_field, get_or_create_records
|
14
14
|
from ._record import _queryset, get_name_field
|
15
15
|
from ._utils import attach_func_to_class_method
|
16
16
|
from .core.exceptions import ValidationError
|
@@ -168,7 +168,7 @@ def _inspect(
|
|
168
168
|
bionty_mapper = bionty_result.synonyms_mapper
|
169
169
|
hint = False
|
170
170
|
if len(bionty_validated) > 0 and not mute:
|
171
|
-
print_values =
|
171
|
+
print_values = _format_values(bionty_validated)
|
172
172
|
s = "" if len(bionty_validated) == 1 else "s"
|
173
173
|
labels = colors.yellow(f"{len(bionty_validated)} {model_name} term{s}")
|
174
174
|
logger.print(
|
@@ -178,7 +178,7 @@ def _inspect(
|
|
178
178
|
hint = True
|
179
179
|
|
180
180
|
if len(bionty_mapper) > 0 and not mute:
|
181
|
-
print_values =
|
181
|
+
print_values = _format_values(list(bionty_mapper.keys()))
|
182
182
|
s = "" if len(bionty_mapper) == 1 else "s"
|
183
183
|
labels = colors.yellow(f"{len(bionty_mapper)} {model_name} term{s}")
|
184
184
|
logger.print(
|
@@ -199,7 +199,7 @@ def _inspect(
|
|
199
199
|
logger.warning("no Bionty source found, skipping Bionty validation")
|
200
200
|
|
201
201
|
if len(nonval) > 0 and not mute:
|
202
|
-
print_values =
|
202
|
+
print_values = _format_values(list(nonval))
|
203
203
|
s = "" if len(nonval) == 1 else "s"
|
204
204
|
labels = colors.red(f"{len(nonval)} term{s}")
|
205
205
|
logger.print(f" couldn't validate {labels}: {colors.red(print_values)}")
|
@@ -383,6 +383,8 @@ def _standardize(
|
|
383
383
|
organism = (
|
384
384
|
organism_record.name if organism_record is not None else organism_record
|
385
385
|
)
|
386
|
+
else:
|
387
|
+
organism = None
|
386
388
|
|
387
389
|
# only perform synonym mapping if field is the name field
|
388
390
|
if hasattr(registry, "_name_field") and field != registry._name_field:
|