clarity-api-sdk-python 0.2.13__tar.gz → 0.3.14__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.
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/PKG-INFO +17 -1
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/README.md +4 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/pyproject.toml +17 -1
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/clarity_api_sdk_python.egg-info/PKG-INFO +17 -1
- clarity_api_sdk_python-0.3.14/src/clarity_api_sdk_python.egg-info/SOURCES.txt +52 -0
- clarity_api_sdk_python-0.3.14/src/clarity_api_sdk_python.egg-info/requires.txt +25 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/__init__.py +0 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/altitude_source.py +66 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/attitude_source.py +94 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/depth_source.py +86 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/device.py +92 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/device_type.py +60 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/final_product.py +66 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/hierarchy.py +33 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/layback_algorithm.py +47 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/layback_source.py +68 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/layback_type.py +47 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/organization.py +42 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/platform.py +55 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/platform_type.py +53 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/position_source.py +85 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/processed_altitude.py +52 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/processed_attitude.py +60 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/processed_depth.py +66 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/processed_layback.py +66 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/processed_position.py +78 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/processed_sidescan_ping.py +68 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/processing_log.py +70 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/project.py +52 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/projection_option.py +42 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/raw_altitude.py +66 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/raw_attitude.py +78 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/raw_depth.py +66 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/raw_layback.py +66 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/raw_position.py +114 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/raw_sidescan_ping.py +67 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/s3.py +51 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/sidescan_ping_source.py +106 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/source.py +88 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/survey.py +70 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/target.py +55 -0
- clarity_api_sdk_python-0.3.14/src/cti/model/tow_system.py +49 -0
- clarity_api_sdk_python-0.2.13/src/clarity_api_sdk_python.egg-info/SOURCES.txt +0 -16
- clarity_api_sdk_python-0.2.13/src/clarity_api_sdk_python.egg-info/requires.txt +0 -12
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/setup.cfg +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/clarity_api_sdk_python.egg-info/dependency_links.txt +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/clarity_api_sdk_python.egg-info/top_level.txt +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/__init__.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/api/__init__.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/api/async_client.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/api/client.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/api/session.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/logger/__init__.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/logger/logger.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/main.py +0 -0
- {clarity_api_sdk_python-0.2.13 → clarity_api_sdk_python-0.3.14}/src/cti/main_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clarity-api-sdk-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.14
|
|
4
4
|
Summary: A Python SDK to connect to the CTI Clarity API server.
|
|
5
5
|
Author-email: "Chesapeake Technology Inc." <support@chesapeaketech.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/chesapeake-tech/clarity-api-sdk-python
|
|
@@ -14,7 +14,19 @@ Requires-Dist: brotli
|
|
|
14
14
|
Requires-Dist: h2
|
|
15
15
|
Requires-Dist: httpx_auth>=0.23.1
|
|
16
16
|
Requires-Dist: httpx-retries>=0.4.5
|
|
17
|
+
Requires-Dist: pydantic==2.12.3
|
|
17
18
|
Requires-Dist: structlog
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: black==25.9.0; extra == "dev"
|
|
21
|
+
Requires-Dist: build==1.3.0; extra == "dev"
|
|
22
|
+
Requires-Dist: mypy==1.18.2; extra == "dev"
|
|
23
|
+
Requires-Dist: pre-commit==4.3.0; extra == "dev"
|
|
24
|
+
Requires-Dist: pylint==3.3.8; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest==8.4.2; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-asyncio==1.3.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-md==0.2.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-mock==3.15.1; extra == "dev"
|
|
29
|
+
Requires-Dist: twine==6.2.0; extra == "dev"
|
|
18
30
|
Provides-Extra: brotli
|
|
19
31
|
Requires-Dist: httpx[brotli]>=0.28.1; extra == "brotli"
|
|
20
32
|
Provides-Extra: http2
|
|
@@ -78,6 +90,10 @@ logger_b.info("This info message from logger_b should NOT be visible.")
|
|
|
78
90
|
logger_b.warning("This is warning message from logger_b")
|
|
79
91
|
```
|
|
80
92
|
|
|
93
|
+
## Model
|
|
94
|
+
|
|
95
|
+
Pydantic models.
|
|
96
|
+
|
|
81
97
|
## API
|
|
82
98
|
|
|
83
99
|
### Singleton async client
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "clarity-api-sdk-python"
|
|
8
|
-
version = "0.
|
|
8
|
+
version = "0.3.14"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name="Chesapeake Technology Inc.", email="support@chesapeaketech.com" },
|
|
11
11
|
]
|
|
@@ -23,10 +23,23 @@ dependencies = [
|
|
|
23
23
|
"h2",
|
|
24
24
|
"httpx_auth>=0.23.1",
|
|
25
25
|
"httpx-retries>=0.4.5",
|
|
26
|
+
"pydantic==2.12.3",
|
|
26
27
|
"structlog",
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
[project.optional-dependencies]
|
|
31
|
+
dev = [
|
|
32
|
+
"black==25.9.0",
|
|
33
|
+
"build==1.3.0",
|
|
34
|
+
"mypy==1.18.2",
|
|
35
|
+
"pre-commit==4.3.0",
|
|
36
|
+
"pylint==3.3.8",
|
|
37
|
+
"pytest==8.4.2",
|
|
38
|
+
"pytest-asyncio==1.3.0",
|
|
39
|
+
"pytest-md==0.2.0",
|
|
40
|
+
"pytest-mock==3.15.1",
|
|
41
|
+
"twine==6.2.0"
|
|
42
|
+
]
|
|
30
43
|
brotli = ["httpx[brotli]>=0.28.1"]
|
|
31
44
|
http2 = ["httpx[http2]>=0.28.1"]
|
|
32
45
|
|
|
@@ -35,3 +48,6 @@ http2 = ["httpx[http2]>=0.28.1"]
|
|
|
35
48
|
|
|
36
49
|
[tool.setuptools.packages.find]
|
|
37
50
|
where = ["src"]
|
|
51
|
+
|
|
52
|
+
[tool.pylint.main]
|
|
53
|
+
max-line-length = 150
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clarity-api-sdk-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.14
|
|
4
4
|
Summary: A Python SDK to connect to the CTI Clarity API server.
|
|
5
5
|
Author-email: "Chesapeake Technology Inc." <support@chesapeaketech.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/chesapeake-tech/clarity-api-sdk-python
|
|
@@ -14,7 +14,19 @@ Requires-Dist: brotli
|
|
|
14
14
|
Requires-Dist: h2
|
|
15
15
|
Requires-Dist: httpx_auth>=0.23.1
|
|
16
16
|
Requires-Dist: httpx-retries>=0.4.5
|
|
17
|
+
Requires-Dist: pydantic==2.12.3
|
|
17
18
|
Requires-Dist: structlog
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: black==25.9.0; extra == "dev"
|
|
21
|
+
Requires-Dist: build==1.3.0; extra == "dev"
|
|
22
|
+
Requires-Dist: mypy==1.18.2; extra == "dev"
|
|
23
|
+
Requires-Dist: pre-commit==4.3.0; extra == "dev"
|
|
24
|
+
Requires-Dist: pylint==3.3.8; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest==8.4.2; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-asyncio==1.3.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-md==0.2.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-mock==3.15.1; extra == "dev"
|
|
29
|
+
Requires-Dist: twine==6.2.0; extra == "dev"
|
|
18
30
|
Provides-Extra: brotli
|
|
19
31
|
Requires-Dist: httpx[brotli]>=0.28.1; extra == "brotli"
|
|
20
32
|
Provides-Extra: http2
|
|
@@ -78,6 +90,10 @@ logger_b.info("This info message from logger_b should NOT be visible.")
|
|
|
78
90
|
logger_b.warning("This is warning message from logger_b")
|
|
79
91
|
```
|
|
80
92
|
|
|
93
|
+
## Model
|
|
94
|
+
|
|
95
|
+
Pydantic models.
|
|
96
|
+
|
|
81
97
|
## API
|
|
82
98
|
|
|
83
99
|
### Singleton async client
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/clarity_api_sdk_python.egg-info/PKG-INFO
|
|
4
|
+
src/clarity_api_sdk_python.egg-info/SOURCES.txt
|
|
5
|
+
src/clarity_api_sdk_python.egg-info/dependency_links.txt
|
|
6
|
+
src/clarity_api_sdk_python.egg-info/requires.txt
|
|
7
|
+
src/clarity_api_sdk_python.egg-info/top_level.txt
|
|
8
|
+
src/cti/__init__.py
|
|
9
|
+
src/cti/main.py
|
|
10
|
+
src/cti/main_api.py
|
|
11
|
+
src/cti/api/__init__.py
|
|
12
|
+
src/cti/api/async_client.py
|
|
13
|
+
src/cti/api/client.py
|
|
14
|
+
src/cti/api/session.py
|
|
15
|
+
src/cti/logger/__init__.py
|
|
16
|
+
src/cti/logger/logger.py
|
|
17
|
+
src/cti/model/__init__.py
|
|
18
|
+
src/cti/model/altitude_source.py
|
|
19
|
+
src/cti/model/attitude_source.py
|
|
20
|
+
src/cti/model/depth_source.py
|
|
21
|
+
src/cti/model/device.py
|
|
22
|
+
src/cti/model/device_type.py
|
|
23
|
+
src/cti/model/final_product.py
|
|
24
|
+
src/cti/model/hierarchy.py
|
|
25
|
+
src/cti/model/layback_algorithm.py
|
|
26
|
+
src/cti/model/layback_source.py
|
|
27
|
+
src/cti/model/layback_type.py
|
|
28
|
+
src/cti/model/organization.py
|
|
29
|
+
src/cti/model/platform.py
|
|
30
|
+
src/cti/model/platform_type.py
|
|
31
|
+
src/cti/model/position_source.py
|
|
32
|
+
src/cti/model/processed_altitude.py
|
|
33
|
+
src/cti/model/processed_attitude.py
|
|
34
|
+
src/cti/model/processed_depth.py
|
|
35
|
+
src/cti/model/processed_layback.py
|
|
36
|
+
src/cti/model/processed_position.py
|
|
37
|
+
src/cti/model/processed_sidescan_ping.py
|
|
38
|
+
src/cti/model/processing_log.py
|
|
39
|
+
src/cti/model/project.py
|
|
40
|
+
src/cti/model/projection_option.py
|
|
41
|
+
src/cti/model/raw_altitude.py
|
|
42
|
+
src/cti/model/raw_attitude.py
|
|
43
|
+
src/cti/model/raw_depth.py
|
|
44
|
+
src/cti/model/raw_layback.py
|
|
45
|
+
src/cti/model/raw_position.py
|
|
46
|
+
src/cti/model/raw_sidescan_ping.py
|
|
47
|
+
src/cti/model/s3.py
|
|
48
|
+
src/cti/model/sidescan_ping_source.py
|
|
49
|
+
src/cti/model/source.py
|
|
50
|
+
src/cti/model/survey.py
|
|
51
|
+
src/cti/model/target.py
|
|
52
|
+
src/cti/model/tow_system.py
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
httpx>=0.28.1
|
|
2
|
+
brotli
|
|
3
|
+
h2
|
|
4
|
+
httpx_auth>=0.23.1
|
|
5
|
+
httpx-retries>=0.4.5
|
|
6
|
+
pydantic==2.12.3
|
|
7
|
+
structlog
|
|
8
|
+
|
|
9
|
+
[brotli]
|
|
10
|
+
httpx[brotli]>=0.28.1
|
|
11
|
+
|
|
12
|
+
[dev]
|
|
13
|
+
black==25.9.0
|
|
14
|
+
build==1.3.0
|
|
15
|
+
mypy==1.18.2
|
|
16
|
+
pre-commit==4.3.0
|
|
17
|
+
pylint==3.3.8
|
|
18
|
+
pytest==8.4.2
|
|
19
|
+
pytest-asyncio==1.3.0
|
|
20
|
+
pytest-md==0.2.0
|
|
21
|
+
pytest-mock==3.15.1
|
|
22
|
+
twine==6.2.0
|
|
23
|
+
|
|
24
|
+
[http2]
|
|
25
|
+
httpx[http2]>=0.28.1
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Pydantic models for altitude source data."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AltitudeSourceBase(BaseModel):
|
|
10
|
+
"""Base model for altitude source data.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
input_timezone: Input timezone string.
|
|
14
|
+
start_time: Start timestamp.
|
|
15
|
+
end_time: End timestamp.
|
|
16
|
+
channels: Number of channels.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
input_timezone: str
|
|
20
|
+
start_time: datetime
|
|
21
|
+
end_time: datetime
|
|
22
|
+
channels: int
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class AltitudeSourceCreate(AltitudeSourceBase):
|
|
26
|
+
"""Model for creating altitude source data.
|
|
27
|
+
|
|
28
|
+
Attributes:
|
|
29
|
+
device_id: Foreign key reference to Device.
|
|
30
|
+
source_id: Foreign key reference to Source.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
device_id: UUID
|
|
34
|
+
source_id: UUID
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class AltitudeSourceUpdate(BaseModel):
|
|
38
|
+
"""Model for updating altitude source data.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
input_timezone: Input timezone string.
|
|
42
|
+
start_time: Start timestamp.
|
|
43
|
+
end_time: End timestamp.
|
|
44
|
+
channels: Number of channels.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
input_timezone: str | None = None
|
|
48
|
+
start_time: datetime | None = None
|
|
49
|
+
end_time: datetime | None = None
|
|
50
|
+
channels: int | None = None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class AltitudeSource(AltitudeSourceBase):
|
|
54
|
+
"""Model for altitude source data with database fields.
|
|
55
|
+
|
|
56
|
+
Attributes:
|
|
57
|
+
altitude_source_id: Unique identifier for the altitude source.
|
|
58
|
+
device_id: Foreign key reference to Device.
|
|
59
|
+
source_id: Foreign key reference to Source.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
altitude_source_id: UUID
|
|
63
|
+
device_id: UUID
|
|
64
|
+
source_id: UUID
|
|
65
|
+
|
|
66
|
+
model_config = ConfigDict(from_attributes=True)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""Pydantic models for attitude source data."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AttitudeSourceBase(BaseModel):
|
|
10
|
+
"""Base model for attitude source data.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
input_timezone: Input timezone string.
|
|
14
|
+
channels: Number of channels.
|
|
15
|
+
start_time: Start timestamp.
|
|
16
|
+
end_time: End timestamp.
|
|
17
|
+
sample_rate: Sample rate in Hz.
|
|
18
|
+
projection_option: Foreign key reference to ProjectionOption.
|
|
19
|
+
apply_pitch: Whether to apply pitch correction.
|
|
20
|
+
offset_roll: Roll offset value.
|
|
21
|
+
offset_pitch: Pitch offset value.
|
|
22
|
+
offset_heading: Heading offset value.
|
|
23
|
+
offset_time: Time offset value.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
input_timezone: str
|
|
27
|
+
channels: int
|
|
28
|
+
start_time: datetime
|
|
29
|
+
end_time: datetime
|
|
30
|
+
sample_rate: float | None = None
|
|
31
|
+
projection_option: UUID
|
|
32
|
+
apply_pitch: bool | None = None
|
|
33
|
+
offset_roll: float | None = None
|
|
34
|
+
offset_pitch: float | None = None
|
|
35
|
+
offset_heading: float | None = None
|
|
36
|
+
offset_time: float | None = None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class AttitudeSourceCreate(AttitudeSourceBase):
|
|
40
|
+
"""Model for creating attitude source data.
|
|
41
|
+
|
|
42
|
+
Attributes:
|
|
43
|
+
device_id: Foreign key reference to Device.
|
|
44
|
+
source_id: Foreign key reference to Source.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
device_id: UUID
|
|
48
|
+
source_id: UUID
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AttitudeSourceUpdate(BaseModel):
|
|
52
|
+
"""Model for updating attitude source data.
|
|
53
|
+
|
|
54
|
+
Attributes:
|
|
55
|
+
input_timezone: Input timezone string.
|
|
56
|
+
channels: Number of channels.
|
|
57
|
+
start_time: Start timestamp.
|
|
58
|
+
end_time: End timestamp.
|
|
59
|
+
sample_rate: Sample rate in Hz.
|
|
60
|
+
projection_option: Foreign key reference to ProjectionOption.
|
|
61
|
+
apply_pitch: Whether to apply pitch correction.
|
|
62
|
+
offset_roll: Roll offset value.
|
|
63
|
+
offset_pitch: Pitch offset value.
|
|
64
|
+
offset_heading: Heading offset value.
|
|
65
|
+
offset_time: Time offset value.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
input_timezone: str | None = None
|
|
69
|
+
channels: int | None = None
|
|
70
|
+
start_time: datetime | None = None
|
|
71
|
+
end_time: datetime | None = None
|
|
72
|
+
sample_rate: float | None = None
|
|
73
|
+
projection_option: UUID | None = None
|
|
74
|
+
apply_pitch: bool | None = None
|
|
75
|
+
offset_roll: float | None = None
|
|
76
|
+
offset_pitch: float | None = None
|
|
77
|
+
offset_heading: float | None = None
|
|
78
|
+
offset_time: float | None = None
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class AttitudeSource(AttitudeSourceBase):
|
|
82
|
+
"""Model for attitude source data with database fields.
|
|
83
|
+
|
|
84
|
+
Attributes:
|
|
85
|
+
attitude_source_id: Unique identifier for the attitude source.
|
|
86
|
+
device_id: Foreign key reference to Device.
|
|
87
|
+
source_id: Foreign key reference to Source.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
attitude_source_id: UUID
|
|
91
|
+
device_id: UUID
|
|
92
|
+
source_id: UUID
|
|
93
|
+
|
|
94
|
+
model_config = ConfigDict(from_attributes=True)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Pydantic models for depth source data."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DepthSourceBase(BaseModel):
|
|
10
|
+
"""Base model for depth source data.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
input_timezone: Input timezone string.
|
|
14
|
+
channels: Number of channels.
|
|
15
|
+
start_time: Start timestamp.
|
|
16
|
+
end_time: End timestamp.
|
|
17
|
+
records: Number of records.
|
|
18
|
+
sample_rate: Sample rate in Hz.
|
|
19
|
+
smoothing: Smoothing parameter.
|
|
20
|
+
offset_z: Z-axis offset.
|
|
21
|
+
offset_time: Time offset.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
input_timezone: str
|
|
25
|
+
channels: int
|
|
26
|
+
start_time: datetime
|
|
27
|
+
end_time: datetime
|
|
28
|
+
records: int | None = None
|
|
29
|
+
sample_rate: float | None = None
|
|
30
|
+
smoothing: float | None = None
|
|
31
|
+
offset_z: float | None = None
|
|
32
|
+
offset_time: float | None = None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class DepthSourceCreate(DepthSourceBase):
|
|
36
|
+
"""Model for creating depth source data.
|
|
37
|
+
|
|
38
|
+
Attributes:
|
|
39
|
+
device_id: Foreign key reference to Device.
|
|
40
|
+
source_id: Foreign key reference to Source.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
device_id: UUID
|
|
44
|
+
source_id: UUID
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class DepthSourceUpdate(BaseModel):
|
|
48
|
+
"""Model for updating depth source data.
|
|
49
|
+
|
|
50
|
+
Attributes:
|
|
51
|
+
input_timezone: Input timezone string.
|
|
52
|
+
channels: Number of channels.
|
|
53
|
+
start_time: Start timestamp.
|
|
54
|
+
end_time: End timestamp.
|
|
55
|
+
records: Number of records.
|
|
56
|
+
sample_rate: Sample rate in Hz.
|
|
57
|
+
smoothing: Smoothing parameter.
|
|
58
|
+
offset_z: Z-axis offset.
|
|
59
|
+
offset_time: Time offset.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
input_timezone: str | None = None
|
|
63
|
+
channels: int | None = None
|
|
64
|
+
start_time: datetime | None = None
|
|
65
|
+
end_time: datetime | None = None
|
|
66
|
+
records: int | None = None
|
|
67
|
+
sample_rate: float | None = None
|
|
68
|
+
smoothing: float | None = None
|
|
69
|
+
offset_z: float | None = None
|
|
70
|
+
offset_time: float | None = None
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class DepthSource(DepthSourceBase):
|
|
74
|
+
"""Model for depth source data with database fields.
|
|
75
|
+
|
|
76
|
+
Attributes:
|
|
77
|
+
depth_source_id: Unique identifier for the depth source.
|
|
78
|
+
device_id: Foreign key reference to Device.
|
|
79
|
+
source_id: Foreign key reference to Source.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
depth_source_id: UUID
|
|
83
|
+
device_id: UUID
|
|
84
|
+
source_id: UUID
|
|
85
|
+
|
|
86
|
+
model_config = ConfigDict(from_attributes=True)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""Pydantic models for device data."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeviceBase(BaseModel):
|
|
10
|
+
"""Base model for device data.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
name: Device name.
|
|
14
|
+
channels: Number of channels.
|
|
15
|
+
offset_x: X-axis offset.
|
|
16
|
+
offset_y: Y-axis offset.
|
|
17
|
+
offset_z: Z-axis offset.
|
|
18
|
+
offset_heading: Heading offset.
|
|
19
|
+
offset_pitch: Pitch offset.
|
|
20
|
+
offset_roll: Roll offset.
|
|
21
|
+
latency: Device latency.
|
|
22
|
+
is_towed: Whether the device is towed.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
name: str
|
|
26
|
+
channels: int
|
|
27
|
+
offset_x: float
|
|
28
|
+
offset_y: float
|
|
29
|
+
offset_z: float
|
|
30
|
+
offset_heading: float
|
|
31
|
+
offset_pitch: float
|
|
32
|
+
offset_roll: float
|
|
33
|
+
latency: float
|
|
34
|
+
is_towed: bool
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class DeviceCreate(DeviceBase):
|
|
38
|
+
"""Model for creating device data.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
platform_id: Foreign key reference to Platform.
|
|
42
|
+
device_type_id: Foreign key reference to DeviceType.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
platform_id: UUID
|
|
46
|
+
device_type_id: UUID
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class DeviceUpdate(DeviceBase):
|
|
50
|
+
"""Model for updating device data.
|
|
51
|
+
|
|
52
|
+
Attributes:
|
|
53
|
+
name: Device name.
|
|
54
|
+
channels: Number of channels.
|
|
55
|
+
offset_x: X-axis offset.
|
|
56
|
+
offset_y: Y-axis offset.
|
|
57
|
+
offset_z: Z-axis offset.
|
|
58
|
+
offset_heading: Heading offset.
|
|
59
|
+
offset_pitch: Pitch offset.
|
|
60
|
+
offset_roll: Roll offset.
|
|
61
|
+
latency: Device latency.
|
|
62
|
+
is_towed: Whether the device is towed.
|
|
63
|
+
updated_by: User who updated the device.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class Device(DeviceBase):
|
|
68
|
+
"""Model for device data with database fields.
|
|
69
|
+
|
|
70
|
+
Attributes:
|
|
71
|
+
device_id: Unique identifier for the device.
|
|
72
|
+
platform_id: Foreign key reference to Platform.
|
|
73
|
+
device_type_id: Foreign key reference to DeviceType.
|
|
74
|
+
updated_by: User who last updated the device.
|
|
75
|
+
updated_date: Date when the device was last updated.
|
|
76
|
+
created_date: Date when the device was created.
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
device_id: UUID
|
|
80
|
+
platform_id: UUID
|
|
81
|
+
device_type_id: UUID
|
|
82
|
+
updated_by: str
|
|
83
|
+
updated_date: datetime
|
|
84
|
+
created_date: datetime
|
|
85
|
+
|
|
86
|
+
model_config = ConfigDict(from_attributes=True)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class Devices(BaseModel):
|
|
90
|
+
"""Model for a collection of devices."""
|
|
91
|
+
|
|
92
|
+
devices: list[Device]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Pydantic models for device type data."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeviceTypeBase(BaseModel):
|
|
10
|
+
"""Base model for device type data.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
name: Device type name.
|
|
14
|
+
description: Device type description.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
name: str
|
|
18
|
+
description: str | None = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class DeviceTypeCreate(DeviceTypeBase):
|
|
22
|
+
"""Model for creating device type data.
|
|
23
|
+
|
|
24
|
+
Attributes:
|
|
25
|
+
updated_by: User who created the device type.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DeviceTypeUpdate(DeviceTypeBase):
|
|
30
|
+
"""Model for updating device type data.
|
|
31
|
+
|
|
32
|
+
Attributes:
|
|
33
|
+
name: Device type name.
|
|
34
|
+
description: Device type description.
|
|
35
|
+
updated_by: User who updated the device type.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class DeviceType(DeviceTypeBase):
|
|
40
|
+
"""Model for device type data with database fields.
|
|
41
|
+
|
|
42
|
+
Attributes:
|
|
43
|
+
device_type_id: Unique identifier for the device type.
|
|
44
|
+
updated_by: User who last updated the device type.
|
|
45
|
+
updated_date: Date when the device type was last updated.
|
|
46
|
+
created_date: Date when the device type was created.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
device_type_id: UUID
|
|
50
|
+
updated_by: str
|
|
51
|
+
updated_date: datetime
|
|
52
|
+
created_date: datetime
|
|
53
|
+
|
|
54
|
+
model_config = ConfigDict(from_attributes=True)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class DeviceTypes(BaseModel):
|
|
58
|
+
"""Model for a collection of device type."""
|
|
59
|
+
|
|
60
|
+
device_types: list[DeviceType]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Pydantic models for final product data."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FinalProductBase(BaseModel):
|
|
10
|
+
"""Base model for final product data.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
product_type: Type of the product.
|
|
14
|
+
file_path: Path to the GeoZarr or other file.
|
|
15
|
+
geodesy_srid: Geodetic spatial reference system identifier.
|
|
16
|
+
processing_parameters: Processing parameters in JSON format.
|
|
17
|
+
processing_date: Date of processing.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
product_type: str
|
|
21
|
+
file_path: str
|
|
22
|
+
geodesy_srid: str
|
|
23
|
+
processing_parameters: dict | None = None
|
|
24
|
+
processing_date: datetime
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class FinalProductCreate(FinalProductBase):
|
|
28
|
+
"""Model for creating final product data.
|
|
29
|
+
|
|
30
|
+
Attributes:
|
|
31
|
+
survey_id: Foreign key reference to Survey.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
survey_id: UUID
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class FinalProductUpdate(BaseModel):
|
|
38
|
+
"""Model for updating final product data.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
product_type: Type of the product.
|
|
42
|
+
file_path: Path to the GeoZarr or other file.
|
|
43
|
+
geodesy_srid: Geodetic spatial reference system identifier.
|
|
44
|
+
processing_parameters: Processing parameters in JSON format.
|
|
45
|
+
processing_date: Date of processing.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
product_type: str | None = None
|
|
49
|
+
file_path: str | None = None
|
|
50
|
+
geodesy_srid: str | None = None
|
|
51
|
+
processing_parameters: dict | None = None
|
|
52
|
+
processing_date: datetime | None = None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class FinalProduct(FinalProductBase):
|
|
56
|
+
"""Model for final product data with database fields.
|
|
57
|
+
|
|
58
|
+
Attributes:
|
|
59
|
+
product_id: Unique identifier for the final product.
|
|
60
|
+
survey_id: Foreign key reference to Survey.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
product_id: UUID
|
|
64
|
+
survey_id: UUID
|
|
65
|
+
|
|
66
|
+
model_config = ConfigDict(from_attributes=True)
|