Validate CSV output schemas
Also moved code dir to src. There are reasons to do standard things in standard ways. While it is possible to get the `code/` directory to work, and recognize it as a package path, this requires wrangling the pyproject.toml file. Additionally, any import from the `code.something` path automatically shadows the python stdlib `code` module. While it may not be necessary, it still is good to not shadow standard library modules.
This commit is contained in:
parent
de96b67fac
commit
2faeda87c3
14 changed files with 111 additions and 7 deletions
10
src/tests/test_validate_date_col.py
Normal file
10
src/tests/test_validate_date_col.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import dataframely as dy
|
||||
import polars as pl
|
||||
|
||||
|
||||
class DateSchema(dy.Schema):
|
||||
date: dy.Date = dy.Date(nullable=False)
|
||||
|
||||
@dy.rule()
|
||||
def minimum_starting_date() -> pl.Expr:
|
||||
return pl.col("date") > pl.date(2018, 5, 8)
|
||||
Loading…
Add table
Add a link
Reference in a new issue