Skip to content

DOC: Explicitly include "private" ExtensionArray methods in API docs #27279

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

Conversation

tadeja
Copy link
Contributor

@tadeja tadeja commented Jul 7, 2019

@tadeja tadeja force-pushed the docs-for-private-extensionarray-methods branch from 36b6efb to e8c5df7 Compare July 8, 2019 22:36
@tadeja tadeja marked this pull request as ready for review July 8, 2019 23:17
@jreback jreback added Docs ExtensionArray Extending pandas with custom dtypes or arrays. labels Jul 9, 2019
@jreback
Copy link
Contributor

jreback commented Jul 9, 2019

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.

Thanks for working on this!

See Also
--------
numpy.take
api.extensions.take
Copy link
Member

Choose a reason for hiding this comment

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

Can you leave the pandas. here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jorisvandenbossche
I've removed pandas. to resolve the Docstring validation error. From CI:

pandas/core/arrays/base.py(770,): error SA05: pandas.api.extensions.ExtensionArray.take: pandas.api.extensions.take in `See Also` section does not need `pandas` prefix, use api.extensions.take instead.

What do you recommend to do?

Copy link
Contributor

Choose a reason for hiding this comment

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

I dislike this listing rule in this case. I believe it's to ensure we consistently do things like DataFrame.merge instead of pandas.DataFrame.merge.

But I think the (redundant) namespacing here is helpful here since I wouldn't immediately associate api... with pandas.api....

Regardless, for now we can just please the linter.

@TomAugspurger TomAugspurger added this to the 0.25.0 milestone Jul 15, 2019
@TomAugspurger TomAugspurger merged commit 2ed1f28 into pandas-dev:master Jul 15, 2019
@TomAugspurger
Copy link
Contributor

@tadeja can you take a look at the built docs at http://pandas-docs.github.io/pandas-docs-travis/reference/api/pandas.api.extensions.ExtensionArray.html#pandas.api.extensions.ExtensionArray when the CI build on master for this finishes?

@tadeja
Copy link
Contributor Author

tadeja commented Jul 16, 2019

Thanks! It looks good over here:
https://dev.pandas.io/reference/api/pandas.api.extensions.ExtensionArray.html#pandas.api.extensions.ExtensionArray
(Date: Jul 16, 2019 Version: 0.25.0rc0+76.g26bd34df2)

... while this one appears unchanged and I am just wondering if that's going to be OK:
http://pandas-docs.github.io/pandas-docs-travis/reference/api/pandas.api.extensions.ExtensionArray.html#pandas.api.extensions.ExtensionArray
(Date: Jun 18, 2019 Version: 0.25.0.dev0+752.g49f33f0d)

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jul 16, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explicitly include "private" ExtensionArray methods in API docs
4 participants