-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
DOC: Modify IntervalArray/IntervalIndex docstrings to pass validate_docstrings.py #23157
Conversation
Hello @jschendel! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #23157 +/- ##
=======================================
Coverage 92.19% 92.19%
=======================================
Files 169 169
Lines 50954 50954
=======================================
Hits 46975 46975
Misses 3979 3979
Continue to review full report at Codecov.
|
There was a problem hiding this 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)]) |
There was a problem hiding this comment.
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
)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Added |
a066d88
to
af757a0
Compare
git diff upstream/master -u -- "*.py" | flake8 --diff
Didn't materially change any existing content; mostly small modifications and a couple additions.