dyff-schema 0.28.0__tar.gz → 0.30.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 (64) hide show
  1. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/.gitignore +1 -0
  2. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/.gitlab-ci.yml +10 -10
  3. dyff_schema-0.30.0/.idea/dyff-schema.iml +14 -0
  4. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/.pre-commit-config.yaml +14 -17
  5. {dyff_schema-0.28.0/dyff_schema.egg-info → dyff_schema-0.30.0}/PKG-INFO +4 -3
  6. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/README.md +2 -1
  7. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/__init__.py +2 -2
  8. dyff_schema-0.30.0/dyff/schema/_version.py +2 -0
  9. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/copydoc.py +1 -1
  10. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/adapters.py +2 -2
  11. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/base.py +169 -249
  12. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/commands.py +11 -25
  13. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/dataset/arrow.py +35 -36
  14. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/dataset/embedding.py +10 -3
  15. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/dataset/text.py +9 -5
  16. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/io/vllm.py +1 -1
  17. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/platform.py +60 -40
  18. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/requests.py +22 -18
  19. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/version.py +2 -1
  20. {dyff_schema-0.28.0 → dyff_schema-0.30.0/dyff_schema.egg-info}/PKG-INFO +4 -3
  21. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff_schema.egg-info/SOURCES.txt +2 -0
  22. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff_schema.egg-info/requires.txt +1 -1
  23. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/pyproject.toml +1 -1
  24. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/.licenserc.yaml +0 -0
  25. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/.prettierignore +0 -0
  26. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/.secrets.baseline +0 -0
  27. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/CODE_OF_CONDUCT.md +0 -0
  28. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/LICENSE +0 -0
  29. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/NOTICE +0 -0
  30. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/adapters.py +0 -0
  31. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/annotations.py +0 -0
  32. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/base.py +0 -0
  33. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/commands.py +0 -0
  34. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/dataset/__init__.py +0 -0
  35. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/dataset/arrow.py +0 -0
  36. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/dataset/binary.py +0 -0
  37. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/dataset/classification.py +0 -0
  38. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/dataset/embedding.py +0 -0
  39. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/dataset/text.py +0 -0
  40. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/dataset/vision.py +0 -0
  41. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/errors.py +0 -0
  42. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/ids.py +0 -0
  43. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/io/__init__.py +0 -0
  44. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/io/vllm.py +0 -0
  45. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/platform.py +0 -0
  46. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/py.typed +0 -0
  47. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/quantity.py +0 -0
  48. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/requests.py +0 -0
  49. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/test.py +0 -0
  50. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/__init__.py +0 -0
  51. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/__init__.py +0 -0
  52. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/dataset/__init__.py +0 -0
  53. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/dataset/binary.py +0 -0
  54. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/dataset/classification.py +0 -0
  55. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/dataset/vision.py +0 -0
  56. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/io/__init__.py +0 -0
  57. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/v0/r1/test.py +0 -0
  58. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff/schema/version.py +0 -0
  59. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff_schema.egg-info/dependency_links.txt +0 -0
  60. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/dyff_schema.egg-info/top_level.txt +0 -0
  61. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/makefile +0 -0
  62. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/setup.cfg +0 -0
  63. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/tests/test_adapters.py +0 -0
  64. {dyff_schema-0.28.0 → dyff_schema-0.30.0}/tests/test_import.py +0 -0
@@ -6,6 +6,7 @@
6
6
 
7
7
  # editors
8
8
  .vscode/
9
+ .idea/
9
10
  *.swp
10
11
  .bloop/
11
12
  .metals/
@@ -7,20 +7,20 @@ stages:
7
7
  - deploy
8
8
 
9
9
  include:
10
- - project: buildgarden/pipelines/gitlab
11
- ref: 0.2.2
10
+ - project: saferatday0/library/gitlab
11
+ ref: 0.7.0
12
12
  file:
13
13
  - gitlab-release.yml
14
- - project: buildgarden/pipelines/detect-secrets
15
- ref: 0.2.3
14
+ - project: saferatday0/library/detect-secrets
15
+ ref: 0.6.0
16
16
  file:
17
17
  - detect-secrets.yml
