dataframely 1.2.0__tar.gz → 1.2.1__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.2.0 → dataframely-1.2.1}/PKG-INFO +1 -1
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_rule.py +3 -1
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/enum.py +1 -1
- {dataframely-1.2.0 → dataframely-1.2.1}/pyproject.toml +1 -1
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_enum.py +9 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_validate.py +9 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.copier-answers.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.envrc +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.gitattributes +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/CODEOWNERS +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/dependabot.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/release-drafter.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/workflows/build.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/workflows/chore.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/workflows/ci.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.github/workflows/update-lockfiles.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.gitignore +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.pre-commit-config.yaml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.prettierignore +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.prettierrc +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/.readthedocs.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/Cargo.lock +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/Cargo.toml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/LICENSE +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/README.md +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/__init__.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_base_collection.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_base_schema.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_compat.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_extre.pyi +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_filter.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_polars.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_typing.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/_validation.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/collection.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/__init__.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/_base.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/_mixins.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/_utils.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/any.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/bool.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/datetime.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/decimal.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/float.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/integer.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/list.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/object.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/string.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/columns/struct.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/config.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/exc.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/failure.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/functional.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/mypy.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/py.typed +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/random.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/schema.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/testing/__init__.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/testing/const.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/testing/factory.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/testing/mask.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/testing/rules.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/dataframely/testing/typing.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docker-compose.yml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/Makefile +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.collection.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.any.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.bool.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.datetime.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.decimal.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.enum.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.float.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.integer.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.list.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.string.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.columns.struct.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.config.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.exc.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.failure.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.functional.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.mypy.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.random.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.schema.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.testing.const.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.testing.factory.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.testing.mask.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.testing.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.testing.rules.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/dataframely.testing.typing.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_api/modules.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_static/custom.css +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/_static/favicon.ico +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/conf.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/index.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/make.bat +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/sites/development.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/sites/examples/real-world.ipynb +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/sites/faq.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/sites/installation.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/docs/sites/quickstart.rst +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/pixi.lock +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/pixi.toml +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/src/errdefs.rs +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/src/lib.rs +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/src/regex_repr.rs +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_base.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_cast.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_create_empty.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_filter_one_to_n.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_filter_validate.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_ignore_in_filter.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_implementation.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_optional_members.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_sample.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/collection/test_validate_input.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/__init__.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_any.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_datetime.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_decimal.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_float.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_integer.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_list.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_object.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_string.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/column_types/test_struct.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/__init__.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_alias.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_check.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_default_dtypes.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_metadata.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_polars_schema.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_pyarrow.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_rules.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_sample.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_sql_schema.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_str.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/columns/test_utils.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/core_validation/__init__.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/core_validation/test_column_validation.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/core_validation/test_dtype_validation.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/core_validation/test_rule_evaluation.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/functional/test_concat.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/functional/test_relationships.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_base.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_cast.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_create_empty.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_create_empty_if_none.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_filter.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_inheritance.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_rule_implementation.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/schema/test_sample.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/test_compat.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/test_config.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/test_exc.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/test_extre.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/test_failure_info.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/test_random.py +0 -0
- {dataframely-1.2.0 → dataframely-1.2.1}/tests/test_typing.py +0 -0
|
@@ -126,5 +126,7 @@ def _with_group_rules(lf: pl.LazyFrame, rules: dict[str, GroupRule]) -> pl.LazyF
|
|
|
126
126
|
# preserves the order of the left data frame.
|
|
127
127
|
result = lf
|
|
128
128
|
for group_columns, frame in group_evaluations.items():
|
|
129
|
-
result = result.join(
|
|
129
|
+
result = result.join(
|
|
130
|
+
frame, on=list(group_columns), how="left", nulls_equal=True
|
|
131
|
+
)
|
|
130
132
|
return result
|
|
@@ -19,7 +19,7 @@ description = "A declarative, polars-native data frame validation library"
|
|
|
19
19
|
name = "dataframely"
|
|
20
20
|
readme = "README.md"
|
|
21
21
|
requires-python = ">=3.11"
|
|
22
|
-
version = "1.2.
|
|
22
|
+
version = "1.2.1"
|
|
23
23
|
|
|
24
24
|
[project.urls]
|
|
25
25
|
Repository = "https://github.com/quantco/dataframely"
|
|
@@ -52,3 +52,12 @@ def test_valid_cast(
|
|
|
52
52
|
schema = create_schema("test", {"a": enum})
|
|
53
53
|
df = df_type(data)
|
|
54
54
|
assert schema.is_valid(df, cast=True) == valid
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@pytest.mark.parametrize("type1", [list, tuple])
|
|
58
|
+
@pytest.mark.parametrize("type2", [list, tuple])
|
|
59
|
+
def test_different_sequences(type1: type, type2: type) -> None:
|
|
60
|
+
allowed = ["a", "b"]
|
|
61
|
+
S = create_schema("test", {"x": dy.Enum(type1(allowed))})
|
|
62
|
+
df = pl.DataFrame({"x": pl.Series(["a", "b"], dtype=pl.Enum(type2(allowed)))})
|
|
63
|
+
S.validate(df)
|
|
@@ -116,3 +116,12 @@ def test_success_multi_row_strip_cast(
|
|
|
116
116
|
)
|
|
117
117
|
assert_frame_equal(actual, expected)
|
|
118
118
|
assert MySchema.is_valid(df, cast=True)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@pytest.mark.parametrize("df_type", [pl.DataFrame, pl.LazyFrame])
|
|
122
|
+
def test_group_rule_on_nulls(df_type: type[pl.DataFrame] | type[pl.LazyFrame]) -> None:
|
|
123
|
+
# The schema is violated because we have multiple "b" values for the same "a" value
|
|
124
|
+
df = df_type({"a": [None, None], "b": [1, 2]})
|
|
125
|
+
with pytest.raises(RuleValidationError):
|
|
126
|
+
MyComplexSchema.validate(df, cast=True)
|
|
127
|
+
assert not MyComplexSchema.is_valid(df, cast=True)
|
|
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
|
|
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
|