unitysvc-core 0.2.2__tar.gz → 0.2.3__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 (40) hide show
  1. {unitysvc_core-0.2.2/src/unitysvc_core.egg-info → unitysvc_core-0.2.3}/PKG-INFO +1 -1
  2. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/pyproject.toml +1 -1
  3. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/__init__.py +2 -2
  4. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/listing_data.py +2 -2
  5. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/service.py +16 -15
  6. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3/src/unitysvc_core.egg-info}/PKG-INFO +1 -1
  7. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core.egg-info/SOURCES.txt +1 -1
  8. unitysvc_core-0.2.2/tests/test_service_data.py → unitysvc_core-0.2.3/tests/test_service_status.py +6 -6
  9. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/LICENSE +0 -0
  10. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/README.md +0 -0
  11. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/setup.cfg +0 -0
  12. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/__init__.py +0 -0
  13. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/base.py +0 -0
  14. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/documents.py +0 -0
  15. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/listing_v1.py +0 -0
  16. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/offering_data.py +0 -0
  17. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/offering_v1.py +0 -0
  18. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/pricing.py +0 -0
  19. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/promotion_data.py +0 -0
  20. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/provider_data.py +0 -0
  21. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/provider_v1.py +0 -0
  22. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/service_group_data.py +0 -0
  23. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/models/validators.py +0 -0
  24. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/py.typed +0 -0
  25. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/schema/base.json +0 -0
  26. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/schema/listing_v1.json +0 -0
  27. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/schema/offering_v1.json +0 -0
  28. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/schema/promotion_v1.json +0 -0
  29. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/schema/provider_v1.json +0 -0
  30. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/schema/service_group_v1.json +0 -0
  31. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/utils.py +0 -0
  32. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core/validator.py +0 -0
  33. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core.egg-info/dependency_links.txt +0 -0
  34. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core.egg-info/requires.txt +0 -0
  35. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/src/unitysvc_core.egg-info/top_level.txt +0 -0
  36. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/tests/test_pricing.py +0 -0
  37. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/tests/test_service_group.py +0 -0
  38. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/tests/test_utils.py +0 -0
  39. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/tests/test_validator.py +0 -0
  40. {unitysvc_core-0.2.2 → unitysvc_core-0.2.3}/tests/test_validators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitysvc-core
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Shared data models and validation helpers for UnitySVC packages
5
5
  Author-email: Bo Peng <bo.peng@unitysvc.com>
6
6
  Maintainer-email: Bo Peng <bo.peng@unitysvc.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "unitysvc-core"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Shared data models and validation helpers for UnitySVC packages"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Bo Peng", email = "bo.peng@unitysvc.com" }]
@@ -70,7 +70,7 @@ from .service import (
70
70
  AccessInterfaceData,
71
71
  RateLimit,
72
72
  ServiceConstraints,
73
- ServiceData,
73
+ ServiceStatus,
74
74
  UpstreamAccessConfigData,
75
75
  )
76
76
  from .service_group_data import (
@@ -110,7 +110,7 @@ __all__ = [
110
110
  "UpstreamAccessConfigData",
111
111
  "RateLimit",
112
112
  "ServiceConstraints",
113
- "ServiceData",
113
+ "ServiceStatus",
114
114
  # Enums
115
115
  "AccessMethodEnum",
116
116
  "AuthMethodEnum",
@@ -44,8 +44,8 @@ class ServiceListingData(BaseModel):
44
44
 
45
45
  # NOTE: a listing carries no service_id. Service identity is backend-
46
46
  # assigned provenance, not authored listing content — it lives in
47
- # ``service.json`` and travels as the top-level ``ServiceDataInput.service_id``
48
- # field on upload/revision, never embedded in the listing.
47
+ # ``service.json`` (the ``ServiceStatus`` sidecar) and travels separately
48
+ # on upload/revision, never embedded in the listing.
49
49
 
50
50
  # Listing identification
51
51
  name: str | None = Field(
@@ -144,21 +144,22 @@ class UpstreamAccessConfigData(AccessInterfaceData):
144
144
  )
145
145
 
146
146
 
147
- class ServiceData(BaseModel):
148
- """Backend-assigned service identity record (the ``service.json`` file).
149
-
150
- A service's ``provider_data`` / ``offering_data`` / ``listing_data`` are
151
- authored by the seller; this is the *other* half — the record the backend
152
- materializes once a service exists. It is the **round-trip** structure:
153
- the ingest task returns it, the seller stores it in ``service.json`` beside
154
- the spec files, and it travels back as the top-level ``service_data`` field
155
- on the next upload/revision so the backend can match the upload to the
156
- existing service.
157
-
158
- Of these fields, only ``service_id`` is consumed on the way *in* (it
159
- targets revise/replace vs create); the rest are populated on the way *out*
160
- and are informational provenance for the seller. ``extra="ignore"`` keeps
161
- unknown keys from breaking either direction.
147
+ class ServiceStatus(BaseModel):
148
+ """Backend-assigned service **status / identity sidecar** (the ``service.json``
149
+ file) — *not* the authored service data.
150
+
151
+ A service's ``provider_data`` / ``offering_data`` / ``listing_data`` are the
152
+ authored service data; this is the *other*, backend-owned half — the status
153
+ record the backend materializes once a service exists. It is the
154
+ **round-trip** sidecar: the ingest task returns it, the seller stores it in
155
+ ``service.json`` beside the spec files, and replays it on the next
156
+ upload/revision so the backend can match the upload to the existing service.
157
+
158
+ Of these fields, ``service_id`` and ``template_instance_id`` are consumed on
159
+ the way *in* (they declare which service / which template the publish
160
+ targets); the rest are populated on the way *out* as informational status /
161
+ provenance for the seller. ``extra="ignore"`` keeps unknown keys from
162
+ breaking either direction.
162
163
  """
163
164
 
164
165
  model_config = ConfigDict(extra="ignore")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitysvc-core
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Shared data models and validation helpers for UnitySVC packages
5
5
  Author-email: Bo Peng <bo.peng@unitysvc.com>
6
6
  Maintainer-email: Bo Peng <bo.peng@unitysvc.com>
@@ -31,8 +31,8 @@ src/unitysvc_core/schema/promotion_v1.json
31
31
  src/unitysvc_core/schema/provider_v1.json
32
32
  src/unitysvc_core/schema/service_group_v1.json
33
33
  tests/test_pricing.py
34
- tests/test_service_data.py
35
34
  tests/test_service_group.py
35
+ tests/test_service_status.py
36
36
  tests/test_utils.py
37
37
  tests/test_validator.py
38
38
  tests/test_validators.py
@@ -1,30 +1,30 @@
1
- """Tests for the ServiceData model (the service.json provenance structure)."""
1
+ """Tests for the ServiceStatus model (the service.json provenance structure)."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
5
  from datetime import datetime
6
6
  from uuid import UUID
7
7
 
8
- from unitysvc_core.models import ServiceData
8
+ from unitysvc_core.models import ServiceStatus
9
9
 
10
10
  _SID = "2c1f9e7a-0000-0000-0000-000000000000"
11
11
 
12
12
 
13
13
  def test_empty_service_data_has_no_identity() -> None:
14
- sd = ServiceData()
14
+ sd = ServiceStatus()
15
15
  assert sd.service_id is None
16
16
  assert sd.time_created is None
17
17
 
18
18
 
19
19
  def test_service_id_coerced_to_uuid() -> None:
20
- sd = ServiceData.model_validate({"service_id": _SID})
20
+ sd = ServiceStatus.model_validate({"service_id": _SID})
21
21
  assert sd.service_id == UUID(_SID)
22
22
 
23
23
 
24
24
  def test_time_created_and_extra_fields() -> None:
25
25
  # time_created is a recognized provenance field; unknown extras are
26
26
  # tolerated (extra="ignore") rather than rejected.
27
- sd = ServiceData.model_validate({"service_id": _SID, "time_created": "2026-01-01T00:00:00", "note": "x"})
27
+ sd = ServiceStatus.model_validate({"service_id": _SID, "time_created": "2026-01-01T00:00:00", "note": "x"})
28
28
  assert sd.time_created == datetime(2026, 1, 1, 0, 0)
29
29
  assert "note" not in sd.model_dump()
30
30
 
@@ -32,7 +32,7 @@ def test_time_created_and_extra_fields() -> None:
32
32
  def test_full_identity_record_round_trips() -> None:
33
33
  # The shape the ingest task returns and the seller persists to service.json.
34
34
  rev = "11111111-0000-0000-0000-000000000000"
35
- sd = ServiceData.model_validate(
35
+ sd = ServiceStatus.model_validate(
36
36
  {
37
37
  "service_id": _SID,
38
38
  "revision_of": rev,
File without changes
File without changes
File without changes