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

CLN: Add teardowns for some benchmarks (#17616) #18388

Merged

Conversation

dmanikowski-reef
Copy link
Contributor

@dmanikowski-reef dmanikowski-reef commented Nov 20, 2017

Added teardown functions for hdfstore, io and packers asv benchmarks.

self.df.to_csv(self.fname)

def teardown(self):
os.remove(self.fname)
Copy link
Member

Choose a reason for hiding this comment

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

This can raise an error if os.remove function fails. I would suggest that you try to catch any errors here in a try-except (some of the other files that you modified do this).

Copy link
Contributor

Choose a reason for hiding this comment

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

I would try except all of these teardowns, maybe create a generic function at the top of this file to do so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or maybe I should create one base class which only implements teardown method and all bench classes would inherit after it. @gfyoung, @jreback - do you consider this a good idea? Or generic function at the top would be better?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep I like that better actually. I think all of the classes that need it are in this module anyhow.

@@ -167,5 +167,5 @@ Other
^^^^^

- Improved error message when attempting to use a Python keyword as an identifier in a numexpr query (:issue:`18221`)
-
- Added teardown functions in asv benchmarks for hdfstore, io and packers benches.
Copy link
Member

@gfyoung gfyoung Nov 20, 2017

Choose a reason for hiding this comment

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

@jreback @jorisvandenbossche : Do we do whatsnew for these types of changes?

Copy link
Member

Choose a reason for hiding this comment

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

Typically not. There are a bit two conflicting aspects of the whatsnew file: informing users about changes/fixes (and then this is not needed in there as no user impact) and valuing contributors (by having their PR listed in the whathsnew note).

Copy link
Member

@gfyoung gfyoung Nov 20, 2017

Choose a reason for hiding this comment

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

Okay, just wanted to double-check. Given that is not user-facing, @dmanikowski-reef , could you revert your addition to the whatsnew ?

@jorisvandenbossche : Not sure if they have to be conflicting (e.g. could we list the PR's accepted between releases at the end of the whatsnew?) - however, can always continue this conversation outside of this PR if need be.

@gfyoung gfyoung added the Clean label Nov 20, 2017
@jorisvandenbossche jorisvandenbossche added the Benchmark Performance (ASV) benchmarks label Nov 20, 2017
@jorisvandenbossche
Copy link
Member

Apart from the comment of @gfyoung about the try .. except, this looks good!

@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #18388 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18388      +/-   ##
==========================================
- Coverage   91.36%   91.34%   -0.02%     
==========================================
  Files         164      164              
  Lines       49718    49721       +3     
==========================================
- Hits        45426    45420       -6     
- Misses       4292     4301       +9
Flag Coverage Δ
#multiple 89.14% <ø> (ø) ⬆️
#single 39.61% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️
pandas/plotting/_core.py 82.49% <0%> (+0.03%) ⬆️

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 1647a72...2656c58. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #18388 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18388      +/-   ##
==========================================
- Coverage   91.36%   91.34%   -0.02%     
==========================================
  Files         164      164              
  Lines       49730    49730              
==========================================
- Hits        45435    45426       -9     
- Misses       4295     4304       +9
Flag Coverage Δ
#multiple 89.14% <ø> (ø) ⬆️
#single 39.62% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

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 509e03c...ddbd767. Read the comment docs.

Added teardowns for hdfstore, io and packers benchmarks.
@dmanikowski-reef
Copy link
Contributor Author

Hey guys,
Is there anything else I should do for this patch to be reviewed again or just wait?

@jorisvandenbossche jorisvandenbossche merged commit 492040b into pandas-dev:master Nov 23, 2017
@jorisvandenbossche
Copy link
Member

Thanks!

or just wait?

Pinging (like you did) can help, as there are many PRs and we have to check them to see if something has been update or not. Or, adding new commits to the branch (instead of amending the original commit) will also generate a notification, so that can also help (and it also helps in seeing what you updated since the last review).

@jorisvandenbossche jorisvandenbossche added this to the 0.22.0 milestone Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks Clean
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add teardowns in asv benchmarks
4 participants