Coverage for polypandas/__init__.py: 100%

1"""Polypandas - Generate pandas DataFrames using polyfactory.

2

3 This package provides tools to generate pandas DataFrames for testing and

4 development using the polyfactory library. It supports dataclasses, Pydantic

5 models, and TypedDicts. Optional PyArrow (pip install polypandas[pyarrow])

6 enables proper nested struct columns.

7"""

8

9 from polypandas.exceptions import (

10 PandasNotAvailableError,

11 PolypandasError,

12 SchemaInferenceError,

13 UnsupportedTypeError,

14)

15 from polypandas.io import DataIOError

16 from polypandas.factory import (

17 PandasFactory,

18 build_pandas_dataframe,

19 pandas_factory,

20)

21 from polypandas.io import (

22 load_and_validate,

23 load_csv,

24 load_dicts_from_json,

25 load_json,

26 load_parquet,

27 save_as_csv,

28 save_as_json,

29 save_as_parquet,

30 save_dicts_as_json,

31)

32 from polypandas.protocols import is_pandas_available, is_pyarrow_available

33 from polypandas.schema import (

34 has_nested_structs,

35 infer_pyarrow_schema,

36 infer_schema,

37 python_type_to_pandas_dtype,

38)

39 from polypandas.testing import (

40 DataFrameComparisonError,

41 assert_approx_count,

42 assert_column_exists,

43 assert_dataframe_equal,

44 assert_dtypes_equal,

45 assert_no_duplicates,

46 assert_schema_equal,

47 get_column_stats,

48)

49

50 __version__ = "0.1.0"

51

52 __all__ = [

53 "PandasFactory",

54 "build_pandas_dataframe",

55 "pandas_factory",

56 "has_nested_structs",

57 "infer_pyarrow_schema",

58 "infer_schema",

59 "python_type_to_pandas_dtype",

60 "is_pyarrow_available",

61 "assert_dataframe_equal",

62 "assert_schema_equal",

63 "assert_dtypes_equal",

64 "assert_approx_count",

65 "assert_column_exists",

66 "assert_no_duplicates",

67 "get_column_stats",

68 "DataFrameComparisonError",

69 "save_as_parquet",

70 "save_as_json",

71 "save_as_csv",

72 "load_parquet",

73 "load_json",

74 "load_csv",

75 "load_and_validate",

76 "save_dicts_as_json",

77 "load_dicts_from_json",

78 "DataIOError",

79 "is_pandas_available",

80 "PolypandasError",

81 "PandasNotAvailableError",

82 "SchemaInferenceError",

83 "UnsupportedTypeError",

84]