lamindb 1.6.2__py3-none-any.whl → 1.7.0__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 -3
- lamindb/_finish.py +32 -16
- lamindb/base/types.py +6 -4
- lamindb/core/_context.py +127 -57
- lamindb/core/_mapped_collection.py +1 -1
- lamindb/core/_settings.py +44 -4
- lamindb/core/_track_environment.py +5 -2
- lamindb/core/loaders.py +1 -1
- lamindb/core/storage/_anndata_accessor.py +1 -1
- lamindb/core/storage/_tiledbsoma.py +14 -8
- lamindb/core/storage/_valid_suffixes.py +0 -1
- lamindb/core/storage/_zarr.py +1 -1
- lamindb/core/storage/objects.py +13 -8
- lamindb/core/storage/paths.py +9 -6
- lamindb/core/types.py +1 -1
- lamindb/curators/_legacy.py +2 -1
- lamindb/curators/core.py +106 -105
- lamindb/errors.py +9 -0
- lamindb/examples/fixtures/__init__.py +0 -0
- lamindb/examples/fixtures/sheets.py +224 -0
- lamindb/migrations/0103_remove_writelog_migration_state_and_more.py +1 -1
- lamindb/migrations/0105_record_unique_name.py +20 -0
- lamindb/migrations/0106_transfer_data_migration.py +25 -0
- lamindb/migrations/0107_add_schema_to_record.py +68 -0
- lamindb/migrations/0108_remove_record_sheet_remove_sheetproject_sheet_and_more.py +30 -0
- lamindb/migrations/0109_record_input_of_runs_alter_record_run_and_more.py +123 -0
- lamindb/migrations/0110_rename_values_artifacts_record_linked_artifacts.py +17 -0
- lamindb/migrations/0111_remove_record__sort_order.py +148 -0
- lamindb/migrations/0112_alter_recordartifact_feature_and_more.py +105 -0
- lamindb/migrations/0113_lower_case_branch_and_space_names.py +62 -0
- lamindb/migrations/0114_alter_run__status_code.py +24 -0
- lamindb/migrations/0115_alter_space_uid.py +52 -0
- lamindb/migrations/{0104_squashed.py → 0115_squashed.py} +261 -257
- lamindb/models/__init__.py +4 -3
- lamindb/models/_describe.py +88 -31
- lamindb/models/_feature_manager.py +627 -658
- lamindb/models/_label_manager.py +1 -3
- lamindb/models/artifact.py +214 -99
- lamindb/models/collection.py +7 -1
- lamindb/models/feature.py +288 -60
- lamindb/models/has_parents.py +3 -3
- lamindb/models/project.py +32 -15
- lamindb/models/query_manager.py +7 -1
- lamindb/models/query_set.py +118 -41
- lamindb/models/record.py +140 -94
- lamindb/models/run.py +42 -42
- lamindb/models/save.py +102 -16
- lamindb/models/schema.py +41 -8
- lamindb/models/sqlrecord.py +105 -40
- lamindb/models/storage.py +278 -0
- lamindb/models/transform.py +10 -2
- lamindb/models/ulabel.py +9 -1
- lamindb/py.typed +0 -0
- lamindb/setup/__init__.py +2 -1
- lamindb/setup/_switch.py +16 -0
- lamindb/setup/errors/__init__.py +4 -0
- lamindb/setup/types/__init__.py +4 -0
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/METADATA +5 -5
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/RECORD +61 -44
- lamindb/models/core.py +0 -135
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/LICENSE +0 -0
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,105 @@
|
|
1
|
+
# Generated by Django 5.2 on 2025-07-04 20:43
|
2
|
+
|
3
|
+
import django.db.models.deletion
|
4
|
+
from django.db import migrations
|
5
|
+
|
6
|
+
import lamindb.base.fields
|
7
|
+
|
8
|
+
|
9
|
+
class Migration(migrations.Migration):
|
10
|
+
dependencies = [
|
11
|
+
("lamindb", "0111_remove_record__sort_order"),
|
12
|
+
]
|
13
|
+
|
14
|
+
operations = [
|
15
|
+
migrations.AlterField(
|
16
|
+
model_name="recordartifact",
|
17
|
+
name="feature",
|
18
|
+
field=lamindb.base.fields.ForeignKey(
|
19
|
+
blank=True,
|
20
|
+
on_delete=django.db.models.deletion.PROTECT,
|
21
|
+
related_name="links_recordartifact",
|
22
|
+
to="lamindb.feature",
|
23
|
+
),
|
24
|
+
),
|
25
|
+
migrations.AlterField(
|
26
|
+
model_name="recordjson",
|
27
|
+
name="feature",
|
28
|
+
field=lamindb.base.fields.ForeignKey(
|
29
|
+
blank=True,
|
30
|
+
on_delete=django.db.models.deletion.PROTECT,
|
31
|
+
related_name="links_recordjson",
|
32
|
+
to="lamindb.feature",
|
33
|
+
),
|
34
|
+
),
|
35
|
+
migrations.AlterField(
|
36
|
+
model_name="recordrecord",
|
37
|
+
name="feature",
|
38
|
+
field=lamindb.base.fields.ForeignKey(
|
39
|
+
blank=True,
|
40
|
+
on_delete=django.db.models.deletion.PROTECT,
|
41
|
+
related_name="links_recordrecord",
|
42
|
+
to="lamindb.feature",
|
43
|
+
),
|
44
|
+
),
|
45
|
+
migrations.AlterField(
|
46
|
+
model_name="recordrun",
|
47
|
+
name="feature",
|
48
|
+
field=lamindb.base.fields.ForeignKey(
|
49
|
+
blank=True,
|
50
|
+
on_delete=django.db.models.deletion.PROTECT,
|
51
|
+
related_name="links_recordrun",
|
52
|
+
to="lamindb.feature",
|
53
|
+
),
|
54
|
+
),
|
55
|
+
migrations.AlterField(
|
56
|
+
model_name="recordulabel",
|
57
|
+
name="feature",
|
58
|
+
field=lamindb.base.fields.ForeignKey(
|
59
|
+
blank=True,
|
60
|
+
on_delete=django.db.models.deletion.PROTECT,
|
61
|
+
related_name="links_recordulabel",
|
62
|
+
to="lamindb.feature",
|
63
|
+
),
|
64
|
+
),
|
65
|
+
migrations.AlterField(
|
66
|
+
model_name="recordperson",
|
67
|
+
name="feature",
|
68
|
+
field=lamindb.base.fields.ForeignKey(
|
69
|
+
blank=True,
|
70
|
+
on_delete=django.db.models.deletion.PROTECT,
|
71
|
+
related_name="links_recordperson",
|
72
|
+
to="lamindb.feature",
|
73
|
+
),
|
74
|
+
),
|
75
|
+
migrations.AlterField(
|
76
|
+
model_name="recordproject",
|
77
|
+
name="feature",
|
78
|
+
field=lamindb.base.fields.ForeignKey(
|
79
|
+
blank=True,
|
80
|
+
on_delete=django.db.models.deletion.PROTECT,
|
81
|
+
related_name="links_recordproject",
|
82
|
+
to="lamindb.feature",
|
83
|
+
),
|
84
|
+
),
|
85
|
+
migrations.AlterField(
|
86
|
+
model_name="recordreference",
|
87
|
+
name="feature",
|
88
|
+
field=lamindb.base.fields.ForeignKey(
|
89
|
+
blank=True,
|
90
|
+
on_delete=django.db.models.deletion.PROTECT,
|
91
|
+
related_name="links_recordreference",
|
92
|
+
to="lamindb.feature",
|
93
|
+
),
|
94
|
+
),
|
95
|
+
migrations.AlterField(
|
96
|
+
model_name="recordartifact",
|
97
|
+
name="value",
|
98
|
+
field=lamindb.base.fields.ForeignKey(
|
99
|
+
blank=True,
|
100
|
+
on_delete=django.db.models.deletion.PROTECT,
|
101
|
+
related_name="links_in_record",
|
102
|
+
to="lamindb.artifact",
|
103
|
+
),
|
104
|
+
),
|
105
|
+
]
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import django.db.models.functions.text
|
2
|
+
from django.db import migrations, models
|
3
|
+
|
4
|
+
|
5
|
+
def lowercase_default_values(apps, schema_editor):
|
6
|
+
"""Lowercase default values for Space and Branch models."""
|
7
|
+
Space = apps.get_model("lamindb", "Space")
|
8
|
+
Branch = apps.get_model("lamindb", "Branch")
|
9
|
+
|
10
|
+
space = Space.objects.get(uid="A")
|
11
|
+
space.uid = "a"
|
12
|
+
space.name = "all"
|
13
|
+
space.save()
|
14
|
+
|
15
|
+
trash_branch = Branch.objects.get(uid="T")
|
16
|
+
trash_branch.uid = "t"
|
17
|
+
trash_branch.name = "trash"
|
18
|
+
trash_branch.save()
|
19
|
+
|
20
|
+
archive_branch = Branch.objects.get(uid="A")
|
21
|
+
archive_branch.uid = "a"
|
22
|
+
archive_branch.name = "archive"
|
23
|
+
archive_branch.save()
|
24
|
+
|
25
|
+
main_branch = Branch.objects.get(uid="M")
|
26
|
+
main_branch.uid = "m"
|
27
|
+
main_branch.name = "main"
|
28
|
+
main_branch.save()
|
29
|
+
|
30
|
+
|
31
|
+
class Migration(migrations.Migration):
|
32
|
+
dependencies = [
|
33
|
+
("lamindb", "0112_alter_recordartifact_feature_and_more"),
|
34
|
+
]
|
35
|
+
|
36
|
+
operations = [
|
37
|
+
migrations.RunPython(
|
38
|
+
lowercase_default_values,
|
39
|
+
),
|
40
|
+
migrations.AlterModelOptions(
|
41
|
+
name="branch",
|
42
|
+
options={},
|
43
|
+
),
|
44
|
+
migrations.AlterModelOptions(
|
45
|
+
name="space",
|
46
|
+
options={},
|
47
|
+
),
|
48
|
+
migrations.AddConstraint(
|
49
|
+
model_name="branch",
|
50
|
+
constraint=models.UniqueConstraint(
|
51
|
+
django.db.models.functions.text.Lower("name"),
|
52
|
+
name="unique_branch_name_lower",
|
53
|
+
),
|
54
|
+
),
|
55
|
+
migrations.AddConstraint(
|
56
|
+
model_name="space",
|
57
|
+
constraint=models.UniqueConstraint(
|
58
|
+
django.db.models.functions.text.Lower("name"),
|
59
|
+
name="unique_space_name_lower",
|
60
|
+
),
|
61
|
+
),
|
62
|
+
]
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Generated by Django 5.2 on 2025-07-06 08:47
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
dependencies = [
|
8
|
+
("lamindb", "0113_lower_case_branch_and_space_names"),
|
9
|
+
]
|
10
|
+
|
11
|
+
operations = [
|
12
|
+
migrations.AlterField(
|
13
|
+
model_name="run",
|
14
|
+
name="_status_code",
|
15
|
+
field=models.SmallIntegerField(db_index=True, default=None, null=True),
|
16
|
+
),
|
17
|
+
migrations.RunSQL(
|
18
|
+
sql="""
|
19
|
+
UPDATE lamindb_run
|
20
|
+
SET _status_code = NULL
|
21
|
+
WHERE _status_code = 0;
|
22
|
+
""",
|
23
|
+
),
|
24
|
+
]
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by Django 5.2 on 2025-07-06 23:09
|
2
|
+
|
3
|
+
from django.db import migrations
|
4
|
+
|
5
|
+
import lamindb.base.fields
|
6
|
+
|
7
|
+
|
8
|
+
def extenddefault_values(apps, schema_editor):
|
9
|
+
"""Lowercase default values for Space and Branch models."""
|
10
|
+
Space = apps.get_model("lamindb", "Space")
|
11
|
+
Branch = apps.get_model("lamindb", "Branch")
|
12
|
+
|
13
|
+
space = Space.objects.get(uid="a")
|
14
|
+
space.uid = 12 * "a"
|
15
|
+
space.save()
|
16
|
+
|
17
|
+
trash_branch = Branch.objects.get(uid="t")
|
18
|
+
trash_branch.uid = 12 * "t"
|
19
|
+
trash_branch.save()
|
20
|
+
|
21
|
+
archive_branch = Branch.objects.get(uid="a")
|
22
|
+
archive_branch.uid = 12 * "a"
|
23
|
+
archive_branch.save()
|
24
|
+
|
25
|
+
main_branch = Branch.objects.get(uid="m")
|
26
|
+
main_branch.uid = 12 * "m"
|
27
|
+
main_branch.save()
|
28
|
+
|
29
|
+
|
30
|
+
class Migration(migrations.Migration):
|
31
|
+
dependencies = [
|
32
|
+
("lamindb", "0114_alter_run__status_code"),
|
33
|
+
]
|
34
|
+
|
35
|
+
operations = [
|
36
|
+
migrations.AlterField(
|
37
|
+
model_name="space",
|
38
|
+
name="uid",
|
39
|
+
field=lamindb.base.fields.CharField(
|
40
|
+
blank=True,
|
41
|
+
db_default="aaaaaaaaaaaa",
|
42
|
+
db_index=True,
|
43
|
+
default="aaaaaaaaaaaaa",
|
44
|
+
editable=False,
|
45
|
+
max_length=12,
|
46
|
+
unique=True,
|
47
|
+
),
|
48
|
+
),
|
49
|
+
migrations.RunPython(
|
50
|
+
extenddefault_values,
|
51
|
+
),
|
52
|
+
]
|