File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55
66def load () -> pd .DataFrame :
7- return pd .read_parquet (Path (__file__ ).parent / "sample.parquet" )
7+ df = pd .read_parquet (Path (__file__ ).parent / "sample.parquet" )
8+ df ["datetime1" ] = df ["datetime1" ].astype ("datetime64[ns]" )
9+ return df
Original file line number Diff line number Diff line change 22from pandera .typing import Series
33
44
5- class Schema (pa .SchemaModel ):
5+ class Schema (pa .DataFrameModel ):
66 A : Series [int ] = pa .Field (nullable = False )
77 B : Series [float ] = pa .Field (nullable = False )
Original file line number Diff line number Diff line change 44from importlib .metadata import version
55from pathlib import Path
66from tempfile import TemporaryDirectory
7+ from typing import Generator , Optional
8+
9+ import pandas as pd
10+ import pandera as pa
11+ import pytest
12+
13+ from dac import PackConfig , PyProjectConfig
714from test .cli_utilities import invoke_dac_pack_from_config
815from test .data import (
916 generate_random_project_name ,
1825 get_test_project_version ,
1926)
2027from test .data .load import self_contained_as_pandas
21- from typing import Generator , Optional
22-
23- import pandas as pd
24- import pandera as pa
25- import pytest
26- from dac import PackConfig , PyProjectConfig
2728
2829
2930@pytest .mark .slow
@@ -54,7 +55,7 @@ def test_if_installed_then_can_access_schema():
5455 files_in_wheel_dir = list (Path (config .wheel_dir ).iterdir ())
5556 with _pip_installed_wheel (path = files_in_wheel_dir [0 ]):
5657 pkg = import_module (config .pyproject .project_name )
57- assert issubclass (pkg .Schema , pa .SchemaModel )
58+ assert issubclass (pkg .Schema , pa .DataFrameModel )
5859
5960
6061@pytest .mark .slow
You can’t perform that action at this time.
0 commit comments