Skip to content

Commit e6ac83e

Browse files
authored
Merge 208402d into b121182
2 parents b121182 + 208402d commit e6ac83e

File tree

12 files changed

+1810
-0
lines changed

12 files changed

+1810
-0
lines changed

pydatalab/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ dependencies = [
2727
"pint ~= 0.24",
2828
"pandas[excel] ~= 2.2",
2929
"pymongo ~= 4.7",
30+
"deepdiff ~= 8.1",
3031
]
3132

3233
[project.urls]

pydatalab/schemas/cell.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
"title": "Revisions",
3737
"type": "object"
3838
},
39+
"version": {
40+
"title": "Version",
41+
"default": 1,
42+
"type": "integer"
43+
},
3944
"creator_ids": {
4045
"title": "Creator Ids",
4146
"default": [],
@@ -525,6 +530,11 @@
525530
"title": "Revisions",
526531
"type": "object"
527532
},
533+
"version": {
534+
"title": "Version",
535+
"default": 1,
536+
"type": "integer"
537+
},
528538
"creator_ids": {
529539
"title": "Creator Ids",
530540
"default": [],

pydatalab/schemas/equipment.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
"title": "Revisions",
3737
"type": "object"
3838
},
39+
"version": {
40+
"title": "Version",
41+
"default": 1,
42+
"type": "integer"
43+
},
3944
"creator_ids": {
4045
"title": "Creator Ids",
4146
"default": [],
@@ -489,6 +494,11 @@
489494
"title": "Revisions",
490495
"type": "object"
491496
},
497+
"version": {
498+
"title": "Version",
499+
"default": 1,
500+
"type": "integer"
501+
},
492502
"creator_ids": {
493503
"title": "Creator Ids",
494504
"default": [],

pydatalab/schemas/sample.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
"title": "Revisions",
4949
"type": "object"
5050
},
51+
"version": {
52+
"title": "Version",
53+
"default": 1,
54+
"type": "integer"
55+
},
5156
"creator_ids": {
5257
"title": "Creator Ids",
5358
"default": [],
@@ -578,6 +583,11 @@
578583
"title": "Revisions",
579584
"type": "object"
580585
},
586+
"version": {
587+
"title": "Version",
588+
"default": 1,
589+
"type": "integer"
590+
},
581591
"creator_ids": {
582592
"title": "Creator Ids",
583593
"default": [],

pydatalab/schemas/startingmaterial.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
"title": "Revisions",
4949
"type": "object"
5050
},
51+
"version": {
52+
"title": "Version",
53+
"default": 1,
54+
"type": "integer"
55+
},
5156
"creator_ids": {
5257
"title": "Creator Ids",
5358
"default": [],
@@ -631,6 +636,11 @@
631636
"title": "Revisions",
632637
"type": "object"
633638
},
639+
"version": {
640+
"title": "Version",
641+
"default": 1,
642+
"type": "integer"
643+
},
634644
"creator_ids": {
635645
"title": "Creator Ids",
636646
"default": [],

pydatalab/src/pydatalab/models/traits.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class HasRevisionControl(BaseModel):
2222
revisions: dict[int, Any] | None = None
2323
"""An optional mapping from old revision numbers to the model state at that revision."""
2424

25+
version: int = 1
26+
"""The version number used by the version control system for tracking snapshots."""
27+
2528

2629
class HasBlocks(BaseModel):
2730
blocks_obj: dict[str, DataBlockResponse] = Field({})

0 commit comments

Comments
 (0)