18
- - project: buildgarden/pipelines/prettier
19
- ref: 0.3.2
18
+ - project: saferatday0/library/prettier
19
+ ref: 0.6.0
20
20
  file:
21
21
  - prettier.yml
22
- - project: buildgarden/pipelines/python
23
- ref: 0.14.2
22
+ - project: saferatday0/library/python
23
+ ref: 0.20.0
24
24
  file:
25
25
  - python-autoflake.yml
26
26
  - python-black.yml
@@ -32,8 +32,8 @@ include:
32
32
  - python-pytest.yml
33
33
  - python-twine-upload.yml
34
34
  - python-docformatter.yml
35
- - project: buildgarden/pipelines/skywalking-eyes
36
- ref: 0.2.2
35
+ - project: saferatday0/library/skywalking-eyes
36
+ ref: 0.5.0
37
37
  file:
38
38
  - license-eye-header-check.yml
39
39
 
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ ~ SPDX-FileCopyrightText: 2024 UL Research Institutes
4
+ ~ SPDX-License-Identifier: Apache-2.0
5
+ -->
6
+
7
+ <module type="JAVA_MODULE" version="4">
8
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
9
+ <exclude-output />
10
+ <content url="file://$MODULE_DIR$" />
11
+ <orderEntry type="inheritedJdk" />
12
+ <orderEntry type="sourceFolder" forTests="false" />
13
+ </component>
14
+ </module>
@@ -3,7 +3,7 @@
3
3
 
4
4
  repos:
5
5
  - repo: https://github.com/pre-commit/pre-commit-hooks
6
- rev: v4.5.0
6
+ rev: v5.0.0
7
7
  hooks:
8
8
  - id: check-added-large-files
9
9
  - id: check-merge-conflict
@@ -23,45 +23,42 @@ repos:
23
23
  # - "--remove-all-unused-imports"
24
24
 
25
25
  - repo: https://github.com/psf/black
26
- rev: 24.3.0
26
+ rev: 25.1.0
27
27
  hooks:
28
28
  - id: black
29
29
 
30
30
  - repo: https://github.com/PyCQA/isort
31
- rev: "5.13.2"
31
+ rev: "6.0.1"
32
32
  hooks:
33
33
  - id: isort
34
34
 
35
35
  - repo: https://github.com/PyCQA/docformatter
36
- rev: v1.7.5
36
+ rev: v1.7.7
37
37
  hooks:
38
38
  - id: docformatter
39
39
  additional_dependencies: [tomli]
40
40
  args: ["--in-place", "--black", "--config", "./pyproject.toml"]
41
41
 
42
- - repo: https://gitlab.com/buildgarden/pipelines/skywalking-eyes
43
- rev: "0.2.0"
42
+ - repo: https://gitlab.com/saferatday0/library/skywalking-eyes
43
+ rev: "0.5.0"
44
44
  hooks:
45
45
  - id: license-eye-header-fix
46
46
 
47
- - repo: https://github.com/pre-commit/mirrors-prettier
48
- rev: "v4.0.0-alpha.8"
47
+ - repo: https://gitlab.com/saferatday0/library/prettier
48
+ rev: 0.6.0
49
49
  hooks:
50
50
  - id: prettier
51
- exclude: "^\\.gitlab-ci\\.yml$"
52
-
53
- - repo: https://gitlab.com/buildgarden/tools/badgie
54
- rev: "0.12.0"
51
+ - repo: https://gitlab.com/saferatday0/badgie
52
+ rev: "0.14.0"
55
53
  hooks:
56
54
  - id: badgie
57
55
 
58
- - repo: https://gitlab.com/buildgarden/tools/cici-tools
59
- rev: "0.7.0"
56
+ - repo: https://gitlab.com/saferatday0/cici
57
+ rev: "0.9.3"
60
58
  hooks:
61
59
  - id: cici-update
62
60
 
63
- - repo: https://github.com/Yelp/detect-secrets
64
- rev: v1.4.0
61
+ - repo: https://gitlab.com/saferatday0/library/detect-secrets
62
+ rev: 0.6.0
65
63
  hooks:
66
64
  - id: detect-secrets
