diff --git a/dataframely/columns/_base.py b/dataframely/columns/_base.py index 43cb149..7b7ce78 100644 --- a/dataframely/columns/_base.py +++ b/dataframely/columns/_base.py @@ -60,15 +60,19 @@ def __init__( this checks uniqueness for this column independently. Multiple columns can each have `unique=True` without forming a composite constraint. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/any.py b/dataframely/columns/any.py index 988c788..0974253 100644 --- a/dataframely/columns/any.py +++ b/dataframely/columns/any.py @@ -34,15 +34,19 @@ def __init__( """ Args: check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/array.py b/dataframely/columns/array.py index de5c405..48e1412 100644 --- a/dataframely/columns/array.py +++ b/dataframely/columns/array.py @@ -50,15 +50,19 @@ def __init__( this checks uniqueness for this column independently. Multiple columns can each have `unique=True` without forming a composite constraint. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/categorical.py b/dataframely/columns/categorical.py index 4f1b700..71b7a56 100644 --- a/dataframely/columns/categorical.py +++ b/dataframely/columns/categorical.py @@ -40,15 +40,19 @@ def __init__( this checks uniqueness for this column independently. Multiple columns can each have `unique=True` without forming a composite constraint. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/datetime.py b/dataframely/columns/datetime.py index 693d4be..5653e37 100644 --- a/dataframely/columns/datetime.py +++ b/dataframely/columns/datetime.py @@ -69,15 +69,19 @@ def __init__( For example, a value `1mo` expects all dates to be on the first of the month. Note that this setting does *not* affect the storage resolution. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting @@ -207,15 +211,19 @@ def __init__( For example, a value `1h` expects all times to be full hours. Note that this setting does *not* affect the storage resolution. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting @@ -357,15 +365,19 @@ def __init__( `America/New_York`. time_unit: Unit of time. Defaults to `us` (microseconds). check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting @@ -521,15 +533,19 @@ def __init__( that this setting does *not* affect the storage resolution. time_unit: Unit of time. Defaults to `us` (microseconds). check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/decimal.py b/dataframely/columns/decimal.py index 6fa3549..6d1ea4c 100644 --- a/dataframely/columns/decimal.py +++ b/dataframely/columns/decimal.py @@ -58,15 +58,19 @@ def __init__( max_exclusive: Like `max` but exclusive. May not be specified if `max` is specified and vice versa. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/enum.py b/dataframely/columns/enum.py index 591b436..1bc79c6 100644 --- a/dataframely/columns/enum.py +++ b/dataframely/columns/enum.py @@ -47,15 +47,19 @@ def __init__( this checks uniqueness for this column independently. Multiple columns can each have `unique=True` without forming a composite constraint. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/float.py b/dataframely/columns/float.py index 1d9adbc..6dc6a02 100644 --- a/dataframely/columns/float.py +++ b/dataframely/columns/float.py @@ -60,15 +60,19 @@ def __init__( max_exclusive: Like `max` but exclusive. May not be specified if `max` is specified and vice versa. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/integer.py b/dataframely/columns/integer.py index 6cff8a1..bfde234 100644 --- a/dataframely/columns/integer.py +++ b/dataframely/columns/integer.py @@ -56,15 +56,19 @@ def __init__( is_in: A (non-contiguous) list of integers indicating valid values in this column. If specified, both `min` and `max` must not bet set. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/list.py b/dataframely/columns/list.py index 62f3e01..b45581e 100644 --- a/dataframely/columns/list.py +++ b/dataframely/columns/list.py @@ -58,15 +58,19 @@ def __init__( this checks uniqueness for this column independently. Multiple columns can each have `unique=True` without forming a composite constraint. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/object.py b/dataframely/columns/object.py index 7a5644d..f796e63 100644 --- a/dataframely/columns/object.py +++ b/dataframely/columns/object.py @@ -30,15 +30,19 @@ def __init__( Args: nullable: Whether this column may contain null values. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/string.py b/dataframely/columns/string.py index 342d830..1e69f72 100644 --- a/dataframely/columns/string.py +++ b/dataframely/columns/string.py @@ -50,15 +50,19 @@ def __init__( regex does not use start and end anchors (i.e. `^` and `$`), the regex must only be _contained_ in the string. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting diff --git a/dataframely/columns/struct.py b/dataframely/columns/struct.py index c5a88a4..acd0dc9 100644 --- a/dataframely/columns/struct.py +++ b/dataframely/columns/struct.py @@ -51,15 +51,19 @@ def __init__( this checks uniqueness for this column independently. Multiple columns can each have `unique=True` without forming a composite constraint. check: A custom rule or multiple rules to run for this column. This can be: + - A single callable that returns a non-aggregated boolean expression. - The name of the rule is derived from the callable name, or defaults to - "check" for lambdas. + The name of the rule is derived from the callable name, or defaults to + "check" for lambdas. + - A list of callables, where each callable returns a non-aggregated - boolean expression. The name of the rule is derived from the callable - name, or defaults to "check" for lambdas. Where multiple rules result - in the same name, the suffix __i is appended to the name. + boolean expression. The name of the rule is derived from the callable + name, or defaults to "check" for lambdas. Where multiple rules result + in the same name, the suffix __i is appended to the name. + - A dictionary mapping rule names to callables, where each callable - returns a non-aggregated boolean expression. + returns a non-aggregated boolean expression. + All rule names provided here are given the prefix `"check_"`. alias: An overwrite for this column's name which allows for using a column name that is not a valid Python identifier. Especially note that setting