dataframely 1.7.3__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.
- {dataframely-1.7.3 → dataframely-1.7.5}/PKG-INFO +1 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_base_collection.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_base_schema.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_rule.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/collection.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/_base.py +13 -4
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/_mixins.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/array.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/list.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/struct.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/config.py +5 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/schema.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/pyproject.toml +1 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/src/regex_repr.rs +1 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_extre.py +1 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_typing.py +6 -1
- {dataframely-1.7.3 → dataframely-1.7.5}/.copier-answers.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.envrc +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.gitattributes +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/CODEOWNERS +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/dependabot.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/release-drafter.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/workflows/build.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/workflows/chore.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/workflows/ci.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/workflows/nightly.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.github/workflows/scorecard.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.gitignore +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.pre-commit-config.yaml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.prettierignore +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.prettierrc +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/.readthedocs.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/Cargo.lock +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/Cargo.toml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/LICENSE +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/README.md +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/SECURITY.md +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/__init__.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_compat.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_deprecation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_extre.pyi +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_filter.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_polars.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_serialization.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_typing.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/_validation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/__init__.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/_registry.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/_utils.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/any.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/bool.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/datetime.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/decimal.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/enum.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/float.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/integer.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/object.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/columns/string.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/exc.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/failure.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/functional.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/mypy.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/py.typed +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/random.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/testing/__init__.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/testing/const.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/testing/factory.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/testing/mask.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/testing/rules.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/dataframely/testing/typing.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docker-compose.yml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/Makefile +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.collection.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.any.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.bool.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.datetime.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.decimal.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.enum.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.float.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.integer.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.list.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.string.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.columns.struct.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.config.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.exc.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.failure.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.functional.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.mypy.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.random.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.schema.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.testing.const.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.testing.factory.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.testing.mask.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.testing.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.testing.rules.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/dataframely.testing.typing.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_api/modules.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_static/custom.css +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/_static/favicon.ico +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/conf.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/index.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/make.bat +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/sites/development.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/sites/examples/real-world.ipynb +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/sites/faq.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/sites/installation.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/sites/quickstart.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/docs/sites/versioning.rst +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/pixi.lock +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/pixi.toml +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/src/errdefs.rs +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/src/lib.rs +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/benches/conftest.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/benches/test_collection.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/benches/test_failure.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/benches/test_schema.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_base.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_cast.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_collection_future_annotations.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_create_empty.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_filter_one_to_n.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_filter_validate.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_ignore_in_filter.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_implementation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_matches.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_optional_members.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_read_write_parquet.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_repr.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_sample.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_serialization.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_validate_input.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/__init__.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_any.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_array.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_datetime.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_decimal.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_enum.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_float.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_integer.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_list.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_object.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_string.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/column_types/test_struct.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/__init__.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_alias.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_check.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_default_dtypes.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_matches.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_metadata.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_polars_schema.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_pyarrow.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_rules.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_sample.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_sql_schema.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_str.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/columns/test_utils.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/core_validation/__init__.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/core_validation/test_column_validation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/core_validation/test_dtype_validation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/core_validation/test_rule_evaluation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/functional/test_concat.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/functional/test_relationships.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_base.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_cast.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_create_empty.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_create_empty_if_none.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_filter.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_inheritance.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_matches.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_read_write_parquet.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_repr.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_rule_implementation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_sample.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_serialization.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/schema/test_validate.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_compat.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_config.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_deprecation.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_exc.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_failure_info.py +0 -0
- {dataframely-1.7.3 → dataframely-1.7.5}/tests/test_random.py +0 -0
|
@@ -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
|
-
|
|
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]]
|
|
@@ -75,12 +80,16 @@ class Column(ABC):
|
|
|
75
80
|
|
|
76
81
|
if nullable and primary_key:
|
|
77
82
|
warn_no_nullable_primary_keys()
|
|
83
|
+
nullable = False
|
|
78
84
|
|
|
79
85
|
if nullable is None:
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
if primary_key:
|
|
87
|
+
nullable = False
|
|
88
|
+
else:
|
|
89
|
+
warn_nullable_default_change()
|
|
90
|
+
nullable = True
|
|
82
91
|
|
|
83
|
-
self.nullable = nullable
|
|
92
|
+
self.nullable = nullable
|
|
84
93
|
self.primary_key = primary_key
|
|
85
94
|
self.check = check
|
|
86
95
|
self.alias = alias
|
|
@@ -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
|
-
|
|
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.
|
|
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().
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
{dataframely-1.7.3 → dataframely-1.7.5}/tests/collection/test_collection_future_annotations.py
RENAMED
|
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
|
|
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
|
|
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
|
|
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
|