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.
Files changed (25) hide show
  1. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/PKG-INFO +1 -1
  2. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/pyproject.toml +1 -1
  3. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/publish.sh +2 -0
  4. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/__init__.py +9 -7
  5. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/requests.py +4 -0
  6. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/tests/test_all.py +14 -0
  7. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/uv.lock +1 -1
  8. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.env.example +0 -0
  9. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.githooks/pre-push +0 -0
  10. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.github/workflows/main.yml +0 -0
  11. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.github/workflows/publish.yml +0 -0
  12. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.gitignore +0 -0
  13. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/.python-version +0 -0
  14. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/README.md +0 -0
  15. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/badges/complexity.svg +0 -0
  16. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/badges/coverage.svg +0 -0
  17. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/badges/version.svg +0 -0
  18. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/badges/complexity.py +0 -0
  19. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/badges/version.py +0 -0
  20. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/badges.sh +0 -0
  21. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/format.sh +0 -0
  22. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/scripts/test.sh +0 -0
  23. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/definitions.py +0 -0
  24. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/responses.py +0 -0
  25. {cineon_api_format-3.3.1 → cineon_api_format-3.4.0}/src/cineon_api_format/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cineon-api-format
3
- Version: 3.3.1
3
+ Version: 3.4.0
4
4
  Summary: Types used by the ELE API, and other Cineon APIs.
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: cineon-format<4,>=3.0.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cineon-api-format"
3
- version = "3.3.1"
3
+ version = "3.4.0"
4
4
  description = "Types used by the ELE API, and other Cineon APIs."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -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
- "__version__",
19
- "Metric",
20
- "Construct",
19
+ "CineonInferenceRequest",
21
20
  "ClientInfo",
21
+ "Construct",
22
+ "InferenceOutput",
22
23
  "InferenceRequest",
23
- "CineonInferenceRequest",
24
+ "InferenceResponse",
25
+ "Metric",
24
26
  "ModelRecalculateRequest",
25
- "RootResponse",
26
27
  "PingResponse",
27
- "InferenceOutput",
28
- "InferenceResponse",
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)
@@ -144,7 +144,7 @@ wheels = [
144
144
 
145
145
  [[package]]
146
146
  name = "cineon-api-format"
147
- version = "3.3.1"
147
+ version = "3.4.0"
148
148
  source = { editable = "." }
149
149
  dependencies = [
150
150
  { name = "cineon-format" },