cineon-api-format 3.3.1__tar.gz → 3.4.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.
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/PKG-INFO +1 -1
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/pyproject.toml +1 -1
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/publish.sh +2 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/__init__.py +9 -7
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/requests.py +4 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/tests/test_all.py +14 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/uv.lock +1 -1
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.env.example +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.githooks/pre-push +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.github/workflows/main.yml +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.github/workflows/publish.yml +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.gitignore +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.python-version +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/README.md +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/badges/complexity.svg +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/badges/coverage.svg +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/badges/version.svg +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/badges/complexity.py +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/badges/version.py +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/badges.sh +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/format.sh +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/test.sh +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/definitions.py +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/responses.py +0 -0
- {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/version.py +0 -0
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
# Ensure that the script exits if any commands fail
|
|
4
4
|
set -euo pipefail
|
|
5
5
|
|
|
6
|
+
# Load environment variables from .env if it exists
|
|
6
7
|
if [ -f .env ]; then
|
|
7
8
|
source .env
|
|
8
9
|
fi
|
|
9
10
|
|
|
11
|
+
# Determine the target index from command-line argument
|
|
10
12
|
TARGET="${1:-cineon-registry}"
|
|
11
13
|
|
|
12
14
|
# Build the package
|
|
@@ -4,6 +4,7 @@ from .requests import (
|
|
|
4
4
|
ClientInfo,
|
|
5
5
|
InferenceRequest,
|
|
6
6
|
ModelRecalculateRequest,
|
|
7
|
+
UserReceiveMarketingRequest,
|
|
7
8
|
)
|
|
8
9
|
from .responses import (
|
|
9
10
|
InferenceOutput,
|
|
@@ -15,16 +16,17 @@ from .responses import (
|
|
|
15
16
|
from .version import __version__
|
|
16
17
|
|
|
17
18
|
__all__ = [
|
|
18
|
-
"
|
|
19
|
-
"Metric",
|
|
20
|
-
"Construct",
|
|
19
|
+
"CineonInferenceRequest",
|
|
21
20
|
"ClientInfo",
|
|
21
|
+
"Construct",
|
|
22
|
+
"InferenceOutput",
|
|
22
23
|
"InferenceRequest",
|
|
23
|
-
"
|
|
24
|
+
"InferenceResponse",
|
|
25
|
+
"Metric",
|
|
24
26
|
"ModelRecalculateRequest",
|
|
25
|
-
"RootResponse",
|
|
26
27
|
"PingResponse",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
28
|
+
"RootResponse",
|
|
29
|
+
"UserReceiveMarketingRequest",
|
|
29
30
|
"VersionResponse",
|
|
31
|
+
"__version__",
|
|
30
32
|
]
|
|
@@ -93,3 +93,7 @@ class ModelRecalculateRequest(BaseModel, extra="forbid"):
|
|
|
93
93
|
# specified. It will also validate that the requested models
|
|
94
94
|
# calculate the construct expected.
|
|
95
95
|
models: Optional[dict[Construct, str]] = None
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class UserReceiveMarketingRequest(BaseModel, extra="forbid"):
|
|
99
|
+
receive_marketing_emails: bool
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import pytest
|
|
1
2
|
from cineon_format import create_random_data
|
|
3
|
+
from pydantic import ValidationError
|
|
2
4
|
from typeguard import typechecked
|
|
3
5
|
|
|
4
6
|
from cineon_api_format import (
|
|
@@ -9,6 +11,7 @@ from cineon_api_format import (
|
|
|
9
11
|
InferenceResponse,
|
|
10
12
|
Metric,
|
|
11
13
|
ModelRecalculateRequest,
|
|
14
|
+
UserReceiveMarketingRequest,
|
|
12
15
|
)
|
|
13
16
|
|
|
14
17
|
|
|
@@ -72,3 +75,14 @@ def test_inference_response_timestamps():
|
|
|
72
75
|
]
|
|
73
76
|
}
|
|
74
77
|
assert InferenceResponse.model_validate(response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def test_marketing_request():
|
|
81
|
+
request = {"receive_marketing_emails": True}
|
|
82
|
+
assert UserReceiveMarketingRequest.model_validate(request)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def test_marketing_request_invalid():
|
|
86
|
+
request = {"receive_marketing_emails": True, "invalid_field": 465}
|
|
87
|
+
with pytest.raises(ValidationError):
|
|
88
|
+
assert not UserReceiveMarketingRequest.model_validate(request)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|