67
- args: ["--baseline", ".secrets.baseline"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dyff-schema
3
- Version: 0.28.0
3
+ Version: 0.30.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
@@ -26,7 +26,7 @@ Requires-Dist: hypothesis-jsonschema
26
26
  Requires-Dist: jsonpath-ng
27
27
  Requires-Dist: numpy<2
28
28
  Requires-Dist: pyarrow
29
- Requires-Dist: pydantic<2
29
+ Requires-Dist: pydantic<3.0.0,>=2.0.0
30
30
  Dynamic: license-file
31
31
 
32
32
  # dyff-schema
@@ -39,8 +39,9 @@ Dynamic: license-file
39
39
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
40
40
  [![code style: black](https://img.shields.io/badge/code_style-black-000000.svg)](https://github.com/psf/black)
41
41
  [![imports: isort](https://img.shields.io/badge/imports-isort-1674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
42
+ [![formatter: docformatter](https://img.shields.io/badge/formatter-docformatter-fedcba.svg)](https://github.com/PyCQA/docformatter)
42
43
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
43
- [![cici-tools Enabled](https://img.shields.io/badge/%E2%9A%A1_cici--tools-enabled-c0ff33)](https://gitlab.com/buildgarden/tools/cici-tools)
44
+ [![cici enabled](https://img.shields.io/badge/%E2%9A%A1_cici-enabled-c0ff33)](https://gitlab.com/saferatday0/cici)
44
45
 
45
46
  <!-- END BADGIE TIME -->
46
47
 
@@ -8,8 +8,9 @@
8
8
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
9
9
  [![code style: black](https://img.shields.io/badge/code_style-black-000000.svg)](https://github.com/psf/black)
10
10
  [![imports: isort](https://img.shields.io/badge/imports-isort-1674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
11
+ [![formatter: docformatter](https://img.shields.io/badge/formatter-docformatter-fedcba.svg)](https://github.com/PyCQA/docformatter)
11
12
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
12
- [![cici-tools Enabled](https://img.shields.io/badge/%E2%9A%A1_cici--tools-enabled-c0ff33)](https://gitlab.com/buildgarden/tools/cici-tools)
13
+ [![cici enabled](https://img.shields.io/badge/%E2%9A%A1_cici-enabled-c0ff33)](https://gitlab.com/saferatday0/cici)
13
14
 
14
15
  <!-- END BADGIE TIME -->
15
16
 
@@ -55,8 +55,8 @@ def upcast(
55
55
  if not isinstance(obj, dict):
56
56
  # Preserve the unset status
57
57
  obj = obj.dict(exclude_unset=True)
58
- fields = {k: v for k, v in obj.items() if k in t.__fields__}
59
- return t.parse_obj(fields)
58
+ fields = {k: v for k, v in obj.items() if k in t.model_fields}
59
+ return t.model_validate(fields)
60
60
 
61
61
 
62
62
  __all__ = [
@@ -0,0 +1,2 @@
1
+ __version__ = version = "0.30.0"
2
+ __version_tuple__ = version_tuple = (0, 30, 0)
@@ -24,7 +24,7 @@ def copydoc(fromfunc):
24
24
  else:
25
25
  sourcedoc = fromfunc.__doc__
26
26
 
27
- if func.__doc__ == None:
27
+ if func.__doc__ is None:
28
28
  func.__doc__ = sourcedoc
29
29
  else:
30
30
  func.__doc__ = f"{sourcedoc}\n\n{func.__doc__}"
@@ -789,7 +789,7 @@ def known_adapters() -> dict[str, Type[Adapter]]:
789
789
 
790
790
  def create_adapter(adapter_spec: SchemaAdapter | dict) -> Adapter:
791
791
  if isinstance(adapter_spec, SchemaAdapter):
792
- adapter_spec = adapter_spec.dict()
792
+ adapter_spec = adapter_spec.model_dump()
793
793
  kind = adapter_spec["kind"]
794
794
  if (adapter_t := known_adapters().get(kind)) is not None:
795
795
  adapter_config = adapter_spec.get("configuration")
@@ -1024,7 +1024,7 @@ def _test():
1024
1024
  SchemaAdapter(
1025
1025
  kind="ExplodeCollections",
1026
1026
  configuration={"collections": ["text"]},
1027
- ).dict()
1027
+ ).model_dump()
1028
1028
  ]
1029
1029
  )
1030
1030