dataframely 1.12.0__tar.gz → 1.12.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.12.0 → dataframely-1.12.1}/PKG-INFO +1 -1
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/_base.py +0 -13
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/enum.py +4 -8
- {dataframely-1.12.0 → dataframely-1.12.1}/pyproject.toml +1 -1
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_repr.py +11 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_serialization.py +1 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.copier-answers.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.envrc +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.gitattributes +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/CODEOWNERS +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/dependabot.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/release-drafter.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/workflows/build.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/workflows/chore.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/workflows/ci.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/workflows/nightly.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.github/workflows/scorecard.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.gitignore +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.pre-commit-config.yaml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.prettierignore +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.prettierrc +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/.readthedocs.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/Cargo.lock +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/Cargo.toml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/LICENSE +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/README.md +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/SECURITY.md +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/__init__.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_base_collection.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_base_schema.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_compat.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_deprecation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_extre.pyi +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_filter.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_polars.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_rule.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_serialization.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_storage/__init__.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_storage/_base.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_storage/_exc.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_storage/constants.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_storage/delta.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_storage/parquet.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_typing.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/_validation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/collection.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/__init__.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/_mixins.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/_registry.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/_utils.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/any.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/array.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/binary.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/bool.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/categorical.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/datetime.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/decimal.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/float.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/integer.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/list.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/object.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/string.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/columns/struct.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/config.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/exc.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/failure.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/functional.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/mypy.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/py.typed +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/random.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/schema.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/testing/__init__.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/testing/const.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/testing/factory.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/testing/mask.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/testing/rules.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/testing/storage.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/dataframely/testing/typing.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docker-compose.yml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/Makefile +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.collection.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.any.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.bool.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.datetime.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.decimal.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.enum.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.float.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.integer.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.list.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.string.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.columns.struct.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.config.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.exc.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.failure.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.functional.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.mypy.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.random.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.schema.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.testing.const.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.testing.factory.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.testing.mask.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.testing.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.testing.rules.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/dataframely.testing.typing.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_api/modules.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_static/custom.css +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/_static/favicon.ico +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/conf.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/index.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/make.bat +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/sites/development.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/sites/examples/real-world.ipynb +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/sites/faq.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/sites/installation.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/sites/quickstart.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/docs/sites/versioning.rst +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/pixi.lock +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/pixi.toml +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/src/errdefs.rs +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/src/lib.rs +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/src/regex_repr.rs +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/benches/conftest.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/benches/test_collection.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/benches/test_failure.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/benches/test_schema.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_base.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_cast.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_collection_future_annotations.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_create_empty.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_filter_one_to_n.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_filter_validate.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_ignore_in_filter.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_implementation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_join.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_matches.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_optional_members.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_repr.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_sample.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_serialization.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_storage.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/collection/test_validate_input.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/__init__.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_any.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_array.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_binary.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_datetime.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_decimal.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_enum.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_float.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_integer.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_list.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_object.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_string.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/column_types/test_struct.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/__init__.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_alias.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_check.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_default_dtypes.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_matches.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_metadata.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_polars_schema.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_pyarrow.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_rules.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_sample.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_sql_schema.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_str.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/columns/test_utils.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/core_validation/__init__.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/core_validation/test_column_validation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/core_validation/test_dtype_validation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/core_validation/test_rule_evaluation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/failure_info/test_storage.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/functional/test_concat.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/functional/test_relationships.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_base.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_cast.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_create_empty.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_create_empty_if_none.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_filter.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_inheritance.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_matches.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_read_write_parquet.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_rule_implementation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_sample.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_storage.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/schema/test_validate.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/storage/test_delta.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_compat.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_config.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_deprecation.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_exc.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_extre.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_factory.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_random.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_serialization.py +0 -0
- {dataframely-1.12.0 → dataframely-1.12.1}/tests/test_typing.py +0 -0
|
@@ -381,15 +381,6 @@ class Column(ABC):
|
|
|
381
381
|
if name == "check":
|
|
382
382
|
return _compare_checks(lhs, rhs, column_expr)
|
|
383
383
|
|
|
384
|
-
lhs_is_series = isinstance(lhs, pl.Series)
|
|
385
|
-
rhs_is_series = isinstance(rhs, pl.Series)
|
|
386
|
-
|
|
387
|
-
if lhs_is_series != rhs_is_series:
|
|
388
|
-
return False
|
|
389
|
-
|
|
390
|
-
if lhs_is_series and rhs_is_series:
|
|
391
|
-
return _compare_series(lhs, rhs)
|
|
392
|
-
|
|
393
384
|
return lhs == rhs
|
|
394
385
|
|
|
395
386
|
# -------------------------------- DUNDER METHODS -------------------------------- #
|
|
@@ -413,10 +404,6 @@ class Column(ABC):
|
|
|
413
404
|
return self.__class__.__name__.lower()
|
|
414
405
|
|
|
415
406
|
|
|
416
|
-
def _compare_series(lhs: pl.Series, rhs: pl.Series) -> bool:
|
|
417
|
-
return (len(lhs) == len(rhs)) and lhs.equals(rhs)
|
|
418
|
-
|
|
419
|
-
|
|
420
407
|
def _compare_checks(lhs: Check | None, rhs: Check | None, expr: pl.Expr) -> bool:
|
|
421
408
|
match (lhs, rhs):
|
|
422
409
|
case (None, None):
|
|
@@ -67,12 +67,8 @@ class Enum(Column):
|
|
|
67
67
|
metadata=metadata,
|
|
68
68
|
)
|
|
69
69
|
if isclass(categories) and issubclass(categories, enum.Enum):
|
|
70
|
-
categories =
|
|
71
|
-
|
|
72
|
-
)
|
|
73
|
-
elif not isinstance(categories, pl.Series):
|
|
74
|
-
categories = pl.Series(values=categories)
|
|
75
|
-
self.categories = categories
|
|
70
|
+
categories = (item.value for item in categories)
|
|
71
|
+
self.categories = list(categories)
|
|
76
72
|
|
|
77
73
|
@property
|
|
78
74
|
def dtype(self) -> pl.DataType:
|
|
@@ -81,7 +77,7 @@ class Enum(Column):
|
|
|
81
77
|
def validate_dtype(self, dtype: PolarsDataType) -> bool:
|
|
82
78
|
if not isinstance(dtype, pl.Enum):
|
|
83
79
|
return False
|
|
84
|
-
return self.categories
|
|
80
|
+
return self.categories == dtype.categories.to_list()
|
|
85
81
|
|
|
86
82
|
def sqlalchemy_dtype(self, dialect: sa.Dialect) -> sa_TypeEngine:
|
|
87
83
|
category_lengths = [len(c) for c in self.categories]
|
|
@@ -102,6 +98,6 @@ class Enum(Column):
|
|
|
102
98
|
def _sample_unchecked(self, generator: Generator, n: int) -> pl.Series:
|
|
103
99
|
return generator.sample_choice(
|
|
104
100
|
n,
|
|
105
|
-
choices=self.categories
|
|
101
|
+
choices=self.categories,
|
|
106
102
|
null_probability=self._null_probability,
|
|
107
103
|
).cast(self.dtype)
|
|
@@ -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.12.
|
|
28
|
+
version = "1.12.1"
|
|
29
29
|
|
|
30
30
|
[project.optional-dependencies]
|
|
31
31
|
deltalake = ["deltalake"]
|
|
@@ -52,3 +52,14 @@ def test_repr_with_rules() -> None:
|
|
|
52
52
|
- "my_rule": [(col("a")) < (dyn int: 100)]
|
|
53
53
|
- "my_group_rule": [(col("a").sum()) > (dyn int: 50)] grouped by ['a']
|
|
54
54
|
""")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def test_repr_enum() -> None:
|
|
58
|
+
class SchemaNoRules(dy.Schema):
|
|
59
|
+
a = dy.Enum(["a"])
|
|
60
|
+
|
|
61
|
+
assert repr(SchemaNoRules) == textwrap.dedent("""\
|
|
62
|
+
[Schema "SchemaNoRules"]
|
|
63
|
+
Columns:
|
|
64
|
+
- "a": Enum(categories=['a'], nullable=True)
|
|
65
|
+
""")
|
|
@@ -40,6 +40,7 @@ def test_simple_serialization() -> None:
|
|
|
40
40
|
create_schema("test", {"a": dy.Int64(check=[lambda expr: expr > 5])}),
|
|
41
41
|
create_schema("test", {"a": dy.Int64(check={"x": lambda expr: expr > 5})}),
|
|
42
42
|
create_schema("test", {"a": dy.Int64(alias="foo")}),
|
|
43
|
+
create_schema("test", {"a": dy.Enum(["a"])}),
|
|
43
44
|
create_schema("test", {"a": dy.Decimal(scale=2, min=Decimal("1.5"))}),
|
|
44
45
|
create_schema("test", {"a": dy.Date(min=dt.date(2020, 1, 1))}),
|
|
45
46
|
create_schema("test", {"a": dy.Datetime(min=dt.datetime(2020, 1, 1))}),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.12.0 → dataframely-1.12.1}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|