dataframely 3.1.0__tar.gz → 3.1.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-3.1.0 → dataframely-3.1.1}/PKG-INFO +1 -1
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/categorical.py +5 -2
- {dataframely-3.1.0 → dataframely-3.1.1}/pyproject.toml +1 -1
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_sample.py +25 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.claude/CLAUDE.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.copier-answers.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.envrc +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.gitattributes +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/CODEOWNERS +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/copilot-instructions.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/dependabot.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/instructions/tests.instructions.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/release-drafter.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/workflows/build.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/workflows/chore.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/workflows/ci.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/workflows/copilot-setup-steps.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/workflows/nightly.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/workflows/release-drafter.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.github/workflows/scorecard.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.gitignore +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.lefthook.yaml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.prettierignore +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.prettierrc +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/.readthedocs.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/AGENTS.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/Cargo.lock +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/Cargo.toml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/LICENSE +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/README.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/SECURITY.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_base_schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_compat.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_deprecation.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_filter.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_match_to_schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_native.pyi +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_plugin.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_polars.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_pydantic.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_rule.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/_typing.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/collection/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/collection/_base.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/collection/collection.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/collection/filter_result.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/_base.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/_mixins.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/_utils.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/any.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/array.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/binary.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/bool.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/datetime.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/decimal.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/enum.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/float.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/integer.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/list.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/object.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/string.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/columns/struct.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/config.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/exc.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/experimental/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/experimental/infer_schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/filter_result.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/functional.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/py.typed +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/random.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/testing/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/testing/const.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/testing/factory.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/testing/mask.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/dataframely/testing/rules.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docker-compose.yml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/_static/custom.css +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/_static/favicon.ico +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/_templates/autosummary/class.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/_templates/autosummary/method.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/_templates/classes/column.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/_templates/classes/error.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/_templates/classes/filter_result.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/collection/generation.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/collection/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/collection/io.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/collection/metadata.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/collection/operations.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/collection/validation.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/columns/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/errors/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/experimental/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/filter_result/failure_info.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/filter_result/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/misc/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/schema/conversion.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/schema/generation.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/schema/index.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/schema/metadata.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/api/schema/validation.rst +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/conf.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/css/custom.css +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/coding-agents.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/development.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/examples/index.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/examples/real-world.ipynb +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/faq.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/features/column-metadata.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/features/data-generation.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/features/index.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/features/lazy-validation.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/features/primary-keys.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/features/serialization.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/features/sql-generation.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/index.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/migration/index.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/migration/v1-v2.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/migration/v2-v3.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/guides/quickstart.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/docs/index.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/pixi.lock +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/pixi.toml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/rust-toolchain.toml +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/skills/SKILL.md +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/arrow.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/lib.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/polars_plugin/mod.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/polars_plugin/rule_failure.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/polars_plugin/utils.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/polars_plugin/validation_error.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/regex/errdefs.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/regex/mod.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/src/regex/repr.rs +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/benches/conftest.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/benches/test_collection.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/benches/test_failure.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/benches/test_schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_base.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_cast.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_collection_future_annotations.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_create_empty.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_dataframe_members.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_filter_one_to_n.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_filter_validate.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_ignore_in_filter.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_implementation.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_join.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_matches.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_optional_members.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_parquet.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_pipe.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_propagate_row_failures.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_repr.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_sample.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_skip_member_validation.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/collection/test_validate_input.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_any.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_array.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_binary.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_categorical.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_datetime.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_decimal.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_enum.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_float.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_integer.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_list.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_object.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_string.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/column_types/test_struct.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_alias.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_arrow_pycapsule.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_base.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_check.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_default_dtypes.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_description.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_matches.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_metadata.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_polars_schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_pydantic.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_rules.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_sqlalchemy_columns.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_str.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/columns/test_utils.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/core_validation/__init__.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/core_validation/test_match_to_schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/core_validation/test_rule_evaluation.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/experimental/test_infer_schema.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/failure_info/test_parquet.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/functional/test_concat.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/functional/test_relationships.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_base.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_cast.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_create_empty.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_create_empty_if_none.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_filter.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_inheritance.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_matches.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_pydantic_model.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_repr.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_rule_implementation.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_sample.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/schema/test_validate.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_compat.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_config.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_deprecation.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_factory.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_native_regex.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_pydantic.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_random.py +0 -0
- {dataframely-3.1.0 → dataframely-3.1.1}/tests/test_typing.py +0 -0
|
@@ -132,7 +132,10 @@ class Categorical(Column):
|
|
|
132
132
|
return str
|
|
133
133
|
|
|
134
134
|
def _sample_unchecked(self, generator: Generator, n: int) -> pl.Series:
|
|
135
|
-
#
|
|
135
|
+
# Two-letter strings allow 702 categories, exceeding UInt8's capacity.
|
|
136
|
+
max_length = 1 if self._categories.physical() == pl.UInt8 else 2
|
|
136
137
|
return generator.sample_string(
|
|
137
|
-
n,
|
|
138
|
+
n,
|
|
139
|
+
regex=rf"[a-z]{{1,{max_length}}}",
|
|
140
|
+
null_probability=self._null_probability,
|
|
138
141
|
).cast(self.dtype)
|
|
@@ -26,7 +26,7 @@ description = "A declarative, polars-native data frame validation library"
|
|
|
26
26
|
name = "dataframely"
|
|
27
27
|
readme = "README.md"
|
|
28
28
|
requires-python = ">=3.10"
|
|
29
|
-
version = "3.1.
|
|
29
|
+
version = "3.1.1"
|
|
30
30
|
|
|
31
31
|
[project.optional-dependencies]
|
|
32
32
|
pydantic = ["pydantic>=2"]
|
|
@@ -175,6 +175,31 @@ def test_sample_enum(generator: Generator) -> None:
|
|
|
175
175
|
assert set(samples) == {"a", "b", "c"}
|
|
176
176
|
|
|
177
177
|
|
|
178
|
+
@pytest.mark.parametrize("physical", [pl.UInt8, pl.UInt16, pl.UInt32])
|
|
179
|
+
@pytest.mark.parametrize("explicit_categories", [False, True])
|
|
180
|
+
@pytest.mark.parametrize("nullable", [False, True])
|
|
181
|
+
@pytest.mark.parametrize("n", [0, 10_000])
|
|
182
|
+
def test_sample_categorical(
|
|
183
|
+
physical: type[pl.DataType],
|
|
184
|
+
explicit_categories: bool,
|
|
185
|
+
nullable: bool,
|
|
186
|
+
n: int,
|
|
187
|
+
generator: Generator,
|
|
188
|
+
) -> None:
|
|
189
|
+
categories = (
|
|
190
|
+
pl.Categories("sample", physical=physical) if explicit_categories else physical
|
|
191
|
+
)
|
|
192
|
+
schema = create_schema("test", {"a": dy.Categorical(categories, nullable=nullable)})
|
|
193
|
+
column = schema.columns()["a"]
|
|
194
|
+
samples = sample_and_validate(column, generator, n=n)
|
|
195
|
+
assert len(samples) == n
|
|
196
|
+
assert samples.dtype == column.dtype
|
|
197
|
+
assert samples.to_physical().dtype == physical
|
|
198
|
+
assert samples.drop_nulls().n_unique() <= (256 if physical == pl.UInt8 else 702)
|
|
199
|
+
if n:
|
|
200
|
+
assert samples.is_null().any() == nullable
|
|
201
|
+
|
|
202
|
+
|
|
178
203
|
def test_sample_list(generator: Generator) -> None:
|
|
179
204
|
column = dy.List(
|
|
180
205
|
dy.String(regex="[abc]"), nullable=True, min_length=5, max_length=10
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-3.1.0 → dataframely-3.1.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|