heritage-models 1.0.0__tar.gz
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.
- heritage_models-1.0.0/PKG-INFO +10 -0
- heritage_models-1.0.0/heritage_models.egg-info/PKG-INFO +10 -0
- heritage_models-1.0.0/heritage_models.egg-info/SOURCES.txt +7 -0
- heritage_models-1.0.0/heritage_models.egg-info/dependency_links.txt +1 -0
- heritage_models-1.0.0/heritage_models.egg-info/requires.txt +5 -0
- heritage_models-1.0.0/heritage_models.egg-info/top_level.txt +1 -0
- heritage_models-1.0.0/models.py +144 -0
- heritage_models-1.0.0/pyproject.toml +19 -0
- heritage_models-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: heritage-models
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Canonical heritage science data models — Pydantic v2 types auto-generated from heritage-types TypeSpec schemas
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Requires-Dist: pydantic>=2
|
|
8
|
+
Provides-Extra: dev
|
|
9
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
10
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: heritage-models
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Canonical heritage science data models — Pydantic v2 types auto-generated from heritage-types TypeSpec schemas
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Requires-Dist: pydantic>=2
|
|
8
|
+
Provides-Extra: dev
|
|
9
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
10
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
models
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: heritage-data-package-inlined.json
|
|
3
|
+
# timestamp: 2026-06-12T05:17:07+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from pydantic import BaseModel, Field, RootModel
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class HeritageDataPackage(RootModel[Any]):
|
|
13
|
+
root: Any
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class MaterialClass(RootModel[Any]):
|
|
17
|
+
root: Any
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class RelationshipType(RootModel[Any]):
|
|
21
|
+
root: Any
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class SampleType(RootModel[Any]):
|
|
25
|
+
root: Any
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class UnitType(RootModel[Any]):
|
|
29
|
+
root: Any
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Datetime(RootModel[Any]):
|
|
33
|
+
root: Any
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class FieldId(RootModel[Any]):
|
|
37
|
+
root: Any
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class Uuid(RootModel[Any]):
|
|
41
|
+
root: Any
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class SiteMetadata(BaseModel):
|
|
45
|
+
projectId: Uuid
|
|
46
|
+
projectName: str
|
|
47
|
+
jurisdiction: str | None = None
|
|
48
|
+
gridReference: str | None = None
|
|
49
|
+
epsgCode: int | None = Field(None, ge=-2147483648, le=2147483647)
|
|
50
|
+
director: str | None = None
|
|
51
|
+
siteCode: str | None = None
|
|
52
|
+
excavationYear: str | None = None
|
|
53
|
+
createdAt: Datetime | None = None
|
|
54
|
+
updatedAt: Datetime | None = None
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class StratigraphicUnit(BaseModel):
|
|
58
|
+
id: Uuid
|
|
59
|
+
contextNumber: FieldId
|
|
60
|
+
unitType: UnitType
|
|
61
|
+
description: str | None = None
|
|
62
|
+
interpretation: str | None = None
|
|
63
|
+
period: str | None = None
|
|
64
|
+
phase: str | None = None
|
|
65
|
+
length_m: float | None = None
|
|
66
|
+
width_m: float | None = None
|
|
67
|
+
depth_m: float | None = None
|
|
68
|
+
mediaPresent: bool | None = None
|
|
69
|
+
confidence: float | None = None
|
|
70
|
+
findIds: list[Uuid] | None = None
|
|
71
|
+
sampleIds: list[Uuid] | None = None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class StratigraphicRelationship(BaseModel):
|
|
75
|
+
id: Uuid
|
|
76
|
+
sourceId: Uuid
|
|
77
|
+
targetId: Uuid
|
|
78
|
+
relationshipType: RelationshipType
|
|
79
|
+
confidence: float | None = None
|
|
80
|
+
notes: str | None = None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class Find(BaseModel):
|
|
84
|
+
id: Uuid
|
|
85
|
+
contextId: Uuid
|
|
86
|
+
findNumber: str | None = None
|
|
87
|
+
materialClass: MaterialClass
|
|
88
|
+
typology: str | None = None
|
|
89
|
+
count: int | None = Field(None, ge=-2147483648, le=2147483647)
|
|
90
|
+
weight_g: float | None = None
|
|
91
|
+
period: str | None = None
|
|
92
|
+
description: str | None = None
|
|
93
|
+
recorded: bool | None = None
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class Sample(BaseModel):
|
|
97
|
+
id: Uuid
|
|
98
|
+
contextId: Uuid
|
|
99
|
+
sampleId: str | None = None
|
|
100
|
+
sampleType: SampleType
|
|
101
|
+
volume_l: float | None = None
|
|
102
|
+
weight_g: float | None = None
|
|
103
|
+
notes: str | None = None
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class Chronology(BaseModel):
|
|
107
|
+
id: Uuid
|
|
108
|
+
sampleId: Uuid | None = None
|
|
109
|
+
contextId: Uuid | None = None
|
|
110
|
+
labCode: str | None = None
|
|
111
|
+
uncalBp: int | None = Field(None, ge=-2147483648, le=2147483647)
|
|
112
|
+
error: int | None = Field(None, ge=-2147483648, le=2147483647)
|
|
113
|
+
calibrationCurve: str | None = None
|
|
114
|
+
calibratedRange68: str | None = None
|
|
115
|
+
calibratedRange95: str | None = None
|
|
116
|
+
datingMethod: str | None = None
|
|
117
|
+
datedMaterial: str | None = None
|
|
118
|
+
delta13C: float | None = None
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class DigitalAsset(BaseModel):
|
|
122
|
+
id: Uuid
|
|
123
|
+
contextId: Uuid | None = None
|
|
124
|
+
filePath: str
|
|
125
|
+
assetType: str
|
|
126
|
+
mimeType: str | None = None
|
|
127
|
+
fileSizeBytes: str | None = None
|
|
128
|
+
checksumSha256: str | None = None
|
|
129
|
+
caption: str | None = None
|
|
130
|
+
orientation: str | None = None
|
|
131
|
+
scale: str | None = None
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class HeritageDataPackage1(BaseModel):
|
|
135
|
+
schemaVersion: str
|
|
136
|
+
createdAt: Datetime
|
|
137
|
+
provenance: str | None = None
|
|
138
|
+
metadata: SiteMetadata | None = None
|
|
139
|
+
contexts: list[StratigraphicUnit]
|
|
140
|
+
relationships: list[StratigraphicRelationship]
|
|
141
|
+
finds: list[Find]
|
|
142
|
+
samples: list[Sample]
|
|
143
|
+
dates: list[Chronology]
|
|
144
|
+
assets: list[DigitalAsset]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "heritage-models"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Canonical heritage science data models — Pydantic v2 types auto-generated from heritage-types TypeSpec schemas"
|
|
9
|
+
requires-python = ">=3.11"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
dependencies = [
|
|
12
|
+
"pydantic>=2",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.optional-dependencies]
|
|
16
|
+
dev = [
|
|
17
|
+
"pytest>=8",
|
|
18
|
+
"ruff>=0.4",
|
|
19
|
+
]
|