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

TST: Fix excel test discovery #16478

Merged
merged 3 commits into from
May 26, 2017

Conversation

TomAugspurger
Copy link
Contributor

closes #16477

Locally:

======================================== 26 failed, 358 passed, 48 skipped, 1 xfailed, 61 warnings in 20.85 seconds ========================================

@TomAugspurger TomAugspurger added IO Excel read_excel, to_excel Testing pandas testing functions or related to the test suite labels May 24, 2017
@TomAugspurger TomAugspurger added this to the 0.20.2 milestone May 24, 2017
@jreback
Copy link
Contributor

jreback commented May 24, 2017

oh, so these were not running? hope they pass!

@@ -202,6 +202,16 @@ def read_excel(io, sheet_name=0, header=0, skiprows=None, skip_footer=0,
dtype=None, true_values=None, false_values=None, engine=None,
squeeze=False, **kwds):

# Can't use _deprecate_kwarg since sheetname=None has a special meaning
if sheet_name is 0 and 'sheetname' in kwds:
Copy link
Contributor

Choose a reason for hiding this comment

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

is is for identity. ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we want that here. sheet_name could be a str, int, or None and we don't want to raise a TypeError. Just checking whether they changed the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although, is that a CPython specific thing, pre-defining some integer objects? Maybe I should change it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it is specific to CPython. I'll update.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, is only works at all because of the int cache. It's almost never what anyone wants.

@codecov
Copy link

codecov bot commented May 24, 2017

Codecov Report

Merging #16478 into master will increase coverage by 0.39%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16478      +/-   ##
==========================================
+ Coverage   90.42%   90.81%   +0.39%     
==========================================
  Files         161      161              
  Lines       51029    51038       +9     
==========================================
+ Hits        46144    46352     +208     
+ Misses       4885     4686     -199
Flag Coverage Δ
#multiple 88.65% <83.33%> (+0.39%) ⬆️
#single 40.16% <16.66%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/io/excel.py 80.49% <83.33%> (+18.17%) ⬆️
pandas/core/series.py 94.9% <0%> (+0.18%) ⬆️
pandas/util/testing.py 80.98% <0%> (+0.19%) ⬆️
pandas/io/parsers.py 95.66% <0%> (+0.34%) ⬆️
pandas/io/formats/excel.py 96.65% <0%> (+22.4%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cbd558...2b4a20a. Read the comment docs.

@codecov
Copy link

codecov bot commented May 24, 2017

Codecov Report

Merging #16478 into master will increase coverage by 0.38%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16478      +/-   ##
==========================================
+ Coverage   90.43%   90.82%   +0.38%     
==========================================
  Files         161      161              
  Lines       51045    51038       -7     
==========================================
+ Hits        46161    46353     +192     
+ Misses       4884     4685     -199
Flag Coverage Δ
#multiple 88.65% <100%> (+0.38%) ⬆️
#single 40.16% <28.57%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/excel.py 80.64% <100%> (+18.32%) ⬆️
pandas/core/window.py 96.24% <0%> (-0.24%) ⬇️
pandas/core/generic.py 92.13% <0%> (-0.04%) ⬇️
pandas/core/ops.py 91.68% <0%> (-0.02%) ⬇️
pandas/core/frame.py 97.69% <0%> (ø) ⬆️
pandas/core/series.py 94.9% <0%> (+0.18%) ⬆️
pandas/util/testing.py 80.98% <0%> (+0.19%) ⬆️
pandas/io/parsers.py 95.66% <0%> (+0.32%) ⬆️
pandas/io/feather_format.py 87.87% <0%> (+2.16%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e81f3cc...a3bcbd1. Read the comment docs.

@TomAugspurger TomAugspurger force-pushed the excel-tests branch 2 times, most recently from 4a5fa36 to f8ef9fa Compare May 24, 2017 21:28
Since sheetname=None has a special meaning, we can't use the deprecate_kwargs
decorator. We instead handle it in read_excel.
Reader / writer may depend on filename and engine. Set these on
the reader and writer before round-tripping.
@jreback
Copy link
Contributor

jreback commented May 25, 2017

ahh this is fixing up after #16442?

@TomAugspurger
Copy link
Contributor Author

Yeah, 11bed21 fixes that. Would have been an unfortunate breakage :/

@TomAugspurger
Copy link
Contributor Author

TomAugspurger commented May 26, 2017

Ugh. That random matplotlib failure is spreading: https://ci.appveyor.com/project/pandas-dev/pandas/build/1.0.2225/job/6lg79jfhas0l9qiw#L1128 (I hadn't seen it on windows yet)

@jreback ok to merge? Or can you restart appveyor?

@jreback
Copy link
Contributor

jreback commented May 26, 2017

yep

@TomAugspurger TomAugspurger merged commit 75c8698 into pandas-dev:master May 26, 2017
@jorisvandenbossche
Copy link
Member

@TomAugspurger You will have to split this commit if you want to backport this PR, as the sheetname change is only targetted for 0.21.0

@TomAugspurger
Copy link
Contributor Author

@TomAugspurger You will have to split this commit if you want to backport this PR, as the sheetname change is only targetted for 0.21.0

I hadn't thought of that... I think I'll not backport it then, unless there are objections.

@TomAugspurger TomAugspurger modified the milestones: 0.21.0, 0.20.2 May 29, 2017
@jorisvandenbossche
Copy link
Member

It's only about some excel test not running on the 0.20.x branch? That sounds OK to me to not backport if we don't have any excel related changes in 0.20.x

@TomAugspurger TomAugspurger deleted the excel-tests branch May 29, 2017 20:43
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
* TST: Fix excel test discovery

* BUG: Handle sheetname deprecation directly

Since sheetname=None has a special meaning, we can't use the deprecate_kwargs
decorator. We instead handle it in read_excel.

* TST/BUG: Ensure pathlib roundtrip uses right params

Reader / writer may depend on filename and engine. Set these on
the reader and writer before round-tripping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Excel read_excel, to_excel Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some excel tests aren't being picked up
4 participants