-
Notifications
You must be signed in to change notification settings - Fork 902
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
Custom Sphinx Extension: PandasCompat
#8643
Conversation
This PR is at primitive stage, but should be ready to receive reviews (both code-wise and page aesthetics). |
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #8643 +/- ##
===============================================
Coverage ? 10.67%
===============================================
Files ? 109
Lines ? 18670
Branches ? 0
===============================================
Hits ? 1993
Misses ? 16677
Partials ? 0 Continue to review full report at Codecov.
|
@galipremsagar I think it would also be great to review this extension in the context of pydata sphinx theme. |
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.
This is great! Also you weren't kidding, the Sphinx TODO example covers our needs here almost exactly. Since you largely just mimicked it I don't have a ton to comment on, but I learned a lot reading it.
@vyasr could you have another look at it before we merge this? |
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.
This looks great to me! One minor comment @isVoid if you can easily verify that it would be nice but it's not a blocker.
Once this is merged we need to make a plan for making use of this new directive in the rest of our docstrings, how should we do that? Perhaps we should make a follow-up issue to track that work.
Pandas Compatibility Notes | ||
========================== | ||
|
||
.. pandas-compat-list:: |
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 believe the trailing ::
is redundant in this case since you're not passing any arguments, but it's probably fine to leave it as is unless you're in a position to test and remove fairly quickly.
|
@gpucibot merge |
This PR adds a custom sphinx extension
PandasCompat
. This extension adds two new rST directives to cudf docs code base.The former creates a new section in cudf docstring specifically to demonstrate the deviation that cudf has to pandas. The second directive collects all these sections and compile as a separate list. For example, in
MultiIndex.get_loc
:The new section is rendered as an
Admonition
tag.And there's a new separate page called
Pandas Compatibility Notes
that collects all notes in a single page.Note that we can introduce a link in this page to the original source.