Name | cuallee JSON |
Version |
0.15.2
JSON |
| download |
home_page | None |
Summary | Python library for data validation on DataFrame APIs including Snowflake/Snowpark, Apache/PySpark and Pandas/DataFrame. |
upload_time | 2024-12-14 09:13:25 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# cuallee
[](https://badge.fury.io/py/cuallee)
[](https://github.com/canimus/cuallee/actions/workflows/ci.yml)
[](https://codecov.io/gh/canimus/cuallee)
[](https://pypi.org/project/cuallee/)
[](https://opensource.org/licenses/Apache-2.0)
[](https://joss.theoj.org/papers/db01d4f5a02a319fe2b4c49f68e3f859)
[](https://doi.org/10.5281/zenodo.12206787)
<div align="center">
<img src="https://raw.githubusercontent.com/canimus/cuallee/fbef98f5340279fc726b369a7ce879fd67ea1d1f/logos/cuallee.png" width="250px" style="padding: 60px 20px" align="right"/>
</div>
Meaning `good` in Aztec ([Nahuatl](https://nahuatl.wired-humanities.org/content/cualli-0)), _pronounced: QUAL-E_
This library provides an intuitive `API` to describe data quality `checks` initially just for `PySpark` dataframes `v3.3.0`. And extended to `pandas`, `snowpark`, `duckdb`, `daft` and more.
It is a replacement written in pure `python` of the `pydeequ` framework.
I gave up in _deequ_ as after extensive use, the API is not user-friendly, the Python Callback servers produce additional costs in our compute clusters, and the lack of support to the newest version of PySpark.
As result `cuallee` was born
This implementation goes in hand with the latest API from PySpark and uses the `Observation` API to collect metrics
at the lower cost of computation.
When benchmarking against pydeequ, `cuallee` uses circa <3k java classes underneath and **remarkably** less memory.
## Support
`cuallee` is the data quality framework truly dataframe agnostic.
Provider | API | Versions
------- | ----------- | ------
| `snowpark` | `1.11.1`, `1.4.0`
| `pyspark` & `spark-connect` |`3.5.x`, `3.4.0`, `3.3.x`, `3.2.x`
| `bigquery` | `3.4.1`
| `pandas`| `2.0.2`, `1.5.x`, `1.4.x`
|`duckdb` | `1.0.0`, ~~`0.10.2`~~,~~`0.9.2`~~,~~`0.8.0`~~
|`polars`| `1.0.0`, ~~`0.19.6`~~
|`daft`| `0.2.24`, ~~`0.2.19`~~
<sub>Logos are trademarks of their own brands.</sub>
## Install
```bash
pip install cuallee
```
## Checks
The most common checks for data integrity validations are `completeness` and `uniqueness` an example of this dimensions shown below:
```python
from cuallee import Check, CheckLevel # WARN:0, ERR: 1
# Nulls on column Id
check = Check(CheckLevel.WARNING, "Completeness")
(
check
.is_complete("id")
.is_unique("id")
.validate(df)
).show() # Returns a pyspark.sql.DataFrame
```
>[!IMPORTANT]
> A new version of the `validate` output is currently under construction.
### Dates
Perhaps one of the most useful features of `cuallee` is its extensive number of checks for `Date` and `Timestamp` values. Including, validation of ranges, set operations like inclusion, or even a verification that confirms `continuity on dates` using the `is_daily` check function.
```python
# Unique values on id
check = Check(CheckLevel.WARNING, "CheckIsBetweenDates")
df = spark.sql(
"""
SELECT
explode(
sequence(
to_date('2022-01-01'),
to_date('2022-01-10'),
interval 1 day)) as date
""")
assert (
check.is_between("date", ("2022-01-01", "2022-01-10"))
.validate(df)
.first()
.status == "PASS"
)
```
### Membership
Other common test is the validation of `list of values` as part of the multiple integrity checks required for better quality data.
```python
df = spark.createDataFrame([[1, 10], [2, 15], [3, 17]], ["ID", "value"])
check = Check(CheckLevel.WARNING, "is_contained_in_number_test")
check.is_contained_in("value", (10, 15, 20, 25)).validate(df)
```
### Regular Expressions
When it comes to the flexibility of matching, regular expressions are always to the rescue. `cuallee` makes use of the regular expressions to validate that fields of type `String` conform to specific patterns.
```python
df = spark.createDataFrame([[1, "is_blue"], [2, "has_hat"], [3, "is_smart"]], ["ID", "desc"])
check = Check(CheckLevel.WARNING, "has_pattern_test")
check.has_pattern("desc", r"^is.*t$") # only match is_smart 33% of rows.
check.validate(df).first().status == "FAIL"
```
### Anomalies
Statistical tests are a great aid for verifying anomalies on data. Here an example that shows that will `PASS` only when `40%` of data is inside the interquartile range
```python
df = spark.range(10)
check = Check(CheckLevel.WARNING, "IQR_Test")
check.is_inside_interquartile_range("id", pct=0.4)
check.validate(df).first().status == "PASS"
+---+-------------------+-----+-------+------+-----------------------------+-----+----+----------+---------+--------------+------+
|id |timestamp |check|level |column|rule |value|rows|violations|pass_rate|pass_threshold|status|
+---+-------------------+-----+-------+------+-----------------------------+-----+----+----------+---------+--------------+------+
|1 |2022-10-19 00:09:39|IQR |WARNING|id |is_inside_interquartile_range|10000|10 |4 |0.6 |0.4 |PASS |
+---+-------------------+-----+-------+------+-----------------------------+-----+----+----------+---------+--------------+------+
```
### Workflows (Process Mining)
Besides the common `citizen-like` checks, `cuallee` offers out-of-the-box real-life checks. For example, suppose that you are working __SalesForce__ or __SAP__ environment. Very likely your business processes will be driven by a lifecycle:
- `Order-To-Cash`
- `Request-To-Pay`
- `Inventory-Logistics-Delivery`
- Others.
In this scenario, `cuallee` offers the ability that the sequence of events registered over time, are according to a sequence of events, like the example below:
```python
import pyspark.sql.functions as F
from cuallee import Check, CheckLevel
data = pd.DataFrame({
"name":["herminio", "herminio", "virginie", "virginie"],
"event":["new","active", "new", "active"],
"date": ["2022-01-01", "2022-01-02", "2022-01-03", "2022-02-04"]}
)
df = spark.createDataFrame(data).withColumn("date", F.to_date("date"))
# Cuallee Process Mining
# Testing that all edges on workflows
check = Check(CheckLevel.WARNING, "WorkflowViolations")
# Validate that 50% of data goes from new => active
check.has_workflow("name", "event", "date", [("new", "active")], pct=0.5)
check.validate(df).show(truncate=False)
+---+-------------------+------------------+-------+-------------------------+------------+--------------------+----+----------+---------+--------------+------+
|id |timestamp |check |level |column |rule |value |rows|violations|pass_rate|pass_threshold|status|
+---+-------------------+------------------+-------+-------------------------+------------+--------------------+----+----------+---------+--------------+------+
|1 |2022-11-07 23:08:50|WorkflowViolations|WARNING|('name', 'event', 'date')|has_workflow|(('new', 'active'),)|4 |2.0 |0.5 |0.5 |PASS |
+---+-------------------+------------------+-------+-------------------------+------------+--------------------+----+----------+---------+--------------+------+
```
### Assertions
`[2024-09-28]` ✨ __New feature!__ Return a simple `true|false` as a unified result for your `check`
```python
import pandas as pd
from cuallee import Check
df = pd.DataFrame({"X":[1,2,3]})
# .ok(dataframe) method of a check will call validate and then verify that all rules are PASS
assert Check().is_complete("X").ok(df)
```
### Controls
Simplify the entire validation of a dataframe in a particular dimension.
```python
import pandas as pd
from cuallee import Control
df = pd.DataFrame({"X":[1,2,3], "Y": [10,20,30]})
# Checks all columns in dataframe for using is_complete check
Control.completeness(df)
```
### `cuallee` __VS__ `pydeequ`
In the `test` folder there are `docker` containers with the requirements to match the tests. Also a `perftest.py` available at the root folder for interests.
```
# 1000 rules / # of seconds
cuallee: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 162.00
pydeequ: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 322.00
```
## Catalogue
Check | Description | DataType
------- | ----------- | ----
`is_complete` | Zero `nulls` | _agnostic_
`is_unique` | Zero `duplicates` | _agnostic_
`is_primary_key` | Zero `duplicates` | _agnostic_
`are_complete` | Zero `nulls` on group of columns | _agnostic_
`are_unique` | Composite primary key check | _agnostic_
`is_composite_key` | Zero duplicates on multiple columns | _agnostic_
`is_greater_than` | `col > x` | _numeric_
`is_positive` | `col > 0` | _numeric_
`is_negative` | `col < 0` | _numeric_
`is_greater_or_equal_than` | `col >= x` | _numeric_
`is_less_than` | `col < x` | _numeric_
`is_less_or_equal_than` | `col <= x` | _numeric_
`is_equal_than` | `col == x` | _numeric_
`is_contained_in` | `col in [a, b, c, ...]` | _agnostic_
`is_in` | Alias of `is_contained_in` | _agnostic_
`not_contained_in` | `col not in [a, b, c, ...]` | _agnostic_
`not_in` | Alias of `not_contained_in` | _agnostic_
`is_between` | `a <= col <= b` | _numeric, date_
`has_pattern` | Matching a pattern defined as a `regex` | _string_
`is_legit` | String not null & not empty `^\S$` | _string_
`has_min` | `min(col) == x` | _numeric_
`has_max` | `max(col) == x` | _numeric_
`has_std` | `σ(col) == x` | _numeric_
`has_mean` | `μ(col) == x` | _numeric_
`has_sum` | `Σ(col) == x` | _numeric_
`has_percentile` | `%(col) == x` | _numeric_
`has_cardinality` | `count(distinct(col)) == x` | _agnostic_
`has_infogain` | `count(distinct(col)) > 1` | _agnostic_
`has_max_by` | A utilitary predicate for `max(col_a) == x for max(col_b)` | _agnostic_
`has_min_by` | A utilitary predicate for `min(col_a) == x for min(col_b)` | _agnostic_
`has_correlation` | Finds correlation between `0..1` on `corr(col_a, col_b)` | _numeric_
`has_entropy` | Calculates the entropy of a column `entropy(col) == x` for classification problems | _numeric_
`is_inside_interquartile_range` | Verifies column values reside inside limits of interquartile range `Q1 <= col <= Q3` used on anomalies. | _numeric_
`is_in_millions` | `col >= 1e6` | _numeric_
`is_in_billions` | `col >= 1e9` | _numeric_
`is_t_minus_1` | For date fields confirms 1 day ago `t-1` | _date_
`is_t_minus_2` | For date fields confirms 2 days ago `t-2` | _date_
`is_t_minus_3` | For date fields confirms 3 days ago `t-3` | _date_
`is_t_minus_n` | For date fields confirms n days ago `t-n` | _date_
`is_today` | For date fields confirms day is current date `t-0` | _date_
`is_yesterday` | For date fields confirms 1 day ago `t-1` | _date_
`is_on_weekday` | For date fields confirms day is between `Mon-Fri` | _date_
`is_on_weekend` | For date fields confirms day is between `Sat-Sun` | _date_
`is_on_monday` | For date fields confirms day is `Mon` | _date_
`is_on_tuesday` | For date fields confirms day is `Tue` | _date_
`is_on_wednesday` | For date fields confirms day is `Wed` | _date_
`is_on_thursday` | For date fields confirms day is `Thu` | _date_
`is_on_friday` | For date fields confirms day is `Fri` | _date_
`is_on_saturday` | For date fields confirms day is `Sat` | _date_
`is_on_sunday` | For date fields confirms day is `Sun` | _date_
`is_on_schedule` | For date fields confirms time windows i.e. `9:00 - 17:00` | _timestamp_
`is_daily` | Can verify daily continuity on date fields by default. `[2,3,4,5,6]` which represents `Mon-Fri` in PySpark. However new schedules can be used for custom date continuity | _date_
`has_workflow` | Adjacency matrix validation on `3-column` graph, based on `group`, `event`, `order` columns. | _agnostic_
`is_custom` | User-defined custom `function` applied to dataframe for row-based validation. | _agnostic_
`satisfies` | An open `SQL expression` builder to construct custom checks | _agnostic_
`validate` | The ultimate transformation of a check with a `dataframe` input for validation | _agnostic_
## Controls `pyspark`
Check | Description | DataType
------- | ----------- | ----
`completeness` | Zero `nulls` | _agnostic_
`information` | Zero nulls `and` cardinality > 1 | _agnostic_
`intelligence` | Zero nulls, zero empty strings and cardinality > 1 | _agnostic_
`percentage_fill` | `% rows` not empty | _agnostic_
`percentage_empty` | `% rows` empty | _agnostic_
## ISO Standard
A new module has been incorporated in `cuallee==0.4.0` which allows the verification of International Standard Organization columns in data frames. Simply access the `check.iso` interface to add the set of checks as shown below.
Check | Description | DataType
------- | ----------- | ----
`iso_4217` | currency compliant `ccy` | _string_
`iso_3166` | country compliant `country` | _string_
```python
df = spark.createDataFrame([[1, "USD"], [2, "MXN"], [3, "CAD"], [4, "EUR"], [5, "CHF"]], ["id", "ccy"])
check = Check(CheckLevel.WARNING, "ISO Compliant")
check.iso.iso_4217("ccy")
check.validate(df).show()
+---+-------------------+-------------+-------+------+---------------+--------------------+----+----------+---------+--------------+------+
| id| timestamp| check| level|column| rule| value|rows|violations|pass_rate|pass_threshold|status|
+---+-------------------+-------------+-------+------+---------------+--------------------+----+----------+---------+--------------+------+
| 1|2023-05-14 18:28:02|ISO Compliant|WARNING| ccy|is_contained_in|{'BHD', 'CRC', 'M...| 5| 0.0| 1.0| 1.0| PASS|
+---+-------------------+-------------+-------+------+---------------+--------------------+----+----------+---------+--------------+------+
```
## Snowflake Connection
In order to establish a connection to your SnowFlake account `cuallee` relies in the following environment variables to be avaialble in your environment:
- `SF_ACCOUNT`
- `SF_USER`
- `SF_PASSWORD`
- `SF_ROLE`
- `SF_WAREHOUSE`
- `SF_DATABASE`
- `SF_SCHEMA`
## Spark Connect
Just add the environment variable `SPARK_REMOTE` to your remote session, then `cuallee` will connect using
```python
spark_connect = SparkSession.builder.remote(os.getenv("SPARK_REMOTE")).getOrCreate()
```
and convert all checks to `select` as opposed to `Observation` API compute instructions.
## Databricks Connection
By default `cuallee` will search for a SparkSession available in the `globals` so there is literally no need to ~~`SparkSession.builder`~~. When working in a local environment it will automatically search for an available session, or start one.
## DuckDB
For testing on `duckdb` simply pass your table name to your check _et voilà_
```python
import duckdb
conn = duckdb.connect(":memory:")
check = Check(CheckLevel.WARNING, "DuckDB", table_name="temp/taxi/*.parquet")
check.is_complete("VendorID")
check.is_complete("tpep_pickup_datetime")
check.validate(conn)
id timestamp check level column rule value rows violations pass_rate pass_threshold status
0 1 2022-10-31 23:15:06 test WARNING VendorID is_complete N/A 19817583 0.0 1.0 1.0 PASS
1 2 2022-10-31 23:15:06 test WARNING tpep_pickup_datetime is_complete N/A 19817583 0.0 1.0 1.0 PASS
```
## Roadmap
`100%` data frame agnostic implementation of data quality checks.
Define once, `run everywhere`
- ~~[x] PySpark 3.5.0~~
- ~~[x] PySpark 3.4.0~~
- ~~[x] PySpark 3.3.0~~
- ~~[x] PySpark 3.2.x~~
- ~~[x] Snowpark DataFrame~~
- ~~[x] Pandas DataFrame~~
- ~~[x] DuckDB Tables~~
- ~~[x] BigQuery Client~~
- ~~[x] Polars DataFrame~~
- ~~[*] Dagster Integration~~
- ~~[x] Spark Connect~~
- ~~[x] Daft~~
- [-] PDF Report
- [ ] Metadata check
- [ ] Help us in a discussion?
Whilst expanding the functionality feels a bit as an overkill because you most likely can connect `spark` via its drivers to whatever `DBMS` of your choice.
In the desire to make it even more `user-friendly` we are aiming to make `cuallee` portable to all the providers above.
## Authors
- [canimus](https://github.com/canimus) / Herminio Vazquez / 🇲🇽
- [vestalisvirginis](https://github.com/vestalisvirginis) / Virginie Grosboillot / 🇫🇷
## Contributors
<a href="https://github.com/canimus/cuallee/graphs/contributors">
<img src="https://contrib.rocks/image?repo=canimus/cuallee" />
</a>
### Guidelines
- [Contributing to cuallee](CONTRIBUTING.md)
## Documentation
- [https://canimus.github.io/cuallee/](https://canimus.github.io/cuallee/)
## Paper
`cuallee` has been published in the Journal of Open Source Software
```
Vazquez et al., (2024). cuallee: A Python package for data quality checks across multiple DataFrame APIs. Journal of Open Source Software, 9(98), 6684, https://doi.org/10.21105/joss.06684
```
If you use `cuallee` please consider citing this work. [Citation](CITATION.cff)
## License
Apache License 2.0
Free for commercial use, modification, distribution, patent use, private use.
Just preserve the copyright and license.
> Made with ❤️ in Utrecht 🇳🇱<br/>
> Maintained over ⌛ from Ljubljana 🇸🇮<br/>
> Extended 🚀 by contributions all over the 🌎
Raw data
{
"_id": null,
"home_page": null,
"name": "cuallee",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Herminio Vazquez <canimus@gmail.com>, Virginie Grosboillot <vestalisvirginis@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e5/6a/7a0be28bc8ae86333a3b311140d72d8ac472b7071df76c2db8f8da2dfd1d/cuallee-0.15.2.tar.gz",
"platform": null,
"description": "# cuallee\n\n[](https://badge.fury.io/py/cuallee)\n[](https://github.com/canimus/cuallee/actions/workflows/ci.yml)\n[](https://codecov.io/gh/canimus/cuallee)\n[](https://pypi.org/project/cuallee/)\n[](https://opensource.org/licenses/Apache-2.0)\n[](https://joss.theoj.org/papers/db01d4f5a02a319fe2b4c49f68e3f859)\n[](https://doi.org/10.5281/zenodo.12206787)\n\n<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/canimus/cuallee/fbef98f5340279fc726b369a7ce879fd67ea1d1f/logos/cuallee.png\" width=\"250px\" style=\"padding: 60px 20px\" align=\"right\"/>\n</div>\n\nMeaning `good` in Aztec ([Nahuatl](https://nahuatl.wired-humanities.org/content/cualli-0)), _pronounced: QUAL-E_\n\nThis library provides an intuitive `API` to describe data quality `checks` initially just for `PySpark` dataframes `v3.3.0`. And extended to `pandas`, `snowpark`, `duckdb`, `daft` and more.\nIt is a replacement written in pure `python` of the `pydeequ` framework.\n\nI gave up in _deequ_ as after extensive use, the API is not user-friendly, the Python Callback servers produce additional costs in our compute clusters, and the lack of support to the newest version of PySpark.\n\nAs result `cuallee` was born\n\nThis implementation goes in hand with the latest API from PySpark and uses the `Observation` API to collect metrics\nat the lower cost of computation.\nWhen benchmarking against pydeequ, `cuallee` uses circa <3k java classes underneath and **remarkably** less memory.\n\n## Support\n\n`cuallee` is the data quality framework truly dataframe agnostic.\n\nProvider | API | Versions\n ------- | ----------- | ------\n| `snowpark` | `1.11.1`, `1.4.0`\n| `pyspark` & `spark-connect` |`3.5.x`, `3.4.0`, `3.3.x`, `3.2.x`\n| `bigquery` | `3.4.1`\n| `pandas`| `2.0.2`, `1.5.x`, `1.4.x`\n|`duckdb` | `1.0.0`, ~~`0.10.2`~~,~~`0.9.2`~~,~~`0.8.0`~~\n|`polars`| `1.0.0`, ~~`0.19.6`~~\n|`daft`| `0.2.24`, ~~`0.2.19`~~\n\n <sub>Logos are trademarks of their own brands.</sub>\n\n\n## Install\n```bash\npip install cuallee\n```\n\n## Checks\n\nThe most common checks for data integrity validations are `completeness` and `uniqueness` an example of this dimensions shown below:\n\n```python\nfrom cuallee import Check, CheckLevel # WARN:0, ERR: 1\n\n# Nulls on column Id\ncheck = Check(CheckLevel.WARNING, \"Completeness\")\n(\n check\n .is_complete(\"id\")\n .is_unique(\"id\")\n .validate(df)\n).show() # Returns a pyspark.sql.DataFrame\n```\n\n>[!IMPORTANT]\n> A new version of the `validate` output is currently under construction.\n\n### Dates\n\nPerhaps one of the most useful features of `cuallee` is its extensive number of checks for `Date` and `Timestamp` values. Including, validation of ranges, set operations like inclusion, or even a verification that confirms `continuity on dates` using the `is_daily` check function.\n\n```python\n# Unique values on id\ncheck = Check(CheckLevel.WARNING, \"CheckIsBetweenDates\")\ndf = spark.sql(\n \"\"\"\n SELECT\n explode(\n sequence(\n to_date('2022-01-01'),\n to_date('2022-01-10'),\n interval 1 day)) as date\n \"\"\")\nassert (\n check.is_between(\"date\", (\"2022-01-01\", \"2022-01-10\"))\n .validate(df)\n .first()\n .status == \"PASS\"\n)\n```\n\n### Membership\n\nOther common test is the validation of `list of values` as part of the multiple integrity checks required for better quality data.\n\n```python\ndf = spark.createDataFrame([[1, 10], [2, 15], [3, 17]], [\"ID\", \"value\"])\ncheck = Check(CheckLevel.WARNING, \"is_contained_in_number_test\")\ncheck.is_contained_in(\"value\", (10, 15, 20, 25)).validate(df)\n```\n\n### Regular Expressions\n\nWhen it comes to the flexibility of matching, regular expressions are always to the rescue. `cuallee` makes use of the regular expressions to validate that fields of type `String` conform to specific patterns.\n\n```python\ndf = spark.createDataFrame([[1, \"is_blue\"], [2, \"has_hat\"], [3, \"is_smart\"]], [\"ID\", \"desc\"])\ncheck = Check(CheckLevel.WARNING, \"has_pattern_test\")\ncheck.has_pattern(\"desc\", r\"^is.*t$\") # only match is_smart 33% of rows.\ncheck.validate(df).first().status == \"FAIL\"\n```\n\n### Anomalies\n\nStatistical tests are a great aid for verifying anomalies on data. Here an example that shows that will `PASS` only when `40%` of data is inside the interquartile range\n\n```python\ndf = spark.range(10)\ncheck = Check(CheckLevel.WARNING, \"IQR_Test\")\ncheck.is_inside_interquartile_range(\"id\", pct=0.4)\ncheck.validate(df).first().status == \"PASS\"\n\n+---+-------------------+-----+-------+------+-----------------------------+-----+----+----------+---------+--------------+------+\n|id |timestamp |check|level |column|rule |value|rows|violations|pass_rate|pass_threshold|status|\n+---+-------------------+-----+-------+------+-----------------------------+-----+----+----------+---------+--------------+------+\n|1 |2022-10-19 00:09:39|IQR |WARNING|id |is_inside_interquartile_range|10000|10 |4 |0.6 |0.4 |PASS |\n+---+-------------------+-----+-------+------+-----------------------------+-----+----+----------+---------+--------------+------+\n```\n\n### Workflows (Process Mining)\nBesides the common `citizen-like` checks, `cuallee` offers out-of-the-box real-life checks. For example, suppose that you are working __SalesForce__ or __SAP__ environment. Very likely your business processes will be driven by a lifecycle:\n- `Order-To-Cash`\n- `Request-To-Pay`\n- `Inventory-Logistics-Delivery`\n- Others.\n In this scenario, `cuallee` offers the ability that the sequence of events registered over time, are according to a sequence of events, like the example below:\n\n ```python\nimport pyspark.sql.functions as F\nfrom cuallee import Check, CheckLevel\n\ndata = pd.DataFrame({\n \"name\":[\"herminio\", \"herminio\", \"virginie\", \"virginie\"],\n \"event\":[\"new\",\"active\", \"new\", \"active\"],\n \"date\": [\"2022-01-01\", \"2022-01-02\", \"2022-01-03\", \"2022-02-04\"]}\n )\ndf = spark.createDataFrame(data).withColumn(\"date\", F.to_date(\"date\"))\n\n# Cuallee Process Mining\n# Testing that all edges on workflows\ncheck = Check(CheckLevel.WARNING, \"WorkflowViolations\")\n\n# Validate that 50% of data goes from new => active\ncheck.has_workflow(\"name\", \"event\", \"date\", [(\"new\", \"active\")], pct=0.5)\ncheck.validate(df).show(truncate=False)\n\n+---+-------------------+------------------+-------+-------------------------+------------+--------------------+----+----------+---------+--------------+------+\n|id |timestamp |check |level |column |rule |value |rows|violations|pass_rate|pass_threshold|status|\n+---+-------------------+------------------+-------+-------------------------+------------+--------------------+----+----------+---------+--------------+------+\n|1 |2022-11-07 23:08:50|WorkflowViolations|WARNING|('name', 'event', 'date')|has_workflow|(('new', 'active'),)|4 |2.0 |0.5 |0.5 |PASS |\n+---+-------------------+------------------+-------+-------------------------+------------+--------------------+----+----------+---------+--------------+------+\n\n ```\n### Assertions\n`[2024-09-28]` \u2728 __New feature!__ Return a simple `true|false` as a unified result for your `check`\n```python\nimport pandas as pd\nfrom cuallee import Check\ndf = pd.DataFrame({\"X\":[1,2,3]})\n# .ok(dataframe) method of a check will call validate and then verify that all rules are PASS\nassert Check().is_complete(\"X\").ok(df)\n```\n\n\n### Controls\nSimplify the entire validation of a dataframe in a particular dimension.\n```python\nimport pandas as pd\nfrom cuallee import Control\ndf = pd.DataFrame({\"X\":[1,2,3], \"Y\": [10,20,30]})\n# Checks all columns in dataframe for using is_complete check\nControl.completeness(df)\n```\n\n### `cuallee` __VS__ `pydeequ`\nIn the `test` folder there are `docker` containers with the requirements to match the tests. Also a `perftest.py` available at the root folder for interests.\n\n```\n# 1000 rules / # of seconds\n\ncuallee: \u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587 162.00\npydeequ: \u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587 322.00\n```\n\n\n## Catalogue\n\nCheck | Description | DataType\n ------- | ----------- | ----\n`is_complete` | Zero `nulls` | _agnostic_\n`is_unique` | Zero `duplicates` | _agnostic_\n`is_primary_key` | Zero `duplicates` | _agnostic_\n`are_complete` | Zero `nulls` on group of columns | _agnostic_\n`are_unique` | Composite primary key check | _agnostic_\n`is_composite_key` | Zero duplicates on multiple columns | _agnostic_\n`is_greater_than` | `col > x` | _numeric_\n`is_positive` | `col > 0` | _numeric_\n`is_negative` | `col < 0` | _numeric_\n`is_greater_or_equal_than` | `col >= x` | _numeric_\n`is_less_than` | `col < x` | _numeric_\n`is_less_or_equal_than` | `col <= x` | _numeric_\n`is_equal_than` | `col == x` | _numeric_\n`is_contained_in` | `col in [a, b, c, ...]` | _agnostic_\n`is_in` | Alias of `is_contained_in` | _agnostic_\n`not_contained_in` | `col not in [a, b, c, ...]` | _agnostic_\n`not_in` | Alias of `not_contained_in` | _agnostic_\n`is_between` | `a <= col <= b` | _numeric, date_\n`has_pattern` | Matching a pattern defined as a `regex` | _string_\n`is_legit` | String not null & not empty `^\\S$` | _string_\n`has_min` | `min(col) == x` | _numeric_\n`has_max` | `max(col) == x` | _numeric_\n`has_std` | `\u03c3(col) == x` | _numeric_\n`has_mean` | `\u03bc(col) == x` | _numeric_\n`has_sum` | `\u03a3(col) == x` | _numeric_\n`has_percentile` | `%(col) == x` | _numeric_\n`has_cardinality` | `count(distinct(col)) == x` | _agnostic_\n`has_infogain` | `count(distinct(col)) > 1` | _agnostic_\n`has_max_by` | A utilitary predicate for `max(col_a) == x for max(col_b)` | _agnostic_\n`has_min_by` | A utilitary predicate for `min(col_a) == x for min(col_b)` | _agnostic_\n`has_correlation` | Finds correlation between `0..1` on `corr(col_a, col_b)` | _numeric_\n`has_entropy` | Calculates the entropy of a column `entropy(col) == x` for classification problems | _numeric_\n`is_inside_interquartile_range` | Verifies column values reside inside limits of interquartile range `Q1 <= col <= Q3` used on anomalies. | _numeric_\n`is_in_millions` | `col >= 1e6` | _numeric_\n`is_in_billions` | `col >= 1e9` | _numeric_\n`is_t_minus_1` | For date fields confirms 1 day ago `t-1` | _date_\n`is_t_minus_2` | For date fields confirms 2 days ago `t-2` | _date_\n`is_t_minus_3` | For date fields confirms 3 days ago `t-3` | _date_\n`is_t_minus_n` | For date fields confirms n days ago `t-n` | _date_\n`is_today` | For date fields confirms day is current date `t-0` | _date_\n`is_yesterday` | For date fields confirms 1 day ago `t-1` | _date_\n`is_on_weekday` | For date fields confirms day is between `Mon-Fri` | _date_\n`is_on_weekend` | For date fields confirms day is between `Sat-Sun` | _date_\n`is_on_monday` | For date fields confirms day is `Mon` | _date_\n`is_on_tuesday` | For date fields confirms day is `Tue` | _date_\n`is_on_wednesday` | For date fields confirms day is `Wed` | _date_\n`is_on_thursday` | For date fields confirms day is `Thu` | _date_\n`is_on_friday` | For date fields confirms day is `Fri` | _date_\n`is_on_saturday` | For date fields confirms day is `Sat` | _date_\n`is_on_sunday` | For date fields confirms day is `Sun` | _date_\n`is_on_schedule` | For date fields confirms time windows i.e. `9:00 - 17:00` | _timestamp_\n`is_daily` | Can verify daily continuity on date fields by default. `[2,3,4,5,6]` which represents `Mon-Fri` in PySpark. However new schedules can be used for custom date continuity | _date_\n`has_workflow` | Adjacency matrix validation on `3-column` graph, based on `group`, `event`, `order` columns. | _agnostic_\n`is_custom` | User-defined custom `function` applied to dataframe for row-based validation. | _agnostic_\n`satisfies` | An open `SQL expression` builder to construct custom checks | _agnostic_\n`validate` | The ultimate transformation of a check with a `dataframe` input for validation | _agnostic_\n\n\n## Controls `pyspark`\n\nCheck | Description | DataType\n ------- | ----------- | ----\n`completeness` | Zero `nulls` | _agnostic_\n`information` | Zero nulls `and` cardinality > 1 | _agnostic_\n`intelligence` | Zero nulls, zero empty strings and cardinality > 1 | _agnostic_\n`percentage_fill` | `% rows` not empty | _agnostic_\n`percentage_empty` | `% rows` empty | _agnostic_\n\n\n## ISO Standard\nA new module has been incorporated in `cuallee==0.4.0` which allows the verification of International Standard Organization columns in data frames. Simply access the `check.iso` interface to add the set of checks as shown below.\n\nCheck | Description | DataType\n ------- | ----------- | ----\n`iso_4217` | currency compliant `ccy` | _string_\n`iso_3166` | country compliant `country` | _string_\n\n```python\ndf = spark.createDataFrame([[1, \"USD\"], [2, \"MXN\"], [3, \"CAD\"], [4, \"EUR\"], [5, \"CHF\"]], [\"id\", \"ccy\"])\ncheck = Check(CheckLevel.WARNING, \"ISO Compliant\")\ncheck.iso.iso_4217(\"ccy\")\ncheck.validate(df).show()\n+---+-------------------+-------------+-------+------+---------------+--------------------+----+----------+---------+--------------+------+\n| id| timestamp| check| level|column| rule| value|rows|violations|pass_rate|pass_threshold|status|\n+---+-------------------+-------------+-------+------+---------------+--------------------+----+----------+---------+--------------+------+\n| 1|2023-05-14 18:28:02|ISO Compliant|WARNING| ccy|is_contained_in|{'BHD', 'CRC', 'M...| 5| 0.0| 1.0| 1.0| PASS|\n+---+-------------------+-------------+-------+------+---------------+--------------------+----+----------+---------+--------------+------+\n```\n\n\n## Snowflake Connection\nIn order to establish a connection to your SnowFlake account `cuallee` relies in the following environment variables to be avaialble in your environment:\n- `SF_ACCOUNT`\n- `SF_USER`\n- `SF_PASSWORD`\n- `SF_ROLE`\n- `SF_WAREHOUSE`\n- `SF_DATABASE`\n- `SF_SCHEMA`\n\n## Spark Connect\nJust add the environment variable `SPARK_REMOTE` to your remote session, then `cuallee` will connect using\n```python\nspark_connect = SparkSession.builder.remote(os.getenv(\"SPARK_REMOTE\")).getOrCreate()\n```\nand convert all checks to `select` as opposed to `Observation` API compute instructions.\n\n\n## Databricks Connection\nBy default `cuallee` will search for a SparkSession available in the `globals` so there is literally no need to ~~`SparkSession.builder`~~. When working in a local environment it will automatically search for an available session, or start one.\n\n## DuckDB\n\nFor testing on `duckdb` simply pass your table name to your check _et voil\u00e0_\n\n```python\nimport duckdb\nconn = duckdb.connect(\":memory:\")\ncheck = Check(CheckLevel.WARNING, \"DuckDB\", table_name=\"temp/taxi/*.parquet\")\ncheck.is_complete(\"VendorID\")\ncheck.is_complete(\"tpep_pickup_datetime\")\ncheck.validate(conn)\n\n id timestamp check level column rule value rows violations pass_rate pass_threshold status\n0 1 2022-10-31 23:15:06 test WARNING VendorID is_complete N/A 19817583 0.0 1.0 1.0 PASS\n1 2 2022-10-31 23:15:06 test WARNING tpep_pickup_datetime is_complete N/A 19817583 0.0 1.0 1.0 PASS\n```\n\n## Roadmap\n\n`100%` data frame agnostic implementation of data quality checks.\nDefine once, `run everywhere`\n- ~~[x] PySpark 3.5.0~~\n- ~~[x] PySpark 3.4.0~~\n- ~~[x] PySpark 3.3.0~~\n- ~~[x] PySpark 3.2.x~~\n- ~~[x] Snowpark DataFrame~~\n- ~~[x] Pandas DataFrame~~\n- ~~[x] DuckDB Tables~~\n- ~~[x] BigQuery Client~~\n- ~~[x] Polars DataFrame~~\n- ~~[*] Dagster Integration~~\n- ~~[x] Spark Connect~~\n- ~~[x] Daft~~\n- [-] PDF Report\n- [ ] Metadata check\n- [ ] Help us in a discussion?\n\n\n\nWhilst expanding the functionality feels a bit as an overkill because you most likely can connect `spark` via its drivers to whatever `DBMS` of your choice.\nIn the desire to make it even more `user-friendly` we are aiming to make `cuallee` portable to all the providers above.\n\n## Authors\n- [canimus](https://github.com/canimus) / Herminio Vazquez / \ud83c\uddf2\ud83c\uddfd\n- [vestalisvirginis](https://github.com/vestalisvirginis) / Virginie Grosboillot / \ud83c\uddeb\ud83c\uddf7\n\n## Contributors\n<a href=\"https://github.com/canimus/cuallee/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=canimus/cuallee\" />\n</a>\n\n### Guidelines\n- [Contributing to cuallee](CONTRIBUTING.md)\n\n## Documentation\n- [https://canimus.github.io/cuallee/](https://canimus.github.io/cuallee/)\n\n\n## Paper\n\n`cuallee` has been published in the Journal of Open Source Software\n```\nVazquez et al., (2024). cuallee: A Python package for data quality checks across multiple DataFrame APIs. Journal of Open Source Software, 9(98), 6684, https://doi.org/10.21105/joss.06684\n```\nIf you use `cuallee` please consider citing this work. [Citation](CITATION.cff)\n\n## License\nApache License 2.0\nFree for commercial use, modification, distribution, patent use, private use.\nJust preserve the copyright and license.\n\n\n> Made with \u2764\ufe0f in Utrecht \ud83c\uddf3\ud83c\uddf1<br/>\n> Maintained over \u231b from Ljubljana \ud83c\uddf8\ud83c\uddee<br/>\n> Extended \ud83d\ude80 by contributions all over the \ud83c\udf0e\n",
"bugtrack_url": null,
"license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. \"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. \"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. \"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License. \"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. \"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. \"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). \"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. \"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\" \"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets \"[]\" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same \"printed page\" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ",
"summary": "Python library for data validation on DataFrame APIs including Snowflake/Snowpark, Apache/PySpark and Pandas/DataFrame.",
"version": "0.15.2",
"project_urls": {
"Bug Tracker": "https://github.com/canimus/cuallee",
"Homepage": "https://github.com/canimus/cuallee"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9aca323a6404674aa1a1def02194fe8ee3aec808e7c86a33e71fb1c9bd32b50d",
"md5": "7f1673b12350da002e835e214487ffb8",
"sha256": "27c3180030442982dc614f0c29def87358d6ac7ad905f64e1e83f1f6559e3400"
},
"downloads": -1,
"filename": "cuallee-0.15.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f1673b12350da002e835e214487ffb8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 58270,
"upload_time": "2024-12-14T09:13:22",
"upload_time_iso_8601": "2024-12-14T09:13:22.492095Z",
"url": "https://files.pythonhosted.org/packages/9a/ca/323a6404674aa1a1def02194fe8ee3aec808e7c86a33e71fb1c9bd32b50d/cuallee-0.15.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e56a7a0be28bc8ae86333a3b311140d72d8ac472b7071df76c2db8f8da2dfd1d",
"md5": "c580f183e7640f8dd96e2d37bed22b2d",
"sha256": "49bcc8d13726d7b3f83964ff85ff513f7f8cd1983e03911d36c4e0f798d9f26b"
},
"downloads": -1,
"filename": "cuallee-0.15.2.tar.gz",
"has_sig": false,
"md5_digest": "c580f183e7640f8dd96e2d37bed22b2d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 59356,
"upload_time": "2024-12-14T09:13:25",
"upload_time_iso_8601": "2024-12-14T09:13:25.211779Z",
"url": "https://files.pythonhosted.org/packages/e5/6a/7a0be28bc8ae86333a3b311140d72d8ac472b7071df76c2db8f8da2dfd1d/cuallee-0.15.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-14 09:13:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "canimus",
"github_project": "cuallee",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "cuallee"
}