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

DOC, TST: Document and Test Functions in dtypes/common.py #16237

Merged
merged 2 commits into from
May 4, 2017

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented May 4, 2017

Title is self-explanatory.

Closes #15895.

The testing of this module was especially lacking
with the exception of is_dtype_equal and pandas_dtype.
@gfyoung
Copy link
Member Author

gfyoung commented May 4, 2017

When reviewing, please note the TODO's that I added along the way. Those I think are certainly up for discussion in terms of cleaning up the API and subsequent PR's.

@codecov
Copy link

codecov bot commented May 4, 2017

Codecov Report

Merging #16237 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16237      +/-   ##
==========================================
+ Coverage   90.24%   90.24%   +<.01%     
==========================================
  Files         164      164              
  Lines       50894    50890       -4     
==========================================
- Hits        45930    45927       -3     
+ Misses       4964     4963       -1
Flag Coverage Δ
#multiple 88.03% <100%> (+0.01%) ⬆️
#single 40.3% <87.5%> (-0.1%) ⬇️
Impacted Files Coverage Δ
pandas/core/dtypes/common.py 94.75% <100%> (+1.24%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.58% <0%> (-0.1%) ⬇️
pandas/_version.py 44.65% <0%> (+1.9%) ⬆️

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 2002da3...a552110. Read the comment docs.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

nice comments. a minor points. merging. can do a followup for minor comments if you'd like.

def test_is_categorical():
cat = pd.Categorical([1, 2, 3])
assert com.is_categorical(cat)
assert com.is_categorical(pd.Series(cat))
Copy link
Contributor

Choose a reason for hiding this comment

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

add CategoricalIndex

Copy link
Member Author

Choose a reason for hiding this comment

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

I might have wanted to add this before you merged, but oh well, can do in follow-up.


def is_period(array):
Copy link
Contributor

Choose a reason for hiding this comment

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

this was around before the is_datetime64tz_dtype, so certainly could try to eliminate things (separate pr). the distinctions was meant to be that this would do inference on a list-like as well (where the _dtype would only work on an array).

@jreback jreback added Docs Testing pandas testing functions or related to the test suite labels May 4, 2017
@jreback jreback added this to the 0.20.0 milestone May 4, 2017
@jreback
Copy link
Contributor

jreback commented May 4, 2017

When reviewing, please note the TODO's that I added along the way. Those I think are certainly up for discussion in terms of cleaning up the API and subsequent PR's.

best maybe to open a separate issue for this.

@jreback jreback merged commit 1a0c878 into pandas-dev:master May 4, 2017
@gfyoung
Copy link
Member Author

gfyoung commented May 4, 2017

best maybe to open a separate issue for this.

Sounds good.

@jreback
Copy link
Contributor

jreback commented May 4, 2017

thanks!

@gfyoung gfyoung deleted the pandas-types-common-doc branch May 4, 2017 21:39
gfyoung added a commit to forking-repos/pandas that referenced this pull request May 4, 2017
gfyoung added a commit to forking-repos/pandas that referenced this pull request May 4, 2017
jreback pushed a commit that referenced this pull request May 4, 2017
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
…#16237)

* DOC: Document pandas.core.dtypes.common

Closes pandas-devgh-15895.

* TST: Add tests for pandas.core.dtypes.common

The testing of this module was especially lacking
with the exception of is_dtype_equal and pandas_dtype.
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
…#16237)

* DOC: Document pandas.core.dtypes.common

Closes pandas-devgh-15895.

* TST: Add tests for pandas.core.dtypes.common

The testing of this module was especially lacking
with the exception of is_dtype_equal and pandas_dtype.
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
yarikoptic added a commit to neurodebian/pandas that referenced this pull request Jul 12, 2017
Version 0.20.0

* tag 'v0.20.0': (742 commits)
  RLS: v0.20.0
  DOC: Whatsnew cleanup (pandas-dev#16245)
  TST: Test CategoricalIndex in test_is_categorical (pandas-dev#16243)
  TST: xfail some bottleneck on windows (pandas-dev#16240)
  DOC, TST: Document and Test Functions in dtypes/common.py (pandas-dev#16237)
  TST: Remove __init__ statements in testing (pandas-dev#16238)
  DOC: don't include all methods/attributes of IntervalIndex (pandas-dev#16221)
  PKG: Fix ModuleNotFoundError: No module named 'pandas.formats' (pandas-dev#16239)
  RLS: v0.20.0rc2
  CLN: make submodules of pandas.util private (pandas-dev#16223)
  MAINT: Remove tm.TestCase from testing (pandas-dev#16225)
  MAINT: Complete Conversion to Pytest Idiom (pandas-dev#16201)
  DOC: add whatsnew for 0.21.0
  DEPR: correct deprecation message for datetools (pandas-dev#16202)
  API Change repr name for table schema (pandas-dev#16204)
  DOC: Remove various warnings from doc build (pandas-dev#16206)
  DOC: add whatsnew for v0.20.1
  BUG: Fixed renaming of falsey names in build_table_schema (pandas-dev#16205)
  COMPAT: ensure proper extension dtype's don't pickle the cache (pandas-dev#16207)
  REF: register custom DisplayFormatter for table schema (pandas-dev#16198)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants