dataframely 1.6.0__tar.gz → 1.7.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.6.0 → dataframely-1.7.1}/.github/workflows/build.yml +3 -3
- {dataframely-1.6.0 → dataframely-1.7.1}/.github/workflows/chore.yml +2 -2
- {dataframely-1.6.0 → dataframely-1.7.1}/.github/workflows/ci.yml +2 -2
- dataframely-1.7.1/.github/workflows/nightly.yml +36 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.github/workflows/scorecard.yml +1 -1
- {dataframely-1.6.0 → dataframely-1.7.1}/PKG-INFO +3 -2
- {dataframely-1.6.0 → dataframely-1.7.1}/README.md +2 -1
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/__init__.py +4 -2
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_base_schema.py +5 -1
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_serialization.py +25 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_typing.py +3 -1
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/collection.py +330 -35
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/exc.py +4 -0
- dataframely-1.7.1/dataframely/failure.py +229 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/schema.py +306 -22
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/testing/rules.py +1 -1
- {dataframely-1.6.0 → dataframely-1.7.1}/pixi.lock +12345 -6929
- {dataframely-1.6.0 → dataframely-1.7.1}/pixi.toml +10 -2
- {dataframely-1.6.0 → dataframely-1.7.1}/pyproject.toml +3 -3
- dataframely-1.7.1/tests/benches/conftest.py +25 -0
- dataframely-1.7.1/tests/benches/test_collection.py +112 -0
- dataframely-1.7.1/tests/benches/test_failure.py +35 -0
- dataframely-1.7.1/tests/benches/test_schema.py +168 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_base.py +0 -40
- dataframely-1.7.1/tests/collection/test_read_write_parquet.py +285 -0
- dataframely-1.7.1/tests/collection/test_serialization.py +77 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_base.py +9 -0
- dataframely-1.7.1/tests/schema/test_read_write_parquet.py +218 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_sample.py +71 -0
- dataframely-1.7.1/tests/test_failure_info.py +81 -0
- dataframely-1.6.0/dataframely/failure.py +0 -154
- dataframely-1.6.0/tests/test_failure_info.py +0 -66
- {dataframely-1.6.0 → dataframely-1.7.1}/.copier-answers.yml +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.envrc +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.gitattributes +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.github/CODEOWNERS +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.github/dependabot.yml +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.github/release-drafter.yml +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.gitignore +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.pre-commit-config.yaml +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.prettierignore +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.prettierrc +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/.readthedocs.yml +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/Cargo.lock +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/Cargo.toml +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/LICENSE +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/SECURITY.md +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_base_collection.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_compat.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_deprecation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_extre.pyi +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_filter.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_polars.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_rule.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/_validation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/__init__.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/_base.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/_mixins.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/_registry.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/_utils.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/any.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/array.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/bool.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/datetime.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/decimal.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/enum.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/float.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/integer.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/list.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/object.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/string.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/columns/struct.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/config.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/functional.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/mypy.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/py.typed +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/random.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/testing/__init__.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/testing/const.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/testing/factory.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/testing/mask.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/dataframely/testing/typing.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docker-compose.yml +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/Makefile +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.collection.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.any.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.bool.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.datetime.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.decimal.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.enum.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.float.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.integer.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.list.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.string.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.columns.struct.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.config.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.exc.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.failure.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.functional.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.mypy.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.random.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.schema.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.testing.const.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.testing.factory.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.testing.mask.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.testing.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.testing.rules.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/dataframely.testing.typing.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_api/modules.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_static/custom.css +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/_static/favicon.ico +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/conf.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/index.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/make.bat +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/sites/development.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/sites/examples/real-world.ipynb +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/sites/faq.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/sites/installation.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/sites/quickstart.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/docs/sites/versioning.rst +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/src/errdefs.rs +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/src/lib.rs +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/src/regex_repr.rs +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_cast.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_collection_future_annotations.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_create_empty.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_filter_one_to_n.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_filter_validate.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_ignore_in_filter.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_implementation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_matches.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_optional_members.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_repr.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_sample.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/collection/test_validate_input.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/__init__.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_any.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_array.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_datetime.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_decimal.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_enum.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_float.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_integer.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_list.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_object.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_string.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/column_types/test_struct.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/__init__.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_alias.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_check.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_default_dtypes.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_matches.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_metadata.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_polars_schema.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_pyarrow.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_rules.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_sample.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_sql_schema.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_str.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/columns/test_utils.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/core_validation/__init__.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/core_validation/test_column_validation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/core_validation/test_dtype_validation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/core_validation/test_rule_evaluation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/functional/test_concat.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/functional/test_relationships.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_cast.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_create_empty.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_create_empty_if_none.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_filter.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_inheritance.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_matches.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_repr.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_rule_implementation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_serialization.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/schema/test_validate.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/test_compat.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/test_config.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/test_deprecation.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/test_exc.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/test_extre.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/test_random.py +0 -0
- {dataframely-1.6.0 → dataframely-1.7.1}/tests/test_typing.py +0 -0
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
with:
|
|
18
18
|
fetch-depth: 0
|
|
19
19
|
- name: Set up pixi
|
|
20
|
-
uses: prefix-dev/setup-pixi@
|
|
20
|
+
uses: prefix-dev/setup-pixi@14c8aabd75893f83f4ab30c03e7cf853c8208961 # v0.8.10
|
|
21
21
|
with:
|
|
22
22
|
environments: build
|
|
23
23
|
- name: Set version
|
|
@@ -52,13 +52,13 @@ jobs:
|
|
|
52
52
|
with:
|
|
53
53
|
fetch-depth: 0
|
|
54
54
|
- name: Set up pixi
|
|
55
|
-
uses: prefix-dev/setup-pixi@
|
|
55
|
+
uses: prefix-dev/setup-pixi@14c8aabd75893f83f4ab30c03e7cf853c8208961 # v0.8.10
|
|
56
56
|
with:
|
|
57
57
|
environments: build
|
|
58
58
|
- name: Set version
|
|
59
59
|
run: pixi run -e build set-version
|
|
60
60
|
- name: Build wheel
|
|
61
|
-
uses: PyO3/maturin-action@
|
|
61
|
+
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
|
62
62
|
with:
|
|
63
63
|
command: build
|
|
64
64
|
args: --out dist -i python3.11
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
GITHUB_TOKEN: ${{ github.token }}
|
|
29
29
|
- name: Post comment about invalid PR title
|
|
30
30
|
if: failure()
|
|
31
|
-
uses: marocchino/sticky-pull-request-comment@
|
|
31
|
+
uses: marocchino/sticky-pull-request-comment@d2ad0de260ae8b0235ce059e63f2949ba9e05943 # v2.9.3
|
|
32
32
|
with:
|
|
33
33
|
header: conventional-commit-pr-title
|
|
34
34
|
message: |
|
|
@@ -45,7 +45,7 @@ jobs:
|
|
|
45
45
|
</details>
|
|
46
46
|
- name: Delete comment about invalid PR title
|
|
47
47
|
if: success()
|
|
48
|
-
uses: marocchino/sticky-pull-request-comment@
|
|
48
|
+
uses: marocchino/sticky-pull-request-comment@d2ad0de260ae8b0235ce059e63f2949ba9e05943 # v2.9.3
|
|
49
49
|
with:
|
|
50
50
|
header: conventional-commit-pr-title
|
|
51
51
|
delete: true
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
# needed for 'pre-commit-mirrors-insert-license'
|
|
25
25
|
fetch-depth: 0
|
|
26
26
|
- name: Set up pixi
|
|
27
|
-
uses: prefix-dev/setup-pixi@
|
|
27
|
+
uses: prefix-dev/setup-pixi@14c8aabd75893f83f4ab30c03e7cf853c8208961 # v0.8.10
|
|
28
28
|
with:
|
|
29
29
|
environments: default lint
|
|
30
30
|
- name: Install repository
|
|
@@ -45,7 +45,7 @@ jobs:
|
|
|
45
45
|
- name: Checkout branch
|
|
46
46
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
47
47
|
- name: Set up pixi
|
|
48
|
-
uses: prefix-dev/setup-pixi@
|
|
48
|
+
uses: prefix-dev/setup-pixi@14c8aabd75893f83f4ab30c03e7cf853c8208961 # v0.8.10
|
|
49
49
|
with:
|
|
50
50
|
environments: ${{ matrix.environment }}
|
|
51
51
|
- name: Install repository
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Nightly CI
|
|
2
|
+
on:
|
|
3
|
+
schedule:
|
|
4
|
+
- cron: "0 0 * * *" # Runs every day at midnight UTC
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
# Automatically stop old builds on the same branch/PR
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
unit-tests:
|
|
17
|
+
name: Unit Tests (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Windows' }})
|
|
18
|
+
timeout-minutes: 30
|
|
19
|
+
runs-on: ${{ matrix.os }}
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: true
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, windows-latest]
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout branch
|
|
26
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
27
|
+
- name: Set up pixi
|
|
28
|
+
uses: prefix-dev/setup-pixi@14c8aabd75893f83f4ab30c03e7cf853c8208961 # v0.8.10
|
|
29
|
+
with:
|
|
30
|
+
environments: nightly
|
|
31
|
+
- name: Install polars nightly
|
|
32
|
+
run: pixi run -e nightly install-polars-nightly
|
|
33
|
+
- name: Install repository
|
|
34
|
+
run: pixi run -e nightly postinstall
|
|
35
|
+
- name: Run pytest
|
|
36
|
+
run: pixi run -e nightly test-coverage --color=yes
|
|
@@ -74,6 +74,6 @@ jobs:
|
|
|
74
74
|
# Upload the results to GitHub's code scanning dashboard (optional).
|
|
75
75
|
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
|
76
76
|
- name: "Upload to code-scanning"
|
|
77
|
-
uses: github/codeql-action/upload-sarif@
|
|
77
|
+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
|
78
78
|
with:
|
|
79
79
|
sarif_file: results.sarif
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dataframely
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.1
|
|
4
4
|
Classifier: Programming Language :: Python :: 3
|
|
5
5
|
Classifier: Programming Language :: Python :: 3.11
|
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -25,6 +25,7 @@ Project-URL: Repository, https://github.com/quantco/dataframely
|
|
|
25
25
|
</h3>
|
|
26
26
|
|
|
27
27
|
[](https://github.com/quantco/dataframely/actions/workflows/ci.yml)
|
|
28
|
+
[](https://github.com/quantco/dataframely/actions/workflows/nightly.yml)
|
|
28
29
|
[](https://prefix.dev/channels/conda-forge/packages/dataframely)
|
|
29
30
|
[](https://pypi.org/project/dataframely)
|
|
30
31
|
[](https://pypi.org/project/dataframely)
|
|
@@ -68,7 +69,7 @@ class HouseSchema(dy.Schema):
|
|
|
68
69
|
price = dy.Float64(nullable=False)
|
|
69
70
|
|
|
70
71
|
@dy.rule()
|
|
71
|
-
def
|
|
72
|
+
def reasonable_bathroom_to_bedroom_ratio() -> pl.Expr:
|
|
72
73
|
ratio = pl.col("num_bathrooms") / pl.col("num_bedrooms")
|
|
73
74
|
return (ratio >= 1 / 3) & (ratio <= 3)
|
|
74
75
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
</h3>
|
|
9
9
|
|
|
10
10
|
[](https://github.com/quantco/dataframely/actions/workflows/ci.yml)
|
|
11
|
+
[](https://github.com/quantco/dataframely/actions/workflows/nightly.yml)
|
|
11
12
|
[](https://prefix.dev/channels/conda-forge/packages/dataframely)
|
|
12
13
|
[](https://pypi.org/project/dataframely)
|
|
13
14
|
[](https://pypi.org/project/dataframely)
|
|
@@ -51,7 +52,7 @@ class HouseSchema(dy.Schema):
|
|
|
51
52
|
price = dy.Float64(nullable=False)
|
|
52
53
|
|
|
53
54
|
@dy.rule()
|
|
54
|
-
def
|
|
55
|
+
def reasonable_bathroom_to_bedroom_ratio() -> pl.Expr:
|
|
55
56
|
ratio = pl.col("num_bathrooms") / pl.col("num_bedrooms")
|
|
56
57
|
return (ratio >= 1 / 3) & (ratio <= 3)
|
|
57
58
|
|
|
@@ -15,7 +15,7 @@ from ._base_collection import CollectionMember
|
|
|
15
15
|
from ._filter import filter
|
|
16
16
|
from ._rule import rule
|
|
17
17
|
from ._typing import DataFrame, LazyFrame
|
|
18
|
-
from .collection import Collection
|
|
18
|
+
from .collection import Collection, deserialize_collection
|
|
19
19
|
from .columns import (
|
|
20
20
|
Any,
|
|
21
21
|
Array,
|
|
@@ -51,7 +51,7 @@ from .functional import (
|
|
|
51
51
|
filter_relationship_one_to_at_least_one,
|
|
52
52
|
filter_relationship_one_to_one,
|
|
53
53
|
)
|
|
54
|
-
from .schema import Schema, deserialize_schema
|
|
54
|
+
from .schema import Schema, deserialize_schema, read_parquet_metadata_schema
|
|
55
55
|
|
|
56
56
|
__all__ = [
|
|
57
57
|
"random",
|
|
@@ -61,6 +61,7 @@ __all__ = [
|
|
|
61
61
|
"LazyFrame",
|
|
62
62
|
"Collection",
|
|
63
63
|
"CollectionMember",
|
|
64
|
+
"deserialize_collection",
|
|
64
65
|
"Config",
|
|
65
66
|
"FailureInfo",
|
|
66
67
|
"concat_collection_members",
|
|
@@ -68,6 +69,7 @@ __all__ = [
|
|
|
68
69
|
"filter_relationship_one_to_one",
|
|
69
70
|
"Schema",
|
|
70
71
|
"deserialize_schema",
|
|
72
|
+
"read_parquet_metadata_schema",
|
|
71
73
|
"Any",
|
|
72
74
|
"Bool",
|
|
73
75
|
"Column",
|
|
@@ -171,7 +171,11 @@ class BaseSchema(metaclass=SchemaMeta):
|
|
|
171
171
|
@classmethod
|
|
172
172
|
def columns(cls) -> dict[str, Column]:
|
|
173
173
|
"""The column definitions of this schema."""
|
|
174
|
-
|
|
174
|
+
columns: dict[str, Column] = getattr(cls, _COLUMN_ATTR)
|
|
175
|
+
for name in columns.keys():
|
|
176
|
+
# Dynamically set the name of the columns.
|
|
177
|
+
columns[name]._name = name
|
|
178
|
+
return columns
|
|
175
179
|
|
|
176
180
|
@classmethod
|
|
177
181
|
def primary_keys(cls) -> list[str]:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Copyright (c) QuantCo 2025-2025
|
|
2
2
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
3
3
|
|
|
4
|
+
import base64
|
|
4
5
|
import datetime as dt
|
|
5
6
|
import decimal
|
|
6
7
|
from io import BytesIO
|
|
@@ -9,6 +10,20 @@ from typing import Any, cast
|
|
|
9
10
|
|
|
10
11
|
import polars as pl
|
|
11
12
|
|
|
13
|
+
SCHEMA_METADATA_KEY = "dataframely_schema"
|
|
14
|
+
SERIALIZATION_FORMAT_VERSION = "1"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def serialization_versions() -> dict[str, str]:
|
|
18
|
+
"""Return the versions of the serialization format and the libraries used."""
|
|
19
|
+
from dataframely import __version__
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"format": SERIALIZATION_FORMAT_VERSION,
|
|
23
|
+
"dataframely": __version__,
|
|
24
|
+
"polars": pl.__version__,
|
|
25
|
+
}
|
|
26
|
+
|
|
12
27
|
|
|
13
28
|
class SchemaJSONEncoder(JSONEncoder):
|
|
14
29
|
"""Custom JSON encoder to properly serialize all types serialized by schemas."""
|
|
@@ -32,6 +47,11 @@ class SchemaJSONEncoder(JSONEncoder):
|
|
|
32
47
|
"__type__": "expression",
|
|
33
48
|
"value": obj.meta.serialize(format="json"),
|
|
34
49
|
}
|
|
50
|
+
case pl.LazyFrame():
|
|
51
|
+
return {
|
|
52
|
+
"__type__": "lazyframe",
|
|
53
|
+
"value": base64.b64encode(obj.serialize()).decode("utf-8"),
|
|
54
|
+
}
|
|
35
55
|
case decimal.Decimal():
|
|
36
56
|
return {"__type__": "decimal", "value": str(obj)}
|
|
37
57
|
case dt.datetime():
|
|
@@ -68,6 +88,11 @@ class SchemaJSONDecoder(JSONDecoder):
|
|
|
68
88
|
case "expression":
|
|
69
89
|
data = BytesIO(cast(str, dct["value"]).encode("utf-8"))
|
|
70
90
|
return pl.Expr.deserialize(data, format="json")
|
|
91
|
+
case "lazyframe":
|
|
92
|
+
data = BytesIO(
|
|
93
|
+
base64.b64decode(cast(str, dct["value"]).encode("utf-8"))
|
|
94
|
+
)
|
|
95
|
+
return pl.LazyFrame.deserialize(data)
|
|
71
96
|
case "decimal":
|
|
72
97
|
return decimal.Decimal(dct["value"])
|
|
73
98
|
case "datetime":
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
6
|
from collections.abc import Callable
|
|
7
|
-
from typing import TYPE_CHECKING, Any, Concatenate, Generic, ParamSpec, TypeVar
|
|
7
|
+
from typing import TYPE_CHECKING, Any, Concatenate, Generic, Literal, ParamSpec, TypeVar
|
|
8
8
|
|
|
9
9
|
import polars as pl
|
|
10
10
|
|
|
@@ -15,6 +15,8 @@ S = TypeVar("S", bound=BaseSchema, covariant=True)
|
|
|
15
15
|
P = ParamSpec("P")
|
|
16
16
|
R = TypeVar("R")
|
|
17
17
|
|
|
18
|
+
Validation = Literal["allow", "forbid", "warn", "skip"]
|
|
19
|
+
|
|
18
20
|
|
|
19
21
|
def inherit_signature( # pragma: no cover
|
|
20
22
|
target_fn: Callable[P, Any],
|