Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: A few missing re-exports from root module #192

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions csvy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
read_metadata,
read_to_array,
read_to_dataframe,
read_to_dict,
read_to_list,
read_to_polars,
)
from .writers import Writer, write, write_header # noqa: F401
12 changes: 6 additions & 6 deletions tests/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_read_to_dataframe(data_path):
"""Test the read_to_dataframe function."""
import pandas as pd

from csvy.readers import read_to_dataframe
from csvy import read_to_dataframe

data, header = read_to_dataframe(data_path)
assert isinstance(data, pd.DataFrame)
Expand All @@ -100,7 +100,7 @@ def test_read_to_polars(data_path):
import polars as pl
from polars.testing import assert_frame_equal

from csvy.readers import read_to_polars
from csvy import read_to_polars

lazy_data, header = read_to_polars(data_path)
assert isinstance(lazy_data, pl.LazyFrame)
Expand All @@ -124,7 +124,7 @@ def test_read_to_polars(data_path):

def test_read_to_list(array_data_path):
"""Test the read_to_list function."""
from csvy.readers import read_to_list
from csvy import read_to_list

data, header = read_to_list(array_data_path, csv_options={"delimiter": ","})
assert isinstance(data, list)
Expand All @@ -136,7 +136,7 @@ def test_read_to_list(array_data_path):

def test_read_to_dict_with_default_column_names(array_data_path):
"""Test the read_to_list function."""
from csvy.readers import read_to_dict
from csvy import read_to_dict

data, header = read_to_dict(array_data_path, csv_options={"delimiter": ","})

Expand All @@ -149,7 +149,7 @@ def test_read_to_dict_with_default_column_names(array_data_path):

def test_read_to_dict_with_custom_column_names(array_data_path):
"""Test the read_to_list function."""
from csvy.readers import read_to_dict
from csvy import read_to_dict

column_names = ["A", "B", "C", "D"]
data, header = read_to_dict(
Expand All @@ -165,7 +165,7 @@ def test_read_to_dict_with_custom_column_names(array_data_path):

def test_read_to_dict_with_row_based_column_names(data_path):
"""Test the read_to_list function."""
from csvy.readers import read_to_dict
from csvy import read_to_dict

data, header = read_to_dict(
data_path, column_names=0, csv_options={"delimiter": ","}
Expand Down
Loading