Skip to content

DOC: Modify IntervalArray/IntervalIndex docstrings to pass validate_docstrings.py #23157

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

Merged
merged 2 commits into from
Oct 24, 2018

Conversation

jschendel
Copy link
Member

  • passes git diff upstream/master -u -- "*.py" | flake8 --diff

Didn't materially change any existing content; mostly small modifications and a couple additions.

@jschendel jschendel added Docs Interval Interval data type labels Oct 14, 2018
@jschendel jschendel added this to the 0.24.0 milestone Oct 14, 2018
@pep8speaks
Copy link

Hello @jschendel! Thanks for submitting the PR.

@codecov
Copy link

codecov bot commented Oct 15, 2018

Codecov Report

Merging #23157 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23157   +/-   ##
=======================================
  Coverage   92.19%   92.19%           
=======================================
  Files         169      169           
  Lines       50954    50954           
=======================================
  Hits        46975    46975           
  Misses       3979     3979
Flag Coverage Δ
#multiple 90.61% <100%> (ø) ⬆️
#single 42.27% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/interval.py 94.63% <ø> (ø) ⬆️
pandas/core/arrays/interval.py 92.81% <100%> (ø) ⬆️

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 1546c35...af757a0. Read the comment docs.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good!

Small comment about adding an actual IntervalArray example to the docstrings.

Do the doctests now pass?
In that case, can you add this file to the doctests that are run in ci/code_checks.sh ?

A new ``IntervalArray`` can be constructed directly from an array-like of
``Interval`` objects:

>>> pd.core.arrays.IntervalArray([pd.Interval(0, 1), pd.Interval(1, 5)])
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep this out of the docs until we know if or how to expose this publicly (which will in any case not be pd.core.arrays.IntervalArray)

Copy link
Member Author

Choose a reason for hiding this comment

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

ci/code_checks.sh won't check the IntervalArray docstring if the Examples section is missing. I've added a TODO note to myself to modify the example once IntervalArray has been made public; can open an issue for it as well if need be.

The issue for making extension arrays public has a milestone of 0.24.0, so I should be able to address this prior to release, and it should just be a matter of pasting the updated call. Can remove the example though, if you'd still prefer that approach.

Copy link
Member Author

Choose a reason for hiding this comment

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

ping @jorisvandenbossche : thoughts on the above?

Copy link
Member

Choose a reason for hiding this comment

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

OK, let's decide about it / clean-up later

@jschendel
Copy link
Member Author

jschendel commented Oct 16, 2018

Added indexes/interval.py and arrays/interval.py to the ci/code_checks.sh. Had to make it ignore some methods that aren't passing yet, but will get to those shortly in a separate PR.

@jorisvandenbossche jorisvandenbossche merged commit f928b46 into pandas-dev:master Oct 24, 2018
@jschendel jschendel deleted the ia-ii-docstrings branch October 25, 2018 02:15
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Interval Interval data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants