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: xarray upgrade to 0.19 broke CI Checks pipeline #42716

Closed
phofl opened this issue Jul 25, 2021 · 14 comments
Closed

CI: xarray upgrade to 0.19 broke CI Checks pipeline #42716

phofl opened this issue Jul 25, 2021 · 14 comments
Assignees
Labels
CI Continuous Integration Dependencies Required and optional dependencies Typing type annotations, mypy/pyright type checking

Comments

@phofl
Copy link
Member

phofl commented Jul 25, 2021

Xarray was recently upgrade from 0.18.2 to 0.19 in our ci. This broke the checks pipeline

Passing:
https://github.com/pandas-dev/pandas/runs/3155104841

Failing:
https://github.com/pandas-dev/pandas/pull/42713/checks?check_run_id=3155841275

@phofl phofl added Bug Needs Triage Issue that has not been reviewed by a pandas team member CI Continuous Integration Dependencies Required and optional dependencies and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 25, 2021
@phofl
Copy link
Member Author

phofl commented Jul 25, 2021

Following errors happen:

 Performing static analysis using mypy
/usr/share/miniconda/envs/pandas-dev/lib/python3.8/site-packages/xarray/core/common.py:1659: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 0.910
/usr/share/miniconda/envs/pandas-dev/lib/python3.8/site-packages/xarray/core/common.py:1659: : note: please use --show-traceback to print a traceback when reporting a bug
Performing static analysis using mypy DONE
Error: Process completed with exit code 2.

Some mypy issue

Doctest issue:

 _______________ [doctest] pandas.core.generic.NDFrame.to_xarray ________________
3086 
3087         >>> df_multiindex
3088                            speed
3089         date       animal
3090         2018-01-01 falcon    350
3091                    parrot     18
3092         2018-01-02 falcon    361
3093                    parrot     15
3094 
3095         >>> df_multiindex.to_xarray()
Differences (unified diff with -expected +actual):
    @@ -1,4 +1,4 @@
     <xarray.Dataset>
    -Dimensions:  (animal: 2, date: 2)
    +Dimensions:  (date: 2, animal: 2)
     Coordinates:
       * date     (date) datetime64[ns] 2018-01-01 2018-01-02

@simonjayhawkins
Copy link
Member

changing milestone to 1.3.5

@simonjayhawkins simonjayhawkins modified the milestones: 1.3.4, 1.3.5 Oct 16, 2021
@jbrockmendel
Copy link
Member

both of these persist with xarray 0.20.1

@simonjayhawkins
Copy link
Member

xarray is a py.typed library and this was also the case for xarray 0.18.2 (since v0.12.4 pydata/xarray#3112)

Not sure what the mypy error is all about but adding an empty xarray.pyi file in our typings directory allows mypy to run and is green (for xarray 0.20.1), so could do this if unpinning xarray is considered more important than type checking against xarray.

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Nov 28, 2021
@simonjayhawkins
Copy link
Member

removing from 1.3.x milestone as I don't think there is anything that needs to done for 1.3.x and this is just a ci issue? So having xarray pinned on 1.3.x is nbd.

@simonjayhawkins simonjayhawkins modified the milestones: 1.3.5, Contributions Welcome Nov 28, 2021
@jbrockmendel
Copy link
Member

There are several ci/deps/ files where xarray version is not pinned. Does that indicate this issue is resolved?

@jbrockmendel jbrockmendel added the Closing Candidate May be closeable, needs more eyeballs label Dec 22, 2021
@phofl
Copy link
Member Author

phofl commented Dec 22, 2021

I think it only caused the typing checks to fail, nothing else

@jbrockmendel
Copy link
Member

OK. Do we have a way of checking when this is resolved?

@MarcoGorelli
Copy link
Member

closing as it looks like CI is fine now

@simonjayhawkins
Copy link
Member

xarray is still pinned in environment.yaml, xarray<0.19. local environment resolving to 0.18.2

mypy is now passing locally with both xarray 0.19.0 and xarray 0.20.1, so I guess that the issue has been resolved by some changes in pandas itself.

I think we should not close this issue until xarray is unpinned.

@MarcoGorelli MarcoGorelli removed the Closing Candidate May be closeable, needs more eyeballs label Mar 29, 2022
@djgray780
Copy link
Contributor

take

@djgray780
Copy link
Contributor

This is my first contribution to pandas and open-source in general, but I am pretty sure that my PR 47016 is ready for review/merge.

@simonjayhawkins
Copy link
Member

mypy is now passing locally with both xarray 0.19.0 and xarray 0.20.1, so I guess that the issue has been resolved by some changes in pandas itself.

xref #47016 (review), doctest issue mentioned in #42716 (comment) still persists.

@mroeschke
Copy link
Member

Closed by #47016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Dependencies Required and optional dependencies Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

No branches or pull requests

6 participants