lamindb 1.9.0__py3-none-any.whl → 1.9.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/curators/core.py +6 -0
- lamindb/models/artifact.py +4 -1
- lamindb/models/transform.py +7 -0
- {lamindb-1.9.0.dist-info → lamindb-1.9.1.dist-info}/METADATA +2 -2
- {lamindb-1.9.0.dist-info → lamindb-1.9.1.dist-info}/RECORD +8 -8
- {lamindb-1.9.0.dist-info → lamindb-1.9.1.dist-info}/LICENSE +0 -0
- {lamindb-1.9.0.dist-info → lamindb-1.9.1.dist-info}/WHEEL +0 -0
lamindb/__init__.py
CHANGED
lamindb/curators/core.py
CHANGED
@@ -1236,6 +1236,9 @@ class CatVector:
|
|
1236
1236
|
registry = self._field.field.model
|
1237
1237
|
field_name = self._field.field.name
|
1238
1238
|
non_validated_records: SQLRecordList[Any] = [] # type: ignore
|
1239
|
+
type_record = None
|
1240
|
+
if self._subtype_str != "" and "=" not in self._subtype_str:
|
1241
|
+
type_record = registry.get(name=self._subtype_str)
|
1239
1242
|
if df is not None and registry == Feature:
|
1240
1243
|
nonval_columns = Feature.inspect(df.columns, mute=True).non_validated
|
1241
1244
|
non_validated_records = Feature.from_df(df.loc[:, nonval_columns])
|
@@ -1252,6 +1255,9 @@ class CatVector:
|
|
1252
1255
|
init_kwargs = {field_name: value}
|
1253
1256
|
if registry == Feature:
|
1254
1257
|
init_kwargs["dtype"] = "cat" if dtype is None else dtype
|
1258
|
+
if type_record is not None:
|
1259
|
+
# if subtype_str is set, we need to set the type for new records
|
1260
|
+
init_kwargs["type"] = type_record
|
1255
1261
|
non_validated_records.append(registry(**init_kwargs, **create_kwargs))
|
1256
1262
|
if len(non_validated_records) > 0:
|
1257
1263
|
ln_save(non_validated_records)
|
lamindb/models/artifact.py
CHANGED
@@ -1382,7 +1382,10 @@ class Artifact(SQLRecord, IsVersioned, TracksRun, TracksUpdates):
|
|
1382
1382
|
skip_check_exists = kwargs.pop("skip_check_exists", False)
|
1383
1383
|
if "storage" in kwargs:
|
1384
1384
|
storage = kwargs.pop("storage")
|
1385
|
-
elif
|
1385
|
+
elif (
|
1386
|
+
setup_settings.instance.keep_artifacts_local
|
1387
|
+
and setup_settings.instance._local_storage is not None
|
1388
|
+
):
|
1386
1389
|
storage = setup_settings.instance.local_storage.record
|
1387
1390
|
else:
|
1388
1391
|
storage = setup_settings.instance.storage.record
|
lamindb/models/transform.py
CHANGED
@@ -317,10 +317,17 @@ class Transform(SQLRecord, IsVersioned):
|
|
317
317
|
|
318
318
|
def delete(self) -> None:
|
319
319
|
"""Delete."""
|
320
|
+
from .project import TransformProject
|
321
|
+
|
320
322
|
# query all runs and delete their artifacts
|
321
323
|
runs = Run.filter(transform=self)
|
322
324
|
for run in runs:
|
323
325
|
delete_run_artifacts(run)
|
326
|
+
# CASCADE doesn't do the job below because run_id might be protected through run__transform=self
|
327
|
+
# hence, proactively delete the labels
|
328
|
+
qs = TransformProject.filter(transform=self)
|
329
|
+
if qs.exists():
|
330
|
+
qs.delete()
|
324
331
|
# at this point, all artifacts have been taken care of
|
325
332
|
# we can now leverage CASCADE delete
|
326
333
|
super().delete()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: lamindb
|
3
|
-
Version: 1.9.
|
3
|
+
Version: 1.9.1
|
4
4
|
Summary: A data framework for biology.
|
5
5
|
Author-email: Lamin Labs <open-source@lamin.ai>
|
6
6
|
Requires-Python: >=3.10,<3.14
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
12
12
|
Requires-Dist: lamin_utils==0.15.0
|
13
13
|
Requires-Dist: lamin_cli==1.6.0
|
14
|
-
Requires-Dist: lamindb_setup[aws]==1.8.
|
14
|
+
Requires-Dist: lamindb_setup[aws]==1.8.3
|
15
15
|
Requires-Dist: pyyaml
|
16
16
|
Requires-Dist: pyarrow
|
17
17
|
Requires-Dist: pandera>=0.24.0
|
@@ -1,4 +1,4 @@
|
|
1
|
-
lamindb/__init__.py,sha256=
|
1
|
+
lamindb/__init__.py,sha256=6vz7PoohgJVcU2XVHyGD3SyzxKQTaJC5IQ591AGza18,2904
|
2
2
|
lamindb/_finish.py,sha256=3HVKRw27rQs_S2ior-JX2IU0vUkeG5a6p8XgEgdT8-U,21219
|
3
3
|
lamindb/_tracked.py,sha256=-wK7BJv30nf4v2_nH5qDCyxHvug7ih6duQNGxDrj3UE,4447
|
4
4
|
lamindb/_view.py,sha256=cod1RnZoLyzMVJcjWjytg78Sf4qsR8IAdqpwzsi8FTw,4950
|
@@ -40,7 +40,7 @@ lamindb/core/subsettings/_annotation_settings.py,sha256=o-yTYw-NmjFmtehbKU8qnf7t
|
|
40
40
|
lamindb/core/subsettings/_creation_settings.py,sha256=NGHWKqCFSzVNBxAr2VnmdYguiFdW29XUK7T9wRsVshg,906
|
41
41
|
lamindb/curators/__init__.py,sha256=WLnaVxrhQGZxGB3pjg-SM4oUu6DaKA78S_J3BfVKLEg,496
|
42
42
|
lamindb/curators/_legacy.py,sha256=V2zF1J7jN2Ry7ascH06JytrAQzeOiirg7e4a9d0hpvM,54768
|
43
|
-
lamindb/curators/core.py,sha256=
|
43
|
+
lamindb/curators/core.py,sha256=OfCSLw6Ngu_HmCSjwRUZrsVwcdq-ge9JL1Wfl0djiyM,68832
|
44
44
|
lamindb/examples/__init__.py,sha256=8FnHoBbZmVwiGByHfY6sr069rBQTChFynUeq7O704Ns,580
|
45
45
|
lamindb/examples/cellxgene/__init__.py,sha256=Xzxfi_NQcWdK-RrbNFdlIFQFVPG8Qy18ekYx3sOQZeM,161
|
46
46
|
lamindb/examples/cellxgene/_cellxgene.py,sha256=bcFg0f0Bur38GKVNjKacCiMwMvJDdDeAk6BVT2WP5GI,8688
|
@@ -109,7 +109,7 @@ lamindb/models/_from_values.py,sha256=cCGPMDlAbBrdhFW-XrIQVZ10q1LNg4MycYPLOkF0fT
|
|
109
109
|
lamindb/models/_is_versioned.py,sha256=Th2_cBf9UWh27E6ANxg6LGmjBOumXFy7AjH0GG4FoXA,7601
|
110
110
|
lamindb/models/_label_manager.py,sha256=O3KaaTEVId5ky3h0aCGg1kDoFFfrovFYlV82YsZZyIs,12127
|
111
111
|
lamindb/models/_relations.py,sha256=zHYLujy9vkuB9jVq5844TpzLSP__iYNCQcsl-FzK1Jw,3700
|
112
|
-
lamindb/models/artifact.py,sha256=
|
112
|
+
lamindb/models/artifact.py,sha256=dSQowK8kg3xUAjtV_zMOPhOXchnUCqcHdryykGWW69A,116525
|
113
113
|
lamindb/models/artifact_set.py,sha256=VOZEGDo3m_9Yg_ftx3I2fwdydjHN61X_qV18N6xG4kM,4117
|
114
114
|
lamindb/models/can_curate.py,sha256=_6ymHhtc9zpU8O6ozqNDqn7jh87C9JisU_dl2gH2Hpo,29329
|
115
115
|
lamindb/models/collection.py,sha256=zNiYzj0K_UgIobWzBY93rekVpZm76p9BJOw7Pz0i8ZE,28356
|
@@ -124,14 +124,14 @@ lamindb/models/save.py,sha256=jXha2jfY-pWsKuP2dwaEROhUGxhM8fTWQGWAzA_xsM0,16777
|
|
124
124
|
lamindb/models/schema.py,sha256=7l2T_uOi7Lkj4yHuZWml1p7axBn_yNO4IlXkn8M2f9g,48962
|
125
125
|
lamindb/models/sqlrecord.py,sha256=6jfBKqGtvT6D2_mWgaxqLWvWzYUGzMW2d8r4nht4vk0,68411
|
126
126
|
lamindb/models/storage.py,sha256=0jvuQyJcIMdrZ9qq-vmKkI66libb2DqWjCXNFuvinIM,13518
|
127
|
-
lamindb/models/transform.py,sha256=
|
127
|
+
lamindb/models/transform.py,sha256=oXT_uF9CM4vrEt1APbdSUSMxclkxeVq9tjgQRmicqos,12774
|
128
128
|
lamindb/models/ulabel.py,sha256=ocAMSKeQcq2Kr6Dq0mxGupOmW1K0pAs19vjDeTEb6vM,9335
|
129
129
|
lamindb/setup/__init__.py,sha256=QZ-JF8IzO_ckDOU223lsJrdO5ay7cDFgvCbkLeAuxYA,467
|
130
130
|
lamindb/setup/_switch.py,sha256=njZJN__JOhVrBFGClQG1wobdhJJp6l_XzPGKtKSCrfU,434
|
131
131
|
lamindb/setup/core/__init__.py,sha256=SevlVrc2AZWL3uALbE5sopxBnIZPWZ1IB0NBDudiAL8,167
|
132
132
|
lamindb/setup/errors/__init__.py,sha256=bAHTxOUJW1rm4zpF0Pvqkftn8W6iMGnQ-uyNBu13Nfg,171
|
133
133
|
lamindb/setup/types/__init__.py,sha256=ATaosOi6q-cDWB52T69_sRmLMqj8cHfc-vljzZsrJNw,169
|
134
|
-
lamindb-1.9.
|
135
|
-
lamindb-1.9.
|
136
|
-
lamindb-1.9.
|
137
|
-
lamindb-1.9.
|
134
|
+
lamindb-1.9.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
135
|
+
lamindb-1.9.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
136
|
+
lamindb-1.9.1.dist-info/METADATA,sha256=K120hdMhCpm8y3SUQnBVFIk9ZySm5x0OQ60b7KiBgyA,5198
|
137
|
+
lamindb-1.9.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|