patito 0.8.4__tar.gz → 0.8.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {patito-0.8.4 → patito-0.8.5}/PKG-INFO +2 -2
- {patito-0.8.4 → patito-0.8.5}/pyproject.toml +2 -2
- {patito-0.8.4 → patito-0.8.5}/src/patito/polars.py +3 -4
- {patito-0.8.4 → patito-0.8.5}/uv.lock +13 -13
- {patito-0.8.4 → patito-0.8.5}/.github/workflows/ci.yml +0 -0
- {patito-0.8.4 → patito-0.8.5}/.github/workflows/coverage.yml +0 -0
- {patito-0.8.4 → patito-0.8.5}/.github/workflows/pre-commit.yml +0 -0
- {patito-0.8.4 → patito-0.8.5}/.github/workflows/release.yml +0 -0
- {patito-0.8.4 → patito-0.8.5}/.gitignore +0 -0
- {patito-0.8.4 → patito-0.8.5}/.pre-commit-config.yaml +0 -0
- {patito-0.8.4 → patito-0.8.5}/.readthedocs.yaml +0 -0
- {patito-0.8.4 → patito-0.8.5}/.tool-versions +0 -0
- {patito-0.8.4 → patito-0.8.5}/LICENSE +0 -0
- {patito-0.8.4 → patito-0.8.5}/README.md +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/_static/css/custom.css +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/index.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/cast.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/derive.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/drop.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/fill_null.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/get.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/index.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/iter_models.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/read_csv.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/set_model.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/DataFrame/validate.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Field/index.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/DataFrame.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/LazyFrame.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/columns.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/defaults.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/drop.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/dtypes.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/example.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/example_value.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/examples.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/from_row.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/index.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/iter_models.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/join.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/non_nullable_columns.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/nullable_columns.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/pandas_examples.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/prefix.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/rename.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/select.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/suffix.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/unique_columns.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/valid_dtypes.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/validate.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/api/patito/Model/with_fields.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/conf.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/fix_header_underline.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/index.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/license.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/tutorial/dataframe-validation.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/docs/tutorial/index.rst +0 -0
- {patito-0.8.4 → patito-0.8.5}/noxfile.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/__init__.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_docs.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_pydantic/__init__.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_pydantic/column_info.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_pydantic/dtypes/__init__.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_pydantic/dtypes/dtypes.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_pydantic/dtypes/utils.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_pydantic/repr.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/_pydantic/schema.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/exceptions.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/pydantic.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/src/patito/validators.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/tests/__init__.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/tests/examples.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/tests/test_dtypes.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/tests/test_dummy_data.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/tests/test_model.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/tests/test_polars.py +0 -0
- {patito-0.8.4 → patito-0.8.5}/tests/test_validators.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patito
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.5
|
|
4
4
|
Summary: A dataframe modelling library built on top of polars and pydantic.
|
|
5
5
|
Project-URL: Homepage, https://github.com/JakobGM/patito
|
|
6
6
|
Project-URL: Repository, https://github.com/JakobGM/patito
|
|
@@ -10,7 +10,7 @@ License-Expression: MIT
|
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Keywords: dataframe,validation
|
|
12
12
|
Requires-Python: >=3.9
|
|
13
|
-
Requires-Dist: polars>=1.
|
|
13
|
+
Requires-Dist: polars>=1.32.0
|
|
14
14
|
Requires-Dist: pydantic>=2.7.0
|
|
15
15
|
Requires-Dist: typing-extensions
|
|
16
16
|
Provides-Extra: caching
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "patito"
|
|
3
|
-
version = "0.8.
|
|
3
|
+
version = "0.8.5"
|
|
4
4
|
description = "A dataframe modelling library built on top of polars and pydantic."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Jakob Gerhard Martinussen", email = "jakobgm@gmail.com" },
|
|
@@ -15,7 +15,7 @@ keywords = [
|
|
|
15
15
|
]
|
|
16
16
|
dependencies = [
|
|
17
17
|
"pydantic>=2.7.0",
|
|
18
|
-
"polars>=1.
|
|
18
|
+
"polars>=1.32.0",
|
|
19
19
|
"typing-extensions",
|
|
20
20
|
]
|
|
21
21
|
|
|
@@ -443,7 +443,7 @@ class DataFrame(pl.DataFrame, Generic[ModelType]):
|
|
|
443
443
|
>>> casted_classes.validate()
|
|
444
444
|
|
|
445
445
|
"""
|
|
446
|
-
return model.DataFrame(self._df)
|
|
446
|
+
return model.DataFrame._from_pydf(self._df)
|
|
447
447
|
|
|
448
448
|
def unalias(self: DF) -> DF:
|
|
449
449
|
"""Un-aliases column names using information from pydantic validation_alias.
|
|
@@ -537,9 +537,8 @@ class DataFrame(pl.DataFrame, Generic[ModelType]):
|
|
|
537
537
|
|
|
538
538
|
"""
|
|
539
539
|
if columns is not None:
|
|
540
|
-
#
|
|
541
|
-
|
|
542
|
-
return self._from_pydf(pl.DataFrame(self._df).drop(columns)._df)
|
|
540
|
+
# Use super() to call polars DataFrame drop method directly
|
|
541
|
+
return self._from_pydf(super().drop(columns)._df)
|
|
543
542
|
else:
|
|
544
543
|
return self.drop(list(set(self.columns) - set(self.model.columns)))
|
|
545
544
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 3
|
|
3
3
|
requires-python = ">=3.9"
|
|
4
4
|
resolution-markers = [
|
|
5
5
|
"python_full_version >= '3.13'",
|
|
@@ -1518,7 +1518,7 @@ wheels = [
|
|
|
1518
1518
|
|
|
1519
1519
|
[[package]]
|
|
1520
1520
|
name = "patito"
|
|
1521
|
-
version = "0.8.
|
|
1521
|
+
version = "0.8.5"
|
|
1522
1522
|
source = { editable = "." }
|
|
1523
1523
|
dependencies = [
|
|
1524
1524
|
{ name = "polars" },
|
|
@@ -1550,7 +1550,7 @@ dev = [
|
|
|
1550
1550
|
{ name = "pyright" },
|
|
1551
1551
|
{ name = "pytest" },
|
|
1552
1552
|
{ name = "pytest-cov" },
|
|
1553
|
-
{ name = "pytest-watcher", marker = "python_full_version < '4
|
|
1553
|
+
{ name = "pytest-watcher", marker = "python_full_version < '4'" },
|
|
1554
1554
|
{ name = "ruff" },
|
|
1555
1555
|
{ name = "sphinx" },
|
|
1556
1556
|
{ name = "types-setuptools" },
|
|
@@ -1568,7 +1568,7 @@ docs = [
|
|
|
1568
1568
|
[package.metadata]
|
|
1569
1569
|
requires-dist = [
|
|
1570
1570
|
{ name = "pandas", marker = "extra == 'pandas'" },
|
|
1571
|
-
{ name = "polars", specifier = ">=1.
|
|
1571
|
+
{ name = "polars", specifier = ">=1.32.0" },
|
|
1572
1572
|
{ name = "pyarrow", marker = "extra == 'caching'", specifier = ">=5.0.0" },
|
|
1573
1573
|
{ name = "pydantic", specifier = ">=2.7.0" },
|
|
1574
1574
|
{ name = "typing-extensions" },
|
|
@@ -1589,7 +1589,7 @@ dev = [
|
|
|
1589
1589
|
{ name = "pyright", specifier = ">=1.1.239" },
|
|
1590
1590
|
{ name = "pytest", specifier = ">=7.1.2" },
|
|
1591
1591
|
{ name = "pytest-cov", specifier = ">=3.0.0" },
|
|
1592
|
-
{ name = "pytest-watcher", marker = "python_full_version >= '3.9' and python_full_version < '4
|
|
1592
|
+
{ name = "pytest-watcher", marker = "python_full_version >= '3.9' and python_full_version < '4'", specifier = ">=0.2.3" },
|
|
1593
1593
|
{ name = "ruff", specifier = ">=0.2.1" },
|
|
1594
1594
|
{ name = "sphinx", specifier = "<7" },
|
|
1595
1595
|
{ name = "types-setuptools", specifier = ">=57.4.14" },
|
|
@@ -1636,16 +1636,16 @@ wheels = [
|
|
|
1636
1636
|
|
|
1637
1637
|
[[package]]
|
|
1638
1638
|
name = "polars"
|
|
1639
|
-
version = "1.
|
|
1639
|
+
version = "1.32.0"
|
|
1640
1640
|
source = { registry = "https://pypi.org/simple" }
|
|
1641
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1641
|
+
sdist = { url = "https://files.pythonhosted.org/packages/67/23/6a5f151981f3ac409bed6dc48a3eaecd0592a03eb382693d4c7e749eda8b/polars-1.32.0.tar.gz", hash = "sha256:b01045981c0f23eeccfbfc870b782f93e73b74b29212fdfc8aae0be9024bc1fb", size = 4761045, upload-time = "2025-08-01T01:43:22.413Z" }
|
|
1642
1642
|
wheels = [
|
|
1643
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1644
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1645
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1646
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1647
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1648
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1643
|
+
{ url = "https://files.pythonhosted.org/packages/e2/40/5b27067d10b5a77ab4094932118e16629ffb20ea9ae5f7d1178e04087891/polars-1.32.0-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:94f7c6a3b30bc99bc6b682ea42bb1ae983e33a302ca21aacbac50ae19e34fcf2", size = 37479518, upload-time = "2025-08-01T01:42:18.603Z" },
|
|
1644
|
+
{ url = "https://files.pythonhosted.org/packages/08/b7/ca28ac10d340fb91bffb2751efd52aebc9799ae161b867214c6299c8f75b/polars-1.32.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8bf14c16164839e62c741a863942a94a9a463db21e797452fca996c8afaf8827", size = 34214196, upload-time = "2025-08-01T01:42:22.667Z" },
|
|
1645
|
+
{ url = "https://files.pythonhosted.org/packages/61/97/fe3797e8e1d4f9eadab32ffe218a841b8874585b6c9bd0f1a26469fb2992/polars-1.32.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4c15adb97d44766d30c759f5cebbdb64d361e8349ef10b5afc7413f71bf4b72", size = 37985353, upload-time = "2025-08-01T01:42:26.033Z" },
|
|
1646
|
+
{ url = "https://files.pythonhosted.org/packages/a0/7e/2baa2858556e970cc6a35c0d8ad34b2f9d982f1766c0a1fec20ca529a947/polars-1.32.0-cp39-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:13af55890734f89b76016a395fb2e7460e7d9feecf50ed2f55cf0f05a1c0c991", size = 35183912, upload-time = "2025-08-01T01:42:30.446Z" },
|
|
1647
|
+
{ url = "https://files.pythonhosted.org/packages/ef/41/0e6821dccc5871186a9b95af3990404aa283318263918d33ac974b35cb37/polars-1.32.0-cp39-abi3-win_amd64.whl", hash = "sha256:0397fc2501a5d5f1bb3fe8d27e0c26c7a5349b4110157c0fb7833cd3f5921c9e", size = 37747905, upload-time = "2025-08-01T01:42:33.975Z" },
|
|
1648
|
+
{ url = "https://files.pythonhosted.org/packages/c2/93/d06df0817da93f922a67e27e9e0f407856991374daa62687e2a45a18935c/polars-1.32.0-cp39-abi3-win_arm64.whl", hash = "sha256:dd84e24422509e1ec9be46f67f758d0bd9944d1ae4eacecee4f53adaa8ecd822", size = 33978543, upload-time = "2025-08-01T01:42:36.779Z" },
|
|
1649
1649
|
]
|
|
1650
1650
|
|
|
1651
1651
|
[[package]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|