dyff-schema 0.31.1__py3-none-any.whl → 0.32.0__py3-none-any.whl

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.

Potentially problematic release.


This version of dyff-schema might be problematic. Click here for more details.

dyff/schema/_version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = version = "0.31.1"
2
- __version_tuple__ = version_tuple = (0, 31, 1)
1
+ __version__ = version = "0.32.0"
2
+ __version_tuple__ = version_tuple = (0, 32, 0)
@@ -0,0 +1,4 @@
1
+ # SPDX-FileCopyrightText: 2024 UL Research Institutes
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ from .v0.r1.responses import *
dyff/schema/v0/r1/base.py CHANGED
@@ -561,8 +561,8 @@ class JsonMergePatchSemantics(DyffSchemaBaseModel):
561
561
  ) -> _ModelAsDict:
562
562
  return self.model_dump(
563
563
  by_alias=by_alias,
564
- exclude_unset=exclude_unset,
565
- exclude_none=exclude_none,
564
+ exclude_unset=True,
565
+ exclude_none=False,
566
566
  **kwargs,
567
567
  )
568
568
 
@@ -576,8 +576,8 @@ class JsonMergePatchSemantics(DyffSchemaBaseModel):
576
576
  ) -> str:
577
577
  return self.model_dump_json(
578
578
  by_alias=by_alias,
579
- exclude_unset=exclude_unset,
580
- exclude_none=exclude_none,
579
+ exclude_unset=True,
580
+ exclude_none=False,
581
581
  **kwargs,
582
582
  )
583
583
 
@@ -591,8 +591,8 @@ class JsonMergePatchSemantics(DyffSchemaBaseModel):
591
591
  ) -> _ModelAsDict:
592
592
  return super().model_dump(
593
593
  by_alias=by_alias,
594
- exclude_unset=exclude_unset,
595
- exclude_none=exclude_none,
594
+ exclude_unset=True,
595
+ exclude_none=False,
596
596
  **kwargs,
597
597
  )
598
598
 
@@ -606,8 +606,8 @@ class JsonMergePatchSemantics(DyffSchemaBaseModel):
606
606
  ) -> str:
607
607
  return super().model_dump_json(
608
608
  by_alias=by_alias,
609
- exclude_unset=exclude_unset,
610
- exclude_none=exclude_none,
609
+ exclude_unset=True,
610
+ exclude_none=False,
611
611
  **kwargs,
612
612
  )
613
613
 
@@ -10,7 +10,7 @@ from __future__ import annotations
10
10
  from typing import Literal, Optional, Union
11
11
 
12
12
  import pydantic
13
- from pydantic import StringConstraints
13
+ from pydantic import StringConstraints, field_serializer
14
14
  from typing_extensions import Annotated
15
15
 
16
16
  from .base import DyffSchemaBaseModel, JsonMergePatchSemantics
@@ -107,6 +107,12 @@ class EditEntityDocumentationAttributes(DyffSchemaBaseModel):
107
107
  description="Edits to make to the documentation."
108
108
  )
109
109
 
110
+ @field_serializer("documentation")
111
+ def _serialize_documentation(
112
+ self, documentation: EditEntityDocumentationPatch, _info
113
+ ):
114
+ return documentation.model_dump(mode=_info.mode)
115
+
110
116
 
111
117
  class EditEntityDocumentationData(EntityIdentifier):
112
118
  """Payload data for the EditEntityDocumentation command."""
@@ -149,6 +155,10 @@ class EditEntityLabelsData(EntityIdentifier):
149
155
  description="The command attributes"
150
156
  )
151
157
 
158
+ @field_serializer("attributes")
159
+ def _serialize_attributes(self, attributes: EditEntityLabelsAttributes, _info):
160
+ return attributes.model_dump(mode=_info.mode)
161
+
152
162
 
153
163
  class EditEntityLabels(Command):
154
164
  """Edit the labels associated with an entity.
@@ -180,6 +190,10 @@ class EditFamilyMembersData(FamilyMembers, FamilyIdentifier):
180
190
  description="The command attributes"
181
191
  )
182
192
 
193
+ @field_serializer("attributes")
194
+ def _serialize_attributes(self, attributes: EditFamilyMembersAttributes, _info):
195
+ return attributes.model_dump(mode=_info.mode)
196
+
183
197
 
184
198
  class EditFamilyMembers(Command):
185
199
  """Edit the labels associated with an entity.
