Skip to content

Commit 7361daf

Browse files
committed
Apply same change to all other columns
1 parent e3f986c commit 7361daf

12 files changed

Lines changed: 60 additions & 0 deletions

File tree

dataframely/columns/_base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,19 @@ def __init__(
6060
this checks uniqueness for this column independently. Multiple columns
6161
can each have `unique=True` without forming a composite constraint.
6262
check: A custom rule or multiple rules to run for this column. This can be:
63+
6364
- A single callable that returns a non-aggregated boolean expression.
6465
The name of the rule is derived from the callable name, or defaults to
6566
"check" for lambdas.
67+
6668
- A list of callables, where each callable returns a non-aggregated
6769
boolean expression. The name of the rule is derived from the callable
6870
name, or defaults to "check" for lambdas. Where multiple rules result
6971
in the same name, the suffix __i is appended to the name.
72+
7073
- A dictionary mapping rule names to callables, where each callable
7174
returns a non-aggregated boolean expression.
75+
7276
All rule names provided here are given the prefix `"check_"`.
7377
alias: An overwrite for this column's name which allows for using a column
7478
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/any.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@ def __init__(
3434
"""
3535
Args:
3636
check: A custom rule or multiple rules to run for this column. This can be:
37+
3738
- A single callable that returns a non-aggregated boolean expression.
3839
The name of the rule is derived from the callable name, or defaults to
3940
"check" for lambdas.
41+
4042
- A list of callables, where each callable returns a non-aggregated
4143
boolean expression. The name of the rule is derived from the callable
4244
name, or defaults to "check" for lambdas. Where multiple rules result
4345
in the same name, the suffix __i is appended to the name.
46+
4447
- A dictionary mapping rule names to callables, where each callable
4548
returns a non-aggregated boolean expression.
49+
4650
All rule names provided here are given the prefix `"check_"`.
4751
alias: An overwrite for this column's name which allows for using a column
4852
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/array.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,19 @@ def __init__(
5050
this checks uniqueness for this column independently. Multiple columns
5151
can each have `unique=True` without forming a composite constraint.
5252
check: A custom rule or multiple rules to run for this column. This can be:
53+
5354
- A single callable that returns a non-aggregated boolean expression.
5455
The name of the rule is derived from the callable name, or defaults to
5556
"check" for lambdas.
57+
5658
- A list of callables, where each callable returns a non-aggregated
5759
boolean expression. The name of the rule is derived from the callable
5860
name, or defaults to "check" for lambdas. Where multiple rules result
5961
in the same name, the suffix __i is appended to the name.
62+
6063
- A dictionary mapping rule names to callables, where each callable
6164
returns a non-aggregated boolean expression.
65+
6266
All rule names provided here are given the prefix `"check_"`.
6367
alias: An overwrite for this column's name which allows for using a column
6468
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/categorical.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,19 @@ def __init__(
4040
this checks uniqueness for this column independently. Multiple columns
4141
can each have `unique=True` without forming a composite constraint.
4242
check: A custom rule or multiple rules to run for this column. This can be:
43+
4344
- A single callable that returns a non-aggregated boolean expression.
4445
The name of the rule is derived from the callable name, or defaults to
4546
"check" for lambdas.
47+
4648
- A list of callables, where each callable returns a non-aggregated
4749
boolean expression. The name of the rule is derived from the callable
4850
name, or defaults to "check" for lambdas. Where multiple rules result
4951
in the same name, the suffix __i is appended to the name.
52+
5053
- A dictionary mapping rule names to callables, where each callable
5154
returns a non-aggregated boolean expression.
55+
5256
All rule names provided here are given the prefix `"check_"`.
5357
alias: An overwrite for this column's name which allows for using a column
5458
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/datetime.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,19 @@ def __init__(
6969
For example, a value `1mo` expects all dates to be on the first of the
7070
month. Note that this setting does *not* affect the storage resolution.
7171
check: A custom rule or multiple rules to run for this column. This can be:
72+
7273
- A single callable that returns a non-aggregated boolean expression.
7374
The name of the rule is derived from the callable name, or defaults to
7475
"check" for lambdas.
76+
7577
- A list of callables, where each callable returns a non-aggregated
7678
boolean expression. The name of the rule is derived from the callable
7779
name, or defaults to "check" for lambdas. Where multiple rules result
7880
in the same name, the suffix __i is appended to the name.
81+
7982
- A dictionary mapping rule names to callables, where each callable
8083
returns a non-aggregated boolean expression.
84+
8185
All rule names provided here are given the prefix `"check_"`.
8286
alias: An overwrite for this column's name which allows for using a column
8387
name that is not a valid Python identifier. Especially note that setting
@@ -207,15 +211,19 @@ def __init__(
207211
For example, a value `1h` expects all times to be full hours. Note
208212
that this setting does *not* affect the storage resolution.
209213
check: A custom rule or multiple rules to run for this column. This can be:
214+
210215
- A single callable that returns a non-aggregated boolean expression.
211216
The name of the rule is derived from the callable name, or defaults to
212217
"check" for lambdas.
218+
213219
- A list of callables, where each callable returns a non-aggregated
214220
boolean expression. The name of the rule is derived from the callable
215221
name, or defaults to "check" for lambdas. Where multiple rules result
216222
in the same name, the suffix __i is appended to the name.
223+
217224
- A dictionary mapping rule names to callables, where each callable
218225
returns a non-aggregated boolean expression.
226+
219227
All rule names provided here are given the prefix `"check_"`.
220228
alias: An overwrite for this column's name which allows for using a column
221229
name that is not a valid Python identifier. Especially note that setting
@@ -357,15 +365,19 @@ def __init__(
357365
`America/New_York`.
358366
time_unit: Unit of time. Defaults to `us` (microseconds).
359367
check: A custom rule or multiple rules to run for this column. This can be:
368+
360369
- A single callable that returns a non-aggregated boolean expression.
361370
The name of the rule is derived from the callable name, or defaults to
362371
"check" for lambdas.
372+
363373
- A list of callables, where each callable returns a non-aggregated
364374
boolean expression. The name of the rule is derived from the callable
365375
name, or defaults to "check" for lambdas. Where multiple rules result
366376
in the same name, the suffix __i is appended to the name.
377+
367378
- A dictionary mapping rule names to callables, where each callable
368379
returns a non-aggregated boolean expression.
380+
369381
All rule names provided here are given the prefix `"check_"`.
370382
alias: An overwrite for this column's name which allows for using a column
371383
name that is not a valid Python identifier. Especially note that setting
@@ -521,15 +533,19 @@ def __init__(
521533
that this setting does *not* affect the storage resolution.
522534
time_unit: Unit of time. Defaults to `us` (microseconds).
523535
check: A custom rule or multiple rules to run for this column. This can be:
536+
524537
- A single callable that returns a non-aggregated boolean expression.
525538
The name of the rule is derived from the callable name, or defaults to
526539
"check" for lambdas.
540+
527541
- A list of callables, where each callable returns a non-aggregated
528542
boolean expression. The name of the rule is derived from the callable
529543
name, or defaults to "check" for lambdas. Where multiple rules result
530544
in the same name, the suffix __i is appended to the name.
545+
531546
- A dictionary mapping rule names to callables, where each callable
532547
returns a non-aggregated boolean expression.
548+
533549
All rule names provided here are given the prefix `"check_"`.
534550
alias: An overwrite for this column's name which allows for using a column
535551
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/decimal.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,19 @@ def __init__(
5858
max_exclusive: Like `max` but exclusive. May not be specified if `max`
5959
is specified and vice versa.
6060
check: A custom rule or multiple rules to run for this column. This can be:
61+
6162
- A single callable that returns a non-aggregated boolean expression.
6263
The name of the rule is derived from the callable name, or defaults to
6364
"check" for lambdas.
65+
6466
- A list of callables, where each callable returns a non-aggregated
6567
boolean expression. The name of the rule is derived from the callable
6668
name, or defaults to "check" for lambdas. Where multiple rules result
6769
in the same name, the suffix __i is appended to the name.
70+
6871
- A dictionary mapping rule names to callables, where each callable
6972
returns a non-aggregated boolean expression.
73+
7074
All rule names provided here are given the prefix `"check_"`.
7175
alias: An overwrite for this column's name which allows for using a column
7276
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/enum.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,19 @@ def __init__(
4747
this checks uniqueness for this column independently. Multiple columns
4848
can each have `unique=True` without forming a composite constraint.
4949
check: A custom rule or multiple rules to run for this column. This can be:
50+
5051
- A single callable that returns a non-aggregated boolean expression.
5152
The name of the rule is derived from the callable name, or defaults to
5253
"check" for lambdas.
54+
5355
- A list of callables, where each callable returns a non-aggregated
5456
boolean expression. The name of the rule is derived from the callable
5557
name, or defaults to "check" for lambdas. Where multiple rules result
5658
in the same name, the suffix __i is appended to the name.
59+
5760
- A dictionary mapping rule names to callables, where each callable
5861
returns a non-aggregated boolean expression.
62+
5963
All rule names provided here are given the prefix `"check_"`.
6064
alias: An overwrite for this column's name which allows for using a column
6165
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/integer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,19 @@ def __init__(
5656
is_in: A (non-contiguous) list of integers indicating valid values in this
5757
column. If specified, both `min` and `max` must not bet set.
5858
check: A custom rule or multiple rules to run for this column. This can be:
59+
5960
- A single callable that returns a non-aggregated boolean expression.
6061
The name of the rule is derived from the callable name, or defaults to
6162
"check" for lambdas.
63+
6264
- A list of callables, where each callable returns a non-aggregated
6365
boolean expression. The name of the rule is derived from the callable
6466
name, or defaults to "check" for lambdas. Where multiple rules result
6567
in the same name, the suffix __i is appended to the name.
68+
6669
- A dictionary mapping rule names to callables, where each callable
6770
returns a non-aggregated boolean expression.
71+
6872
All rule names provided here are given the prefix `"check_"`.
6973
alias: An overwrite for this column's name which allows for using a column
7074
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/list.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,19 @@ def __init__(
5858
this checks uniqueness for this column independently. Multiple columns
5959
can each have `unique=True` without forming a composite constraint.
6060
check: A custom rule or multiple rules to run for this column. This can be:
61+
6162
- A single callable that returns a non-aggregated boolean expression.
6263
The name of the rule is derived from the callable name, or defaults to
6364
"check" for lambdas.
65+
6466
- A list of callables, where each callable returns a non-aggregated
6567
boolean expression. The name of the rule is derived from the callable
6668
name, or defaults to "check" for lambdas. Where multiple rules result
6769
in the same name, the suffix __i is appended to the name.
70+
6871
- A dictionary mapping rule names to callables, where each callable
6972
returns a non-aggregated boolean expression.
73+
7074
All rule names provided here are given the prefix `"check_"`.
7175
alias: An overwrite for this column's name which allows for using a column
7276
name that is not a valid Python identifier. Especially note that setting

dataframely/columns/object.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@ def __init__(
3030
Args:
3131
nullable: Whether this column may contain null values.
3232
check: A custom rule or multiple rules to run for this column. This can be:
33+
3334
- A single callable that returns a non-aggregated boolean expression.
3435
The name of the rule is derived from the callable name, or defaults to
3536
"check" for lambdas.
37+
3638
- A list of callables, where each callable returns a non-aggregated
3739
boolean expression. The name of the rule is derived from the callable
3840
name, or defaults to "check" for lambdas. Where multiple rules result
3941
in the same name, the suffix __i is appended to the name.
42+
4043
- A dictionary mapping rule names to callables, where each callable
4144
returns a non-aggregated boolean expression.
45+
4246
All rule names provided here are given the prefix `"check_"`.
4347
alias: An overwrite for this column's name which allows for using a column
4448
name that is not a valid Python identifier. Especially note that setting

0 commit comments

Comments
 (0)