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

CI/TST: Enable -W error:::pandas in pytest during CI runs #48553

Closed
mroeschke opened this issue Sep 14, 2022 · 8 comments · Fixed by #51312
Closed

CI/TST: Enable -W error:::pandas in pytest during CI runs #48553

mroeschke opened this issue Sep 14, 2022 · 8 comments · Fixed by #51312
Labels
CI Continuous Integration Testing pandas testing functions or related to the test suite Warnings Warnings that appear or should be added to pandas

Comments

@mroeschke
Copy link
Member

In order to avoid introducing a warning originating from pandas that may be unwanted/false positive in another part of the API (#48397), the test suite should run with -W error:::pandas to error such that they can be addressed. This will also help reduce the noise in the test run logs.

Might be good to add this all the way in pyproject.toml in adopts.

@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 Sep 14, 2022
@phofl
Copy link
Member

phofl commented Sep 14, 2022

Sounds good! But we have a bunch of warnings right now we have to fix before enabling this

@theoniko
Copy link
Contributor

theoniko commented Nov 27, 2022

Hello all,
could i work on it? If yes, could you please give some hints which files to change?
Is sth like adding addopts = "-W error:::pandas" as in https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml

@phofl
Copy link
Member

phofl commented Nov 27, 2022

We have to fix the warnings before we can enable this. You have to run all tests to determine where the warnings are shown

@mroeschke
Copy link
Member Author

Agreed, a good first step would be to catch or fix the tests where the warnings appear. Specifically you can view the logs of test runs in the CI and address the test warnings that appear e.g: https://github.com/pandas-dev/pandas/actions/runs/3558958743/jobs/5977992575

@theoniko
Copy link
Contributor

Just to be sure, do you refer to the warnings like DeprecationWarning, FutureWarning and PerformanceWarning in the following sections in the log:

  • 2022-11-27T17:26:05.2922016Z =============================== warnings summary ===============================
  • 2022-11-27T17:34:18.8852922Z =============================== warnings summary ===============================

or something different?

@mroeschke
Copy link
Member Author

Yeah exactly

@theoniko
Copy link
Contributor

How shall i fix /home/runner/micromamba/envs/test/lib/python3.8/site-packages/botocore/httpsession.py:41: DeprecationWarning: 'urllib3.contrib.pyopenssl' module is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: urllib3/urllib3#2680 since it is from another python module?

@jorisvandenbossche
Copy link
Member

@theoniko that's a warning that is generated by an external package, not by pandas itself. The goal here of this issue to ensure we have no warnings of pandas itself (and error for this if it happens, to ensure our own tests don't generate warnings).

Now, also for external warnings, it is nice if they get fixed or suppressed (if we can't fix them ourselves in the tests).

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
4 participants