@@ -261,6 +275,10 @@ class UpdateEntityStatusData(EntityIdentifier):
261
275
  description="The command attributes"
262
276
  )
263
277
 
278
+ @field_serializer("attributes")
279
+ def _serialize_attributes(self, attributes: UpdateEntityStatusAttributes, _info):
280
+ return attributes.model_dump(mode=_info.mode)
281
+
264
282
 
265
283
  class UpdateEntityStatus(Command):
266
284
  """Update the status fields of an entity."""
@@ -0,0 +1,38 @@
1
+ # SPDX-FileCopyrightText: 2024 UL Research Institutes
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ """API response schemas for dyff platform endpoints.
4
+
5
+ These types represent the structured responses returned by dyff API endpoints. They are
6
+ shared between the API server and client libraries to ensure consistent data structures.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from typing import Dict, List
12
+
13
+ import pydantic
14
+
15
+ from .base import DyffSchemaBaseModel
16
+ from .platform import EntityIdentifier
17
+
18
+
19
+ class WorkflowLogEntry(DyffSchemaBaseModel):
20
+ """A single log entry from workflow infrastructure logs."""
21
+
22
+ timestamp: str = pydantic.Field(description="ISO 8601 timestamp")
23
+ message: str = pydantic.Field(description="Log message content")
24
+ labels: Dict[str, str] = pydantic.Field(
25
+ description="Kubernetes labels associated with the log entry"
26
+ )
27
+
28
+
29
+ class WorkflowLogsResponse(DyffSchemaBaseModel):
30
+ """Response from workflow logs endpoint."""
31
+
32
+ workflow: EntityIdentifier = pydantic.Field(
33
+ description="Entity that generated these workflow logs"
34
+ )
35
+ logs: List[WorkflowLogEntry] = pydantic.Field(
36
+ description="Log entries from the workflow execution"
37
+ )
38
+ totalLines: int = pydantic.Field(description="Total number of log lines available")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dyff-schema
3
- Version: 0.31.1
3
+ Version: 0.32.0
4
4
  Summary: Data models for the Dyff AI auditing platform.
5
5
  Author-email: Digital Safety Research Institute <contact@dsri.org>
6
6
  License: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  dyff/schema/__init__.py,sha256=w7OWDFuyGKd6xt_yllNtKzHahPgywrfU4Ue02psYaMA,2244
2
- dyff/schema/_version.py,sha256=xYca_BM655IHW3SpDaF4qHGb28po0Ino5HCEk8E6NAg,80
2
+ dyff/schema/_version.py,sha256=cSUDf-klGYAh3VKPYjjxhNT8qv04wlp3-jjPmvgZjS0,80
3
3
  dyff/schema/adapters.py,sha256=YMTHv_2VlLGFp-Kqwa6H51hjffHmk8gXjZilHysIF5Q,123
4
4
  dyff/schema/annotations.py,sha256=nE6Jk1PLqlShj8uqjE_EzZC9zYnTDW5AVtQcjysiK8M,10018
5
5
  dyff/schema/base.py,sha256=jvaNtsSZyFfsdUZTcY_U-yfLY5_GyrMxSXhON2R9XR0,119
@@ -11,6 +11,7 @@ dyff/schema/platform.py,sha256=peHzGGSd5dQ-EFXrWDjBqMUtoOL3iCHxcV3XzW6Rjag,123
11
11
  dyff/schema/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  dyff/schema/quantity.py,sha256=hhS9ybqW_6I--acPhkoZbFWASxFTEs7CUjO4pmpBJ98,3788
13
13
  dyff/schema/requests.py,sha256=euObiC5IRe9fGev9ND--bcysuACNBDhSbZ5kONSaRwE,123
14
+ dyff/schema/responses.py,sha256=9ZAwDppjFzkWXRhPSxDOT5dDo7VbWk1dgNIc000mRPk,124
14
15
  dyff/schema/test.py,sha256=xtXZHqdVi_bjGXFFrd4nU10Y9CiukPyZj03rL84ckD4,119
15
16
  dyff/schema/version.py,sha256=MZhYsYOVmMuZo0R1vl1iSus7zfB8UerDcEgoZg7Ln7s,372
16
17
  dyff/schema/dataset/__init__.py,sha256=P4tOKKiOFaVeh3-Keiwpg9n7VTQUJQVOIVZhm8sdArE,123
@@ -25,10 +26,11 @@ dyff/schema/io/vllm.py,sha256=2q05M_-lTzq9oywKXHPPpCFCSDVCSsRQqtmERzWTtio,123
25
26
  dyff/schema/v0/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
26
27
  dyff/schema/v0/r1/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
27
28
  dyff/schema/v0/r1/adapters.py,sha256=hpwCSW8lkMkUKCLe0zaMUDu-VS_caSxJvPsECEi_XRA,33069
28
- dyff/schema/v0/r1/base.py,sha256=zaxU2fIu1Ca-nZsZwG0eb7COJmnPkDZ_yLrieHXqr0s,20353
29
- dyff/schema/v0/r1/commands.py,sha256=wDNMB8lry-H9G5hlT4m6y4fysoq4glY5qKsHytfehqU,9052
29
+ dyff/schema/v0/r1/base.py,sha256=fdhAa4hpbSn7m3U0qha4rG7gJiYUvPR8SaM-mwszoy0,20289
30
+ dyff/schema/v0/r1/commands.py,sha256=VoThKeIVz4ZQAqBXhb6TVOG6aG4m_Oa0_6Sc4oxyFhs,9801
30
31
  dyff/schema/v0/r1/platform.py,sha256=7ErqSqPLQD2bIEqnJByktBb7RaQYRkZbqQsofb0dFIM,82736
31
32
  dyff/schema/v0/r1/requests.py,sha256=C-LX-NAIDgh88xCl3NW7wqLIpurK8SXqmhRnGvy4BM0,17197
33
+ dyff/schema/v0/r1/responses.py,sha256=nxy7FPtfw2B_bljz5UGGuSE79HTkDQxKH56AJVmd4Qo,1287
32
34
  dyff/schema/v0/r1/test.py,sha256=X6dUyVd5svcPCI-PBMOAqEfK9jv3bRDvkQTJzwS96c0,10720
33
35
  dyff/schema/v0/r1/version.py,sha256=NONebgcv5Thsw_ymud6PacZdGjV6ndBrmLnap-obcpo,428
34
36
  dyff/schema/v0/r1/dataset/__init__.py,sha256=LbVlkO2asyGYBKk2z49xjJYTM-pu9y9e4eQDXgTDLnM,2553
@@ -40,9 +42,9 @@ dyff/schema/v0/r1/dataset/text.py,sha256=MYG5seGODDryRSCy-g0Unh5dD0HCytmZ3FeElC-
40
42
  dyff/schema/v0/r1/dataset/vision.py,sha256=aIe0fbfM_g3DsrDTdg2K803YKLjZBpurM_VJcJFuZLc,369
41
43
  dyff/schema/v0/r1/io/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
42
44
  dyff/schema/v0/r1/io/vllm.py,sha256=vWyLg-susbg0JDfv6VExBpgFdU2GHP2a14ChOdbckvs,5321
43
- dyff_schema-0.31.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
- dyff_schema-0.31.1.dist-info/licenses/NOTICE,sha256=YONACu0s_Ui6jNi-wtEsVQbTU1JIkh8wvLH6d1-Ni_w,43
45
- dyff_schema-0.31.1.dist-info/METADATA,sha256=CWl03-J57aLei00PtpH5PuDC5aL8cgd6TqzZkaAG7lg,3632
46
- dyff_schema-0.31.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
- dyff_schema-0.31.1.dist-info/top_level.txt,sha256=9e3VVdeX73t_sUJOPQPCcGtYO1JhoErhHIi3WoWGcFI,5
48
- dyff_schema-0.31.1.dist-info/RECORD,,
45
+ dyff_schema-0.32.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
46
+ dyff_schema-0.32.0.dist-info/licenses/NOTICE,sha256=YONACu0s_Ui6jNi-wtEsVQbTU1JIkh8wvLH6d1-Ni_w,43
47
+ dyff_schema-0.32.0.dist-info/METADATA,sha256=_DgORzGNTURV5pqYZS014MpFJOFufqQ--rpSCfIupKA,3632
48
+ dyff_schema-0.32.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
49
+ dyff_schema-0.32.0.dist-info/top_level.txt,sha256=9e3VVdeX73t_sUJOPQPCcGtYO1JhoErhHIi3WoWGcFI,5
50
+ dyff_schema-0.32.0.dist-info/RECORD,,