dyff-schema 0.31.1__py3-none-any.whl → 0.31.2__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.31.2"
2
+ __version_tuple__ = version_tuple = (0, 31, 2)
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."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dyff-schema
3
- Version: 0.31.1
3
+ Version: 0.31.2
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=z4vDFHifVJxLq5dzqsXzDAeoUWPxVCuClnP5IuuPB7E,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
@@ -25,8 +25,8 @@ dyff/schema/io/vllm.py,sha256=2q05M_-lTzq9oywKXHPPpCFCSDVCSsRQqtmERzWTtio,123
25
25
  dyff/schema/v0/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
26
26
  dyff/schema/v0/r1/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
27
27
  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
28
+ dyff/schema/v0/r1/base.py,sha256=fdhAa4hpbSn7m3U0qha4rG7gJiYUvPR8SaM-mwszoy0,20289
29
+ dyff/schema/v0/r1/commands.py,sha256=VoThKeIVz4ZQAqBXhb6TVOG6aG4m_Oa0_6Sc4oxyFhs,9801
30
30
  dyff/schema/v0/r1/platform.py,sha256=7ErqSqPLQD2bIEqnJByktBb7RaQYRkZbqQsofb0dFIM,82736
31
31
  dyff/schema/v0/r1/requests.py,sha256=C-LX-NAIDgh88xCl3NW7wqLIpurK8SXqmhRnGvy4BM0,17197
32
32
  dyff/schema/v0/r1/test.py,sha256=X6dUyVd5svcPCI-PBMOAqEfK9jv3bRDvkQTJzwS96c0,10720
@@ -40,9 +40,9 @@ dyff/schema/v0/r1/dataset/text.py,sha256=MYG5seGODDryRSCy-g0Unh5dD0HCytmZ3FeElC-
40
40
  dyff/schema/v0/r1/dataset/vision.py,sha256=aIe0fbfM_g3DsrDTdg2K803YKLjZBpurM_VJcJFuZLc,369
41
41
  dyff/schema/v0/r1/io/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
42
42
  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,,
43
+ dyff_schema-0.31.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
+ dyff_schema-0.31.2.dist-info/licenses/NOTICE,sha256=YONACu0s_Ui6jNi-wtEsVQbTU1JIkh8wvLH6d1-Ni_w,43
45
+ dyff_schema-0.31.2.dist-info/METADATA,sha256=EXu4JKKOiya1Q3PvC6B2myJr2VrrlcfV91LB2XGU4B4,3632
46
+ dyff_schema-0.31.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
+ dyff_schema-0.31.2.dist-info/top_level.txt,sha256=9e3VVdeX73t_sUJOPQPCcGtYO1JhoErhHIi3WoWGcFI,5
48
+ dyff_schema-0.31.2.dist-info/RECORD,,