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

Switch regex strategy to sampling strategy to improve performance #2998

Merged
merged 2 commits into from
Nov 2, 2023
Merged
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
5 changes: 3 additions & 2 deletions test/unit/io_managers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def test_ferc_xbrl_sqlite_io_manager_dedupes(mocker, tmp_path):
example_schema = pandera.DataFrameSchema(
{
"entity_id": pandera.Column(
str, pandera.Check.str_matches(r"[0-9a-zA-Z]+"), nullable=False
str, pandera.Check.isin("C0123456789"), nullable=False
),
"date": pandera.Column("datetime64[ns]", nullable=False),
"utility_type": pandera.Column(
Expand All @@ -365,11 +365,12 @@ def test_ferc_xbrl_sqlite_io_manager_dedupes(mocker, tmp_path):
"publication_time": pandera.Column("datetime64[ns]", nullable=False),
"int_factoid": pandera.Column(int),
"float_factoid": pandera.Column(float),
"str_factoid": pandera.Column("str"),
"str_factoid": pandera.Column(str),
}
)


@hypothesis.settings(print_blob=True, deadline=400)
@hypothesis.given(example_schema.strategy(size=3))
def test_filter_for_freshest_data(df):
# XBRL context is the identifying metadata for reported values
Expand Down