lamindb 1.0.5__py3-none-any.whl → 1.1.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.
Files changed (80) hide show
  1. lamindb/__init__.py +17 -6
  2. lamindb/_artifact.py +202 -87
  3. lamindb/_can_curate.py +27 -8
  4. lamindb/_collection.py +86 -52
  5. lamindb/_feature.py +177 -41
  6. lamindb/_finish.py +21 -7
  7. lamindb/_from_values.py +83 -98
  8. lamindb/_parents.py +4 -4
  9. lamindb/_query_set.py +78 -18
  10. lamindb/_record.py +170 -53
  11. lamindb/_run.py +4 -4
  12. lamindb/_save.py +42 -11
  13. lamindb/_schema.py +135 -38
  14. lamindb/_storage.py +1 -1
  15. lamindb/_tracked.py +129 -0
  16. lamindb/_transform.py +21 -8
  17. lamindb/_ulabel.py +5 -14
  18. lamindb/base/users.py +1 -4
  19. lamindb/base/validation.py +2 -6
  20. lamindb/core/__init__.py +13 -14
  21. lamindb/core/_context.py +14 -9
  22. lamindb/core/_data.py +29 -25
  23. lamindb/core/_describe.py +1 -1
  24. lamindb/core/_django.py +1 -1
  25. lamindb/core/_feature_manager.py +53 -43
  26. lamindb/core/_label_manager.py +4 -4
  27. lamindb/core/_mapped_collection.py +24 -9
  28. lamindb/core/_track_environment.py +2 -1
  29. lamindb/core/datasets/__init__.py +6 -1
  30. lamindb/core/datasets/_core.py +12 -11
  31. lamindb/core/datasets/_small.py +67 -21
  32. lamindb/core/exceptions.py +1 -90
  33. lamindb/core/loaders.py +21 -15
  34. lamindb/core/relations.py +6 -4
  35. lamindb/core/storage/_anndata_accessor.py +49 -3
  36. lamindb/core/storage/_backed_access.py +12 -7
  37. lamindb/core/storage/_pyarrow_dataset.py +40 -15
  38. lamindb/core/storage/_tiledbsoma.py +56 -12
  39. lamindb/core/storage/paths.py +30 -24
  40. lamindb/core/subsettings/_creation_settings.py +4 -16
  41. lamindb/curators/__init__.py +2193 -846
  42. lamindb/curators/_cellxgene_schemas/__init__.py +26 -0
  43. lamindb/curators/_cellxgene_schemas/schema_versions.yml +104 -0
  44. lamindb/errors.py +96 -0
  45. lamindb/integrations/_vitessce.py +3 -3
  46. lamindb/migrations/0069_squashed.py +76 -75
  47. lamindb/migrations/0075_lamindbv1_part5.py +4 -5
  48. lamindb/migrations/0082_alter_feature_dtype.py +21 -0
  49. lamindb/migrations/0083_alter_feature_is_type_alter_flextable_is_type_and_more.py +94 -0
  50. lamindb/migrations/0084_alter_schemafeature_feature_and_more.py +35 -0
  51. lamindb/migrations/0085_alter_feature_is_type_alter_flextable_is_type_and_more.py +63 -0
  52. lamindb/migrations/0086_various.py +95 -0
  53. lamindb/migrations/0087_rename__schemas_m2m_artifact_feature_sets_and_more.py +41 -0
  54. lamindb/migrations/0088_schema_components.py +273 -0
  55. lamindb/migrations/0088_squashed.py +4372 -0
  56. lamindb/models.py +475 -168
  57. {lamindb-1.0.5.dist-info → lamindb-1.1.1.dist-info}/METADATA +9 -7
  58. lamindb-1.1.1.dist-info/RECORD +95 -0
  59. lamindb/curators/_spatial.py +0 -528
  60. lamindb/migrations/0052_squashed.py +0 -1261
  61. lamindb/migrations/0053_alter_featureset_hash_alter_paramvalue_created_by_and_more.py +0 -57
  62. lamindb/migrations/0054_alter_feature_previous_runs_and_more.py +0 -35
  63. lamindb/migrations/0055_artifact_type_artifactparamvalue_and_more.py +0 -61
  64. lamindb/migrations/0056_rename_ulabel_ref_is_name_artifactulabel_label_ref_is_name_and_more.py +0 -22
  65. lamindb/migrations/0057_link_models_latest_report_and_others.py +0 -356
  66. lamindb/migrations/0058_artifact__actions_collection__actions.py +0 -22
  67. lamindb/migrations/0059_alter_artifact__accessor_alter_artifact__hash_type_and_more.py +0 -31
  68. lamindb/migrations/0060_alter_artifact__actions.py +0 -22
  69. lamindb/migrations/0061_alter_collection_meta_artifact_alter_run_environment_and_more.py +0 -45
  70. lamindb/migrations/0062_add_is_latest_field.py +0 -32
  71. lamindb/migrations/0063_populate_latest_field.py +0 -45
  72. lamindb/migrations/0064_alter_artifact_version_alter_collection_version_and_more.py +0 -33
  73. lamindb/migrations/0065_remove_collection_feature_sets_and_more.py +0 -22
  74. lamindb/migrations/0066_alter_artifact__feature_values_and_more.py +0 -352
  75. lamindb/migrations/0067_alter_featurevalue_unique_together_and_more.py +0 -20
  76. lamindb/migrations/0068_alter_artifactulabel_unique_together_and_more.py +0 -20
  77. lamindb/migrations/0069_alter_artifact__accessor_alter_artifact__hash_type_and_more.py +0 -1294
  78. lamindb-1.0.5.dist-info/RECORD +0 -102
  79. {lamindb-1.0.5.dist-info → lamindb-1.1.1.dist-info}/LICENSE +0 -0
  80. {lamindb-1.0.5.dist-info → lamindb-1.1.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,95 @@
1
+ # Generated by Django 5.2 on 2025-02-06 07:10
2
+
3
+ from django.db import migrations, models
4
+
5
+ import lamindb.base.fields
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("lamindb", "0085_alter_feature_is_type_alter_flextable_is_type_and_more"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.AlterField(
15
+ model_name="transform",
16
+ name="hash",
17
+ field=lamindb.base.fields.CharField(
18
+ blank=True,
19
+ db_index=True,
20
+ default=None,
21
+ max_length=22,
22
+ null=True,
23
+ unique=True,
24
+ ),
25
+ ),
26
+ migrations.AlterField(
27
+ model_name="artifact",
28
+ name="hash",
29
+ field=lamindb.base.fields.CharField(
30
+ blank=True,
31
+ db_index=True,
32
+ default=None,
33
+ max_length=22,
34
+ null=True,
35
+ unique=True,
36
+ ),
37
+ ),
38
+ migrations.AlterField(
39
+ model_name="collection",
40
+ name="hash",
41
+ field=lamindb.base.fields.CharField(
42
+ blank=True,
43
+ db_index=True,
44
+ default=None,
45
+ max_length=22,
46
+ null=True,
47
+ unique=True,
48
+ ),
49
+ ),
50
+ migrations.CreateModel(
51
+ name="Migration",
52
+ fields=[
53
+ (
54
+ "id",
55
+ models.BigAutoField(
56
+ auto_created=True,
57
+ primary_key=True,
58
+ serialize=False,
59
+ verbose_name="ID",
60
+ ),
61
+ ),
62
+ (
63
+ "app",
64
+ lamindb.base.fields.CharField(
65
+ blank=True, default=None, max_length=255
66
+ ),
67
+ ),
68
+ (
69
+ "name",
70
+ lamindb.base.fields.CharField(
71
+ blank=True, default=None, max_length=255
72
+ ),
73
+ ),
74
+ ("applied", lamindb.base.fields.DateTimeField(blank=True)),
75
+ ],
76
+ options={
77
+ "db_table": "django_migrations",
78
+ "managed": False,
79
+ },
80
+ ),
81
+ migrations.AlterField(
82
+ model_name="param",
83
+ name="dtype",
84
+ field=lamindb.base.fields.CharField(
85
+ blank=True, db_index=True, default=None, max_length=64, null=True
86
+ ),
87
+ ),
88
+ migrations.AlterField(
89
+ model_name="param",
90
+ name="dtype",
91
+ field=lamindb.base.fields.CharField(
92
+ blank=True, db_index=True, default=None, max_length=255, null=True
93
+ ),
94
+ ),
95
+ ]
@@ -0,0 +1,41 @@
1
+ # Generated by Django 5.2 on 2025-02-13 12:00
2
+
3
+ import django.db.models.deletion
4
+ from django.db import migrations, models
5
+
6
+ import lamindb.base.fields
7
+
8
+
9
+ class Migration(migrations.Migration):
10
+ dependencies = [
11
+ ("lamindb", "0086_various"),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.RenameField(
16
+ model_name="artifact",
17
+ old_name="_schemas_m2m",
18
+ new_name="feature_sets",
19
+ ),
20
+ migrations.AlterField(
21
+ model_name="artifact",
22
+ name="schema",
23
+ field=lamindb.base.fields.ForeignKey(
24
+ blank=True,
25
+ default=None,
26
+ null=True,
27
+ on_delete=django.db.models.deletion.PROTECT,
28
+ related_name="validated_artifacts",
29
+ to="lamindb.schema",
30
+ ),
31
+ ),
32
+ migrations.AlterField(
33
+ model_name="artifact",
34
+ name="feature_sets",
35
+ field=models.ManyToManyField(
36
+ related_name="artifacts",
37
+ through="lamindb.ArtifactSchema",
38
+ to="lamindb.schema",
39
+ ),
40
+ ),
41
+ ]
@@ -0,0 +1,273 @@
1
+ # Generated by Django 5.2 on 2025-02-17 11:21
2
+
3
+ import django.db.models.deletion
4
+ import django.db.models.functions.datetime
5
+ from django.db import migrations, models
6
+
7
+ import lamindb.base.fields
8
+ import lamindb.base.users
9
+ import lamindb.models
10
+
11
+
12
+ class Migration(migrations.Migration):
13
+ dependencies = [
14
+ ("lamindb", "0087_rename__schemas_m2m_artifact_feature_sets_and_more"),
15
+ ]
16
+
17
+ operations = [
18
+ migrations.AlterField(
19
+ model_name="artifactschema",
20
+ name="slot",
21
+ field=lamindb.base.fields.CharField(
22
+ blank=True, default=None, max_length=255, null=True
23
+ ),
24
+ ),
25
+ migrations.AlterField(
26
+ model_name="schema",
27
+ name="composite",
28
+ field=lamindb.base.fields.ForeignKey(
29
+ blank=True,
30
+ default=None,
31
+ null=True,
32
+ on_delete=django.db.models.deletion.PROTECT,
33
+ related_name="+",
34
+ to="lamindb.schema",
35
+ ),
36
+ ),
37
+ migrations.CreateModel(
38
+ name="SchemaComponent",
39
+ fields=[
40
+ (
41
+ "created_at",
42
+ lamindb.base.fields.DateTimeField(
43
+ blank=True,
44
+ db_default=django.db.models.functions.datetime.Now(),
45
+ db_index=True,
46
+ editable=False,
47
+ ),
48
+ ),
49
+ ("id", models.BigAutoField(primary_key=True, serialize=False)),
50
+ (
51
+ "slot",
52
+ lamindb.base.fields.CharField(
53
+ blank=True, default=None, max_length=255, null=True
54
+ ),
55
+ ),
56
+ (
57
+ "component",
58
+ lamindb.base.fields.ForeignKey(
59
+ blank=True,
60
+ on_delete=django.db.models.deletion.PROTECT,
61
+ related_name="links_component",
62
+ to="lamindb.schema",
63
+ ),
64
+ ),
65
+ (
66
+ "composite",
67
+ lamindb.base.fields.ForeignKey(
68
+ blank=True,
69
+ on_delete=django.db.models.deletion.CASCADE,
70
+ related_name="links_composite",
71
+ to="lamindb.schema",
72
+ ),
73
+ ),
74
+ (
75
+ "created_by",
76
+ lamindb.base.fields.ForeignKey(
77
+ blank=True,
78
+ default=lamindb.base.users.current_user_id,
79
+ editable=False,
80
+ on_delete=django.db.models.deletion.PROTECT,
81
+ related_name="+",
82
+ to="lamindb.user",
83
+ ),
84
+ ),
85
+ (
86
+ "run",
87
+ lamindb.base.fields.ForeignKey(
88
+ blank=True,
89
+ default=lamindb.models.current_run,
90
+ null=True,
91
+ on_delete=django.db.models.deletion.PROTECT,
92
+ related_name="+",
93
+ to="lamindb.run",
94
+ ),
95
+ ),
96
+ ],
97
+ options={
98
+ "unique_together": {("composite", "component")},
99
+ },
100
+ bases=(lamindb.models.LinkORM, models.Model),
101
+ ),
102
+ migrations.AddField(
103
+ model_name="schema",
104
+ name="components",
105
+ field=models.ManyToManyField(
106
+ related_name="composites",
107
+ through="lamindb.SchemaComponent",
108
+ to="lamindb.schema",
109
+ ),
110
+ ),
111
+ migrations.AlterUniqueTogether(
112
+ name="artifactschema",
113
+ unique_together={("artifact", "schema"), ("artifact", "slot")},
114
+ ),
115
+ migrations.AlterUniqueTogether(
116
+ name="schemacomponent",
117
+ unique_together={("composite", "component"), ("composite", "slot")},
118
+ ),
119
+ # unrelated, not on the SQL level, just switching "editable"
120
+ migrations.AlterField(
121
+ model_name="artifact",
122
+ name="_hash_type",
123
+ field=lamindb.base.fields.CharField(
124
+ blank=True,
125
+ db_index=True,
126
+ default=None,
127
+ editable=False,
128
+ max_length=30,
129
+ null=True,
130
+ ),
131
+ ),
132
+ migrations.AlterField(
133
+ model_name="artifact",
134
+ name="created_by",
135
+ field=lamindb.base.fields.ForeignKey(
136
+ blank=True,
137
+ default=lamindb.base.users.current_user_id,
138
+ editable=False,
139
+ on_delete=django.db.models.deletion.PROTECT,
140
+ related_name="created_artifacts",
141
+ to="lamindb.user",
142
+ ),
143
+ ),
144
+ migrations.AlterField(
145
+ model_name="artifact",
146
+ name="hash",
147
+ field=lamindb.base.fields.CharField(
148
+ blank=True,
149
+ db_index=True,
150
+ default=None,
151
+ editable=False,
152
+ max_length=22,
153
+ null=True,
154
+ unique=True,
155
+ ),
156
+ ),
157
+ migrations.AlterField(
158
+ model_name="artifact",
159
+ name="n_files",
160
+ field=lamindb.base.fields.BigIntegerField(
161
+ blank=True, db_index=True, default=None, editable=False, null=True
162
+ ),
163
+ ),
164
+ migrations.AlterField(
165
+ model_name="artifact",
166
+ name="n_observations",
167
+ field=lamindb.base.fields.BigIntegerField(
168
+ blank=True, db_index=True, default=None, editable=False, null=True
169
+ ),
170
+ ),
171
+ migrations.AlterField(
172
+ model_name="artifact",
173
+ name="otype",
174
+ field=lamindb.base.fields.CharField(
175
+ blank=True,
176
+ db_index=True,
177
+ default=None,
178
+ editable=False,
179
+ max_length=64,
180
+ null=True,
181
+ ),
182
+ ),
183
+ migrations.AlterField(
184
+ model_name="artifact",
185
+ name="run",
186
+ field=lamindb.base.fields.ForeignKey(
187
+ blank=True,
188
+ default=None,
189
+ editable=False,
190
+ null=True,
191
+ on_delete=django.db.models.deletion.PROTECT,
192
+ related_name="output_artifacts",
193
+ to="lamindb.run",
194
+ ),
195
+ ),
196
+ migrations.AlterField(
197
+ model_name="artifact",
198
+ name="size",
199
+ field=lamindb.base.fields.BigIntegerField(
200
+ blank=True, db_index=True, default=None, editable=False, null=True
201
+ ),
202
+ ),
203
+ migrations.AlterField(
204
+ model_name="artifact",
205
+ name="storage",
206
+ field=lamindb.base.fields.ForeignKey(
207
+ blank=True,
208
+ editable=False,
209
+ on_delete=django.db.models.deletion.PROTECT,
210
+ related_name="artifacts",
211
+ to="lamindb.storage",
212
+ ),
213
+ ),
214
+ migrations.AlterField(
215
+ model_name="artifact",
216
+ name="suffix",
217
+ field=lamindb.base.fields.CharField(
218
+ blank=True, db_index=True, default=None, editable=False, max_length=30
219
+ ),
220
+ ),
221
+ migrations.AlterField(
222
+ model_name="schema",
223
+ name="dtype",
224
+ field=lamindb.base.fields.CharField(
225
+ blank=True, default=None, editable=False, max_length=64, null=True
226
+ ),
227
+ ),
228
+ migrations.AlterField(
229
+ model_name="schema",
230
+ name="hash",
231
+ field=lamindb.base.fields.CharField(
232
+ blank=True,
233
+ db_index=True,
234
+ default=None,
235
+ editable=False,
236
+ max_length=22,
237
+ null=True,
238
+ ),
239
+ ),
240
+ migrations.AlterField(
241
+ model_name="schema",
242
+ name="itype",
243
+ field=lamindb.base.fields.CharField(
244
+ blank=True,
245
+ db_index=True,
246
+ default=None,
247
+ editable=False,
248
+ max_length=120,
249
+ null=True,
250
+ ),
251
+ ),
252
+ migrations.AlterField(
253
+ model_name="schema",
254
+ name="maximal_set",
255
+ field=lamindb.base.fields.BooleanField(
256
+ blank=True, db_index=True, default=False, editable=False
257
+ ),
258
+ ),
259
+ migrations.AlterField(
260
+ model_name="schema",
261
+ name="minimal_set",
262
+ field=lamindb.base.fields.BooleanField(
263
+ blank=True, db_index=True, default=True, editable=False
264
+ ),
265
+ ),
266
+ migrations.AlterField(
267
+ model_name="schema",
268
+ name="ordered_set",
269
+ field=lamindb.base.fields.BooleanField(
270
+ blank=True, db_index=True, default=False, editable=False
271
+ ),
272
+ ),
273
+ ]