dataframely 1.7.4__tar.gz → 1.7.5__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 (184) hide show
  1. {dataframely-1.7.4 → dataframely-1.7.5}/PKG-INFO +1 -1
  2. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_base_collection.py +6 -1
  3. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_base_schema.py +6 -1
  4. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_rule.py +6 -1
  5. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/collection.py +6 -1
  6. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/_base.py +6 -1
  7. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/_mixins.py +6 -1
  8. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/array.py +6 -1
  9. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/list.py +6 -1
  10. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/struct.py +6 -1
  11. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/config.py +5 -1
  12. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/schema.py +6 -1
  13. {dataframely-1.7.4 → dataframely-1.7.5}/pyproject.toml +1 -1
  14. {dataframely-1.7.4 → dataframely-1.7.5}/src/regex_repr.rs +1 -1
  15. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_extre.py +1 -0
  16. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_typing.py +6 -1
  17. {dataframely-1.7.4 → dataframely-1.7.5}/.copier-answers.yml +0 -0
  18. {dataframely-1.7.4 → dataframely-1.7.5}/.envrc +0 -0
  19. {dataframely-1.7.4 → dataframely-1.7.5}/.gitattributes +0 -0
  20. {dataframely-1.7.4 → dataframely-1.7.5}/.github/CODEOWNERS +0 -0
  21. {dataframely-1.7.4 → dataframely-1.7.5}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  22. {dataframely-1.7.4 → dataframely-1.7.5}/.github/dependabot.yml +0 -0
  23. {dataframely-1.7.4 → dataframely-1.7.5}/.github/release-drafter.yml +0 -0
  24. {dataframely-1.7.4 → dataframely-1.7.5}/.github/workflows/build.yml +0 -0
  25. {dataframely-1.7.4 → dataframely-1.7.5}/.github/workflows/chore.yml +0 -0
  26. {dataframely-1.7.4 → dataframely-1.7.5}/.github/workflows/ci.yml +0 -0
  27. {dataframely-1.7.4 → dataframely-1.7.5}/.github/workflows/nightly.yml +0 -0
  28. {dataframely-1.7.4 → dataframely-1.7.5}/.github/workflows/scorecard.yml +0 -0
  29. {dataframely-1.7.4 → dataframely-1.7.5}/.gitignore +0 -0
  30. {dataframely-1.7.4 → dataframely-1.7.5}/.pre-commit-config.yaml +0 -0
  31. {dataframely-1.7.4 → dataframely-1.7.5}/.prettierignore +0 -0
  32. {dataframely-1.7.4 → dataframely-1.7.5}/.prettierrc +0 -0
  33. {dataframely-1.7.4 → dataframely-1.7.5}/.readthedocs.yml +0 -0
  34. {dataframely-1.7.4 → dataframely-1.7.5}/Cargo.lock +0 -0
  35. {dataframely-1.7.4 → dataframely-1.7.5}/Cargo.toml +0 -0
  36. {dataframely-1.7.4 → dataframely-1.7.5}/LICENSE +0 -0
  37. {dataframely-1.7.4 → dataframely-1.7.5}/README.md +0 -0
  38. {dataframely-1.7.4 → dataframely-1.7.5}/SECURITY.md +0 -0
  39. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/__init__.py +0 -0
  40. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_compat.py +0 -0
  41. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_deprecation.py +0 -0
  42. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_extre.pyi +0 -0
  43. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_filter.py +0 -0
  44. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_polars.py +0 -0
  45. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_serialization.py +0 -0
  46. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_typing.py +0 -0
  47. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/_validation.py +0 -0
  48. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/__init__.py +0 -0
  49. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/_registry.py +0 -0
  50. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/_utils.py +0 -0
  51. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/any.py +0 -0
  52. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/bool.py +0 -0
  53. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/datetime.py +0 -0
  54. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/decimal.py +0 -0
  55. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/enum.py +0 -0
  56. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/float.py +0 -0
  57. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/integer.py +0 -0
  58. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/object.py +0 -0
  59. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/columns/string.py +0 -0
  60. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/exc.py +0 -0
  61. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/failure.py +0 -0
  62. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/functional.py +0 -0
  63. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/mypy.py +0 -0
  64. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/py.typed +0 -0
  65. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/random.py +0 -0
  66. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/testing/__init__.py +0 -0
  67. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/testing/const.py +0 -0
  68. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/testing/factory.py +0 -0
  69. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/testing/mask.py +0 -0
  70. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/testing/rules.py +0 -0
  71. {dataframely-1.7.4 → dataframely-1.7.5}/dataframely/testing/typing.py +0 -0
  72. {dataframely-1.7.4 → dataframely-1.7.5}/docker-compose.yml +0 -0
  73. {dataframely-1.7.4 → dataframely-1.7.5}/docs/Makefile +0 -0
  74. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.collection.rst +0 -0
  75. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.any.rst +0 -0
  76. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.bool.rst +0 -0
  77. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.datetime.rst +0 -0
  78. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.decimal.rst +0 -0
  79. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.enum.rst +0 -0
  80. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.float.rst +0 -0
  81. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.integer.rst +0 -0
  82. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.list.rst +0 -0
  83. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.rst +0 -0
  84. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.string.rst +0 -0
  85. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.columns.struct.rst +0 -0
  86. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.config.rst +0 -0
  87. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.exc.rst +0 -0
  88. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.failure.rst +0 -0
  89. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.functional.rst +0 -0
  90. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.mypy.rst +0 -0
  91. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.random.rst +0 -0
  92. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.rst +0 -0
  93. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.schema.rst +0 -0
  94. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.testing.const.rst +0 -0
  95. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.testing.factory.rst +0 -0
  96. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.testing.mask.rst +0 -0
  97. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.testing.rst +0 -0
  98. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.testing.rules.rst +0 -0
  99. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/dataframely.testing.typing.rst +0 -0
  100. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_api/modules.rst +0 -0
  101. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_static/custom.css +0 -0
  102. {dataframely-1.7.4 → dataframely-1.7.5}/docs/_static/favicon.ico +0 -0
  103. {dataframely-1.7.4 → dataframely-1.7.5}/docs/conf.py +0 -0
  104. {dataframely-1.7.4 → dataframely-1.7.5}/docs/index.rst +0 -0
  105. {dataframely-1.7.4 → dataframely-1.7.5}/docs/make.bat +0 -0
  106. {dataframely-1.7.4 → dataframely-1.7.5}/docs/sites/development.rst +0 -0
  107. {dataframely-1.7.4 → dataframely-1.7.5}/docs/sites/examples/real-world.ipynb +0 -0
  108. {dataframely-1.7.4 → dataframely-1.7.5}/docs/sites/faq.rst +0 -0
  109. {dataframely-1.7.4 → dataframely-1.7.5}/docs/sites/installation.rst +0 -0
  110. {dataframely-1.7.4 → dataframely-1.7.5}/docs/sites/quickstart.rst +0 -0
  111. {dataframely-1.7.4 → dataframely-1.7.5}/docs/sites/versioning.rst +0 -0
  112. {dataframely-1.7.4 → dataframely-1.7.5}/pixi.lock +0 -0
  113. {dataframely-1.7.4 → dataframely-1.7.5}/pixi.toml +0 -0
  114. {dataframely-1.7.4 → dataframely-1.7.5}/src/errdefs.rs +0 -0
  115. {dataframely-1.7.4 → dataframely-1.7.5}/src/lib.rs +0 -0
  116. {dataframely-1.7.4 → dataframely-1.7.5}/tests/benches/conftest.py +0 -0
  117. {dataframely-1.7.4 → dataframely-1.7.5}/tests/benches/test_collection.py +0 -0
  118. {dataframely-1.7.4 → dataframely-1.7.5}/tests/benches/test_failure.py +0 -0
  119. {dataframely-1.7.4 → dataframely-1.7.5}/tests/benches/test_schema.py +0 -0
  120. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_base.py +0 -0
  121. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_cast.py +0 -0
  122. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_collection_future_annotations.py +0 -0
  123. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_create_empty.py +0 -0
  124. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_filter_one_to_n.py +0 -0
  125. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_filter_validate.py +0 -0
  126. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_ignore_in_filter.py +0 -0
  127. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_implementation.py +0 -0
  128. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_matches.py +0 -0
  129. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_optional_members.py +0 -0
  130. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_read_write_parquet.py +0 -0
  131. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_repr.py +0 -0
  132. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_sample.py +0 -0
  133. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_serialization.py +0 -0
  134. {dataframely-1.7.4 → dataframely-1.7.5}/tests/collection/test_validate_input.py +0 -0
  135. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/__init__.py +0 -0
  136. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_any.py +0 -0
  137. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_array.py +0 -0
  138. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_datetime.py +0 -0
  139. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_decimal.py +0 -0
  140. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_enum.py +0 -0
  141. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_float.py +0 -0
  142. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_integer.py +0 -0
  143. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_list.py +0 -0
  144. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_object.py +0 -0
  145. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_string.py +0 -0
  146. {dataframely-1.7.4 → dataframely-1.7.5}/tests/column_types/test_struct.py +0 -0
  147. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/__init__.py +0 -0
  148. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_alias.py +0 -0
  149. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_check.py +0 -0
  150. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_default_dtypes.py +0 -0
  151. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_matches.py +0 -0
  152. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_metadata.py +0 -0
  153. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_polars_schema.py +0 -0
  154. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_pyarrow.py +0 -0
  155. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_rules.py +0 -0
  156. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_sample.py +0 -0
  157. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_sql_schema.py +0 -0
  158. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_str.py +0 -0
  159. {dataframely-1.7.4 → dataframely-1.7.5}/tests/columns/test_utils.py +0 -0
  160. {dataframely-1.7.4 → dataframely-1.7.5}/tests/core_validation/__init__.py +0 -0
  161. {dataframely-1.7.4 → dataframely-1.7.5}/tests/core_validation/test_column_validation.py +0 -0
  162. {dataframely-1.7.4 → dataframely-1.7.5}/tests/core_validation/test_dtype_validation.py +0 -0
  163. {dataframely-1.7.4 → dataframely-1.7.5}/tests/core_validation/test_rule_evaluation.py +0 -0
  164. {dataframely-1.7.4 → dataframely-1.7.5}/tests/functional/test_concat.py +0 -0
  165. {dataframely-1.7.4 → dataframely-1.7.5}/tests/functional/test_relationships.py +0 -0
  166. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_base.py +0 -0
  167. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_cast.py +0 -0
  168. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_create_empty.py +0 -0
  169. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_create_empty_if_none.py +0 -0
  170. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_filter.py +0 -0
  171. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_inheritance.py +0 -0
  172. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_matches.py +0 -0
  173. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_read_write_parquet.py +0 -0
  174. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_repr.py +0 -0
  175. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_rule_implementation.py +0 -0
  176. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_sample.py +0 -0
  177. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_serialization.py +0 -0
  178. {dataframely-1.7.4 → dataframely-1.7.5}/tests/schema/test_validate.py +0 -0
  179. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_compat.py +0 -0
  180. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_config.py +0 -0
  181. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_deprecation.py +0 -0
  182. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_exc.py +0 -0
  183. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_failure_info.py +0 -0
  184. {dataframely-1.7.4 → dataframely-1.7.5}/tests/test_random.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataframely
3
- Version: 1.7.4
3
+ Version: 1.7.5
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.10
6
6
  Classifier: Programming Language :: Python :: 3.11
@@ -3,6 +3,7 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import sys
6
7
  import textwrap
7
8
  import typing
8
9
  from abc import ABCMeta
@@ -11,13 +12,17 @@ from dataclasses import dataclass, field
11
12
  from typing import Annotated, Any, cast, get_args, get_origin
12
13
 
13
14
  import polars as pl
14
- from typing_extensions import Self
15
15
 
16
16
  from ._filter import Filter
17
17
  from ._typing import LazyFrame as TypedLazyFrame
18
18
  from .exc import AnnotationImplementationError, ImplementationError
19
19
  from .schema import Schema
20
20
 
21
+ if sys.version_info >= (3, 11):
22
+ from typing import Self
23
+ else:
24
+ from typing_extensions import Self
25
+
21
26
  _MEMBER_ATTR = "__dataframely_members__"
22
27
  _FILTER_ATTR = "__dataframely_filters__"
23
28
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import sys
6
7
  import textwrap
7
8
  from abc import ABCMeta
8
9
  from copy import copy
@@ -10,12 +11,16 @@ from dataclasses import dataclass, field
10
11
  from typing import Any
11
12
 
12
13
  import polars as pl
13
- from typing_extensions import Self
14
14
 
15
15
  from ._rule import GroupRule, Rule
16
16
  from .columns import Column
17
17
  from .exc import ImplementationError
18
18
 
19
+ if sys.version_info >= (3, 11):
20
+ from typing import Self
21
+ else:
22
+ from typing_extensions import Self
23
+
19
24
  _COLUMN_ATTR = "__dataframely_columns__"
20
25
  _RULE_ATTR = "__dataframely_rules__"
21
26
 
@@ -3,12 +3,17 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import sys
6
7
  from collections import defaultdict
7
8
  from collections.abc import Callable
8
9
  from typing import Any
9
10
 
10
11
  import polars as pl
11
- from typing_extensions import Self
12
+
13
+ if sys.version_info >= (3, 11):
14
+ from typing import Self
15
+ else:
16
+ from typing_extensions import Self
12
17
 
13
18
  ValidationFunction = Callable[[], pl.Expr]
14
19
 
@@ -2,6 +2,7 @@
2
2
  # SPDX-License-Identifier: BSD-3-Clause
3
3
 
4
4
  import json
5
+ import sys
5
6
  import warnings
6
7
  from abc import ABC
7
8
  from collections.abc import Mapping, Sequence
@@ -11,7 +12,6 @@ from typing import Annotated, Any, cast
11
12
 
12
13
  import polars as pl
13
14
  import polars.exceptions as plexc
14
- from typing_extensions import Self
15
15
 
16
16
  from ._base_collection import BaseCollection, CollectionMember
17
17
  from ._filter import Filter
@@ -33,6 +33,11 @@ from .failure import FailureInfo
33
33
  from .random import Generator
34
34
  from .schema import _schema_from_dict
35
35
 
36
+ if sys.version_info >= (3, 11):
37
+ from typing import Self
38
+ else:
39
+ from typing_extensions import Self
40
+
36
41
 
37
42
  class Collection(BaseCollection, ABC):
38
43
  """Base class for all collections of data frames with a predefined schema.
@@ -4,13 +4,13 @@
4
4
  from __future__ import annotations
5
5
 
6
6
  import inspect
7
+ import sys
7
8
  from abc import ABC, abstractmethod
8
9
  from collections import Counter
9
10
  from collections.abc import Callable
10
11
  from typing import Any, TypeAlias, cast
11
12
 
12
13
  import polars as pl
13
- from typing_extensions import Self
14
14
 
15
15
  from dataframely._compat import pa, sa, sa_TypeEngine
16
16
  from dataframely._deprecation import (
@@ -20,6 +20,11 @@ from dataframely._deprecation import (
20
20
  from dataframely._polars import PolarsDataType
21
21
  from dataframely.random import Generator
22
22
 
23
+ if sys.version_info >= (3, 11):
24
+ from typing import Self
25
+ else:
26
+ from typing_extensions import Self
27
+
23
28
  Check: TypeAlias = (
24
29
  Callable[[pl.Expr], pl.Expr]
25
30
  | list[Callable[[pl.Expr], pl.Expr]]
@@ -1,11 +1,11 @@
1
1
  # Copyright (c) QuantCo 2025-2025
2
2
  # SPDX-License-Identifier: BSD-3-Clause
3
3
 
4
+ import sys
4
5
  from collections.abc import Sequence
5
6
  from typing import TYPE_CHECKING, Any, Generic, Protocol, TypeVar
6
7
 
7
8
  import polars as pl
8
- from typing_extensions import Self
9
9
 
10
10
  if TYPE_CHECKING: # pragma: no cover
11
11
  from ._base import Column
@@ -14,6 +14,11 @@ if TYPE_CHECKING: # pragma: no cover
14
14
  else:
15
15
  Base = object
16
16
 
17
+ if sys.version_info >= (3, 11):
18
+ from typing import Self
19
+ else:
20
+ from typing_extensions import Self
21
+
17
22
  # ----------------------------------- ORDINAL MIXIN ---------------------------------- #
18
23
 
19
24
 
@@ -4,11 +4,11 @@
4
4
  from __future__ import annotations
5
5
 
6
6
  import math
7
+ import sys
7
8
  from collections.abc import Sequence
8
9
  from typing import Any, Literal, cast
9
10
 
10
11
  import polars as pl
11
- from typing_extensions import Self
12
12
 
13
13
  from dataframely._compat import pa, sa, sa_TypeEngine
14
14
  from dataframely.random import Generator
@@ -17,6 +17,11 @@ from ._base import Check, Column
17
17
  from ._registry import column_from_dict, register
18
18
  from .struct import Struct
19
19
 
20
+ if sys.version_info >= (3, 11):
21
+ from typing import Self
22
+ else:
23
+ from typing_extensions import Self
24
+
20
25
 
21
26
  @register
22
27
  class Array(Column):
@@ -3,11 +3,11 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import sys
6
7
  from itertools import chain
7
8
  from typing import Any, cast
8
9
 
9
10
  import polars as pl
10
- from typing_extensions import Self
11
11
 
12
12
  from dataframely._compat import pa, sa, sa_TypeEngine
13
13
  from dataframely._polars import PolarsDataType
@@ -17,6 +17,11 @@ from ._base import Check, Column
17
17
  from ._registry import column_from_dict, register
18
18
  from .struct import Struct
19
19
 
20
+ if sys.version_info >= (3, 11):
21
+ from typing import Self
22
+ else:
23
+ from typing_extensions import Self
24
+
20
25
 
21
26
  @register
22
27
  class List(Column):
@@ -3,10 +3,10 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import sys
6
7
  from typing import Any, cast
7
8
 
8
9
  import polars as pl
9
- from typing_extensions import Self
10
10
 
11
11
  from dataframely._compat import pa, sa, sa_TypeEngine
12
12
  from dataframely._polars import PolarsDataType
@@ -15,6 +15,11 @@ from dataframely.random import Generator
15
15
  from ._base import Check, Column
16
16
  from ._registry import column_from_dict, register
17
17
 
18
+ if sys.version_info >= (3, 11):
19
+ from typing import Self
20
+ else:
21
+ from typing_extensions import Self
22
+
18
23
 
19
24
  @register
20
25
  class Struct(Column):
@@ -2,10 +2,14 @@
2
2
  # SPDX-License-Identifier: BSD-3-Clause
3
3
 
4
4
  import contextlib
5
+ import sys
5
6
  from types import TracebackType
6
7
  from typing import TypedDict
7
8
 
8
- from typing_extensions import Unpack
9
+ if sys.version_info >= (3, 11):
10
+ from typing import Unpack
11
+ else:
12
+ from typing_extensions import Unpack
9
13
 
10
14
 
11
15
  class Options(TypedDict):
@@ -4,6 +4,7 @@
4
4
  from __future__ import annotations
5
5
 
6
6
  import json
7
+ import sys
7
8
  import warnings
8
9
  from abc import ABC
9
10
  from collections.abc import Iterable, Mapping, Sequence
@@ -14,7 +15,6 @@ import polars as pl
14
15
  import polars.exceptions as plexc
15
16
  import polars.selectors as cs
16
17
  from polars._typing import FileSource, PartitioningScheme
17
- from typing_extensions import Self
18
18
 
19
19
  from ._base_schema import BaseSchema
20
20
  from ._compat import pa, sa
@@ -34,6 +34,11 @@ from .exc import RuleValidationError, ValidationError, ValidationRequiredError
34
34
  from .failure import FailureInfo
35
35
  from .random import Generator
36
36
 
37
+ if sys.version_info >= (3, 11):
38
+ from typing import Self
39
+ else:
40
+ from typing_extensions import Self
41
+
37
42
  _ORIGINAL_NULL_SUFFIX = "__orig_null__"
38
43
 
39
44
 
@@ -25,7 +25,7 @@ description = "A declarative, polars-native data frame validation library"
25
25
  name = "dataframely"
26
26
  readme = "README.md"
27
27
  requires-python = ">=3.10"
28
- version = "1.7.4"
28
+ version = "1.7.5"
29
29
 
30
30
  [project.urls]
31
31
  Documentation = "https://dataframely.readthedocs.io/"
@@ -60,7 +60,7 @@ fn string_length_recursively(hir: &Hir) -> Result<(usize, Option<usize>)> {
60
60
  .collect::<std::result::Result<Vec<_>, _>>()?;
61
61
  (
62
62
  inner.iter().map(|x| x.0).min().unwrap_or(0),
63
- inner.iter().map(|x| x.0).max(),
63
+ inner.iter().flat_map(|x| x.1).max(),
64
64
  )
65
65
  }
66
66
  // A class's length is always a single character and therefore has length 1
@@ -21,6 +21,7 @@ import dataframely._extre as extre
21
21
  (r"[0-9]{2}[0-9a-zA-Z]{2,4}", 4, 6),
22
22
  (r"^[0-9]{2}[0-9a-zA-Z]{2,4}$", 4, 6),
23
23
  (r"^[0-9]{2}[0-9a-zA-Z]{2,4}.+$", 5, None),
24
+ (r"^[A-Z][0-9]{2}(\*|(\.[0-9]{1,2}[*!]?))?$", 3, 7),
24
25
  ],
25
26
  )
26
27
  def test_matching_string_length(
@@ -9,11 +9,11 @@
9
9
  import datetime
10
10
  import decimal
11
11
  import functools
12
+ import sys
12
13
  from typing import Any, TypedDict
13
14
 
14
15
  import polars as pl
15
16
  import pytest
16
- from typing_extensions import NotRequired
17
17
 
18
18
  import dataframely as dy
19
19
 
@@ -21,6 +21,11 @@ import dataframely as dy
21
21
  # we also need to make sure that imported schemas are properly processed.
22
22
  from dataframely.testing.typing import MyImportedSchema
23
23
 
24
+ if sys.version_info >= (3, 11):
25
+ from typing import NotRequired
26
+ else:
27
+ from typing_extensions import NotRequired
28
+
24
29
  pytestmark = pytest.mark.skip(reason="typing-only tests")
25
30
 
26
31
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes