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: Unpin pytest #35272

Merged
merged 21 commits into from Jul 29, 2020
Merged

CI: Unpin pytest #35272

merged 21 commits into from Jul 29, 2020

Conversation

simonjayhawkins
Copy link
Member

have made a start working through the failures. we should be able to get mypy to green here and then when pytest 6.0.0 is released the upstream fixes should cause ci to go red since we have warn_unused_ignores = True in setup.cfg.

@simonjayhawkins simonjayhawkins added CI Continuous Integration Typing type annotations, mypy/pyright type checking Testing pandas testing functions or related to the test suite labels Jul 14, 2020
@simonjayhawkins
Copy link
Member Author

cc @bluetech @asottile

pandas/_testing.py Outdated Show resolved Hide resolved
@pep8speaks
Copy link

pep8speaks commented Jul 14, 2020

Hello @simonjayhawkins! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-07-29 14:30:49 UTC

@WillAyd
Copy link
Member

WillAyd commented Jul 15, 2020

Nice work. Are you planning to drop some of the type ignores on the next RC? I see some of the upstream issues you've opened have been closed

@simonjayhawkins
Copy link
Member Author

Nice work. Are you planning to drop some of the type ignores on the next RC? I see some of the upstream issues you've opened have been closed

we could release the pin on CI / Checks only with this PR and get immediate benefit from the type checking. or happy to wait for the upstream fixes and reduce the diff here. (the type:ignores for the fixed issues will give mypy errors since we have warn_unused_ignores = True in the config)

@bluetech has added tests for the fixed issues so shouldn't be an issue, but could also change the CI /Checks environment here to use pytest master to make sure.

@simonjayhawkins
Copy link
Member Author

I see some of the upstream issues you've opened have been closed

There are basically three issues. two are fixed. I still need to look into the other. pytest-dev/pytest#7495

@@ -1332,7 +1333,8 @@ def test_series_groupby_on_2_categoricals_unobserved_zeroes_or_nans(
# Tests whether the unobserved categories in the result contain 0 or NaN

if reduction_func == "ngroup":
pytest.skip("ngroup is not truly a reduction")
# https://github.com/pytest-dev/pytest/issues/7495
pytest.skip("ngroup is not truly a reduction") # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

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

tbh here, this is only causing errors since the function is being checked since we have type annotations in the function signature.

I think our policy is that we don't type check the tests themselves.

maybe I should remove the type annotations here instead. @WillAyd

Copy link
Member Author

Choose a reason for hiding this comment

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

@WillAyd because have warn_unused_ignores = True we need to have pytest 6.0.0 as the minimum version in the dev environment if keep these ignores. I think that removing the type annotations on these tests is probably best.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed type annotations from pandas/tests/groupby/test_categorical.py. will remove pytest pin from environment.yml after ci run.

@simonjayhawkins simonjayhawkins changed the title [WIP] CI: Unpin pytest CI: Unpin pytest Jul 29, 2020
@simonjayhawkins simonjayhawkins marked this pull request as ready for review July 29, 2020 13:25
@simonjayhawkins simonjayhawkins added this to the 1.2 milestone Jul 29, 2020
@simonjayhawkins
Copy link
Member Author

@TomAugspurger I've labelled this 1.2 for now. Is there a benefit to unpinning on 1.1.x?

@simonjayhawkins
Copy link
Member Author

test failures unrelated. The ci environments are resolving to pytest 6.0.0 in Linux py37_locale and Windows py36_np15 on azure, CI / Checks on GitHub actions so I think this is good to go. @TomAugspurger

@TomAugspurger
Copy link
Contributor

Actually, I'm second-guessing not backporting this. I think we'll want a consistent pytest version for both branches being actively developed. What do you think?

Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

LGTM, pending the backport discussion.

@simonjayhawkins
Copy link
Member Author

Actually, I'm second-guessing not backporting this. I think we'll want a consistent pytest version for both branches being actively developed. What do you think?

sure. happy to backport. should be a benefit to users of 1.1.1 onwards (will be interesting to see if we get any issues on 1.1.0 regarding the pin, now that pytest 6.0.0 is released.)

@simonjayhawkins simonjayhawkins modified the milestones: 1.2, 1.1.1 Jul 29, 2020
@TomAugspurger TomAugspurger merged commit 3b1d4f1 into pandas-dev:master Jul 29, 2020
@TomAugspurger
Copy link
Contributor

Great, thanks.

@simonjayhawkins
Copy link
Member Author

@meeseeksdev backport to 1.1.x

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Jul 29, 2020
jreback pushed a commit that referenced this pull request Jul 30, 2020
Co-authored-by: Simon Hawkins <simonjayhawkins@gmail.com>
@simonjayhawkins simonjayhawkins deleted the unpin-pytest branch July 30, 2020 12:20
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 Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failures with pytest 6.0.0rc1
5 participants