dyff-schema 0.7.1__py3-none-any.whl → 0.7.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/v0/r1/platform.py +21 -2
- {dyff_schema-0.7.1.dist-info → dyff_schema-0.7.2.dist-info}/METADATA +1 -1
- {dyff_schema-0.7.1.dist-info → dyff_schema-0.7.2.dist-info}/RECORD +7 -7
- {dyff_schema-0.7.1.dist-info → dyff_schema-0.7.2.dist-info}/LICENSE +0 -0
- {dyff_schema-0.7.1.dist-info → dyff_schema-0.7.2.dist-info}/NOTICE +0 -0
- {dyff_schema-0.7.1.dist-info → dyff_schema-0.7.2.dist-info}/WHEEL +0 -0
- {dyff_schema-0.7.1.dist-info → dyff_schema-0.7.2.dist-info}/top_level.txt +0 -0
dyff/schema/v0/r1/platform.py
CHANGED
|
@@ -18,7 +18,7 @@ We use the following naming convention:
|
|
|
18
18
|
# mypy: disable-error-code="import-untyped"
|
|
19
19
|
import abc
|
|
20
20
|
import enum
|
|
21
|
-
from datetime import datetime
|
|
21
|
+
from datetime import datetime, timezone
|
|
22
22
|
from enum import Enum
|
|
23
23
|
from typing import Any, Literal, NamedTuple, Optional, Type, Union
|
|
24
24
|
|
|
@@ -532,7 +532,10 @@ class AccessGrant(DyffSchemaBaseModel):
|
|
|
532
532
|
)
|
|
533
533
|
|
|
534
534
|
|
|
535
|
-
|
|
535
|
+
# FIXME: We can't derive from DyffSchemaBaseModel right now because existing
|
|
536
|
+
# APIKeys don't have a timezone set for their datetime members.
|
|
537
|
+
# See: DYFF-406
|
|
538
|
+
class APIKey(pydantic.BaseModel):
|
|
536
539
|
"""A description of a set of permissions granted to a single subject (either an
|
|
537
540
|
account or a workload).
|
|
538
541
|
|
|
@@ -561,6 +564,22 @@ class APIKey(DyffSchemaBaseModel):
|
|
|
561
564
|
default_factory=list, description="AccessGrants associated with the APIKey"
|
|
562
565
|
)
|
|
563
566
|
|
|
567
|
+
@pydantic.root_validator
|
|
568
|
+
def _ensure_datetime_timezone_aware(cls, values):
|
|
569
|
+
update = {}
|
|
570
|
+
for k, v in values.items():
|
|
571
|
+
if isinstance(v, datetime):
|
|
572
|
+
if v.tzinfo is None:
|
|
573
|
+
update[k] = v.replace(tzinfo=timezone.utc)
|
|
574
|
+
values.update(update)
|
|
575
|
+
return values
|
|
576
|
+
|
|
577
|
+
def dict(self, *, by_alias: bool = True, **kwargs) -> dict[str, Any]:
|
|
578
|
+
return super().dict(by_alias=by_alias, **kwargs)
|
|
579
|
+
|
|
580
|
+
def json(self, *, by_alias: bool = True, **kwargs) -> str:
|
|
581
|
+
return super().json(by_alias=by_alias, **kwargs)
|
|
582
|
+
|
|
564
583
|
|
|
565
584
|
# ----------------------------------------------------------------------------
|
|
566
585
|
|
|
@@ -21,7 +21,7 @@ dyff/schema/v0/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
|
|
|
21
21
|
dyff/schema/v0/r1/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
|
|
22
22
|
dyff/schema/v0/r1/adapters.py,sha256=2t2oxsnGfSEDKKDIEYw4qqLXMH7qlFIwPVuLyUmbsHs,23552
|
|
23
23
|
dyff/schema/v0/r1/base.py,sha256=X4QVwOzNw5xPCF_f14w2JhARj1CHmGMjUmTcNzb-X0c,17471
|
|
24
|
-
dyff/schema/v0/r1/platform.py,sha256=
|
|
24
|
+
dyff/schema/v0/r1/platform.py,sha256=ocEofM51a4bC0wlHB5zJO6jZUwJVUkYwv7RadTawhVA,61574
|
|
25
25
|
dyff/schema/v0/r1/requests.py,sha256=bTLtQUK80_fFeEWRG6QUJoLwy1_PyXf8ua9Ei4av0ug,8913
|
|
26
26
|
dyff/schema/v0/r1/test.py,sha256=X6dUyVd5svcPCI-PBMOAqEfK9jv3bRDvkQTJzwS96c0,10720
|
|
27
27
|
dyff/schema/v0/r1/version.py,sha256=isKAGuGxsdru8vDaYmI4YiZdJOu_wNxXK7u6QzD6FE4,392
|
|
@@ -33,9 +33,9 @@ dyff/schema/v0/r1/dataset/text.py,sha256=nLIn91Zlt0tNdXUklSgjJ-kEDxoPX32ISLkiv2D
|
|
|
33
33
|
dyff/schema/v0/r1/dataset/vision.py,sha256=aIe0fbfM_g3DsrDTdg2K803YKLjZBpurM_VJcJFuZLc,369
|
|
34
34
|
dyff/schema/v0/r1/io/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
|
|
35
35
|
dyff/schema/v0/r1/io/vllm.py,sha256=CUE9y8KthtUI7sD49S875rDmPvKotSXVIRaBS79aBZs,5320
|
|
36
|
-
dyff_schema-0.7.
|
|
37
|
-
dyff_schema-0.7.
|
|
38
|
-
dyff_schema-0.7.
|
|
39
|
-
dyff_schema-0.7.
|
|
40
|
-
dyff_schema-0.7.
|
|
41
|
-
dyff_schema-0.7.
|
|
36
|
+
dyff_schema-0.7.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
37
|
+
dyff_schema-0.7.2.dist-info/METADATA,sha256=zEELaVi3ZL67mNV3031i02KZH7DeuXqEwSkXR_C6LhI,3459
|
|
38
|
+
dyff_schema-0.7.2.dist-info/NOTICE,sha256=YONACu0s_Ui6jNi-wtEsVQbTU1JIkh8wvLH6d1-Ni_w,43
|
|
39
|
+
dyff_schema-0.7.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
40
|
+
dyff_schema-0.7.2.dist-info/top_level.txt,sha256=9e3VVdeX73t_sUJOPQPCcGtYO1JhoErhHIi3WoWGcFI,5
|
|
41
|
+
dyff_schema-0.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|