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: Move plotting related tests to tests/plotting #13621

Merged
merged 1 commit into from
Jul 22, 2016

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jul 11, 2016

Because test_graphics is getting huge, split them based on data types under tests/plotting to make visualization related tests easier.

@sinhrks sinhrks added Testing pandas testing functions or related to the test suite Clean labels Jul 11, 2016
@sinhrks sinhrks added this to the 0.19.0 milestone Jul 11, 2016
@jorisvandenbossche
Copy link
Member

@sinhrks Looks good!

While we are in splitting modus, maybe also split the tests for 'other' dataframe/series methods (hist/boxplot) on the one hand, and the 'misc' functions on the other hand?



"""
These tests are for ``DataFrame.hist``, ``DataFrame.boxplot`` and
other miscellaneous plots.
`Dataframe.plot`` and ``Series.plot`` are tested in test_graphics.py
`Dataframe.plot`` and ``Series.plot`` are tested in
test_frame.py and test_series.py
Copy link
Member

Choose a reason for hiding this comment

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

In this file it makes maybe more sense to split the tests in classes regarding hist vs boxplot tests, instead of series vs dataframe tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

good idea. How about the following structure?

  • .plot (previously test_graphics)
    • test_series
    • test_frame
    • test_groupby
  • others (previously test_graphics_others)
    • test_legacy_hist
    • test_legacy_boxplot
    • test_misc

CC: @TomAugspurger

Copy link
Contributor

Choose a reason for hiding this comment

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

Only issue with that is the tests that use the data structures from setUp. Could make a common base class for those.

Copy link
Member

Choose a reason for hiding this comment

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

@TomAugspurger I don't think that is a problem, indeed easy to make a base class, and there is already a common file

@sinhrks Is there a reason to call it test_legacy_hist instead of test_hist? As we did not really officially deprecate them? And they are still used in the docs (but that is a very minor comment :-))

Copy link
Member Author

Choose a reason for hiding this comment

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

Not specific, I intended to clarify the differences between normal plot and boxplot/hist methods. Using boxplot_method and others.

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Jul 12, 2016

And travis is failing because of lint issues

@codecov-io
Copy link

codecov-io commented Jul 12, 2016

Current coverage is 84.38%

Merging #13621 into master will not change coverage

@@             master     #13621   diff @@
==========================================
  Files           142        142          
  Lines         51235      51235          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43235      43235          
  Misses         8000       8000          
  Partials          0          0          

Powered by Codecov. Last updated by c9a27ed...89c8b13

@sinhrks
Copy link
Member Author

sinhrks commented Jul 13, 2016

Updated to use following file names:

  • .plot (previously test_graphics)
    • test_series
    • test_frame
    • test_groupby
  • others (previously test_graphics_others)
    • test_hist_method
    • test_boxplot_method
    • test_misc

@jreback
Copy link
Contributor

jreback commented Jul 13, 2016

@sinhrks this is going to conflict with #13147

If you prefer I can rebase after we merge this, or is other way around ok?

@sinhrks
Copy link
Member Author

sinhrks commented Jul 13, 2016

I'm willing to rebase after #13147:)

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Jul 14, 2016

Question: do we actually want it in tests/plotting or in plotting/tests ? We seem to vary a bit between different submodules (eg tseries, tools, io have their tests inside the module, which I pesonally like)

@sinhrks
Copy link
Member Author

sinhrks commented Jul 14, 2016

Whichever possible, pandas/tools/tests/plotting or pandas/tests/plotting. Newly created submodules (like indexes, types ) have its tests under pandas/tests/.

@jorisvandenbossche
Copy link
Member

I actually meant pandas/plotting/tests (in the understanding that you were planning to move the plotting code to pandas/plotting in another PR).
I personally like that tests are close the the implementation, certainly for things that are rather independent modules (like io, and which is the case for plotting as well I think).

@sinhrks
Copy link
Member Author

sinhrks commented Jul 14, 2016

Yeah it'll be a goal if there is no objections. Shall we move pandas/plotting/tests in this PR (leaving the submodule itself empty), then move actual scripts in #13579 (split for review purpose)?

@sinhrks
Copy link
Member Author

sinhrks commented Jul 22, 2016

Would like to decide the (temporary) namespace to work on. I'm +1 for pandas/tests/plotting for now, and moving pandas/plotting/tests once ready (as moved files are easy to compare different from splitting).

@jorisvandenbossche
Copy link
Member

That's fine for me. This is ready to merge then?

@sinhrks
Copy link
Member Author

sinhrks commented Jul 22, 2016

@jorisvandenbossche yes, related files are not updated after the previous rebase.

@jorisvandenbossche jorisvandenbossche merged commit 9f94e6a into pandas-dev:master Jul 22, 2016
@jorisvandenbossche
Copy link
Member

Merging then!

@sinhrks sinhrks deleted the test_plotting branch July 22, 2016 12:14
@sinhrks sinhrks mentioned this pull request Aug 1, 2016
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants