Skip to content

CI/TST: Enable -W error:::pandas in pyproject.toml #51312

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

Merged
merged 27 commits into from
Feb 22, 2023

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite CI Continuous Integration Warnings Warnings that appear or should be added to pandas labels Feb 10, 2023
@@ -632,36 +632,9 @@ def read_sql(
>>> pd.read_sql('test_data', 'postgres:///db_name') # doctest:+SKIP

Apply date parsing to columns through the ``parse_dates`` argument

>>> pd.read_sql('SELECT int_column, date_column FROM test_data',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed these examples because they trigger UserWarnings that the format could not be inferred. There is still an example of parse_dates at the bottom that I think fits the spirit of showing what the keyword does

@mroeschke mroeschke added this to the 2.0 milestone Feb 17, 2023
@@ -395,6 +395,9 @@ doctest_optionflags = [
"ELLIPSIS",
]
filterwarnings = [
"error:::pandas",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this one mean?

Copy link
Member Author

@mroeschke mroeschke Feb 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If any unhanded warning with any message or warning class originates from the path pandas/*, treat it as as an error in the test suite.

Any subsequent filter in this list takes prescient over this one if they overlap.

@phofl
Copy link
Member

phofl commented Feb 20, 2023

needs a rebase

@mroeschke
Copy link
Member Author

Rebased. Added back the ResourceWarning check I removed in #51443. Appears tm.assert_produces_warning still catches these

@mroeschke mroeschke mentioned this pull request Feb 21, 2023
5 tasks
@phofl phofl merged commit bf29272 into pandas-dev:main Feb 22, 2023
@phofl
Copy link
Member

phofl commented Feb 22, 2023

thx @mroeschke

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Feb 22, 2023
@mroeschke mroeschke deleted the tst/warnings_errors_pandas branch February 22, 2023 23:53
simonjayhawkins pushed a commit that referenced this pull request Feb 23, 2023
…in pyproject.toml) (#51570)

Backport PR #51312: CI/TST: Enable -W error:::pandas in pyproject.toml

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Testing pandas testing functions or related to the test suite Warnings Warnings that appear or should be added to pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI/TST: Enable -W error:::pandas in pytest during CI runs
3 participants