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

Resolving unlinked type shorthands in cudf doc #7416

Merged
merged 4 commits into from
Mar 8, 2021

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented Feb 20, 2021

Closes #7320

This PR adds an additional preprocessing step in documentation generation. It traverses through the doctree generated by Sphinx and replaces unresolved type short hands with proper target reference, while keeping the shortened name for display text.

An additional preprocessing step is added to ignore internal types to APIs facing both internally and externally, such as cudf.core.column.string.StringColumn

cupy API reference is added to intersphinx.

Minor changes:

  • Fixes a small doc bug in frame.copy

@isVoid isVoid added 3 - Ready for Review Ready for review by team doc Documentation Python Affects Python cuDF API. non-breaking Non-breaking change labels Feb 20, 2021
@isVoid isVoid self-assigned this Feb 20, 2021
@isVoid isVoid requested a review from a team as a code owner February 20, 2021 00:27
@isVoid isVoid added 2 - In Progress Currently a work in progress and removed 3 - Ready for Review Ready for review by team labels Feb 20, 2021
@isVoid isVoid added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Feb 20, 2021
@codecov
Copy link

codecov bot commented Feb 20, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-0.19@580f9a2). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##             branch-0.19    #7416   +/-   ##
==============================================
  Coverage               ?   82.26%           
==============================================
  Files                  ?      101           
  Lines                  ?    17244           
  Branches               ?        0           
==============================================
  Hits                   ?    14185           
  Misses                 ?     3059           
  Partials               ?        0           

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 580f9a2...d12930e. Read the comment docs.

reftarget_aliases = {
"cudf.Series": ("cudf.core.series.Series", "cudf.Series"),
"cudf.Index": ("cudf.core.index.Index", "cudf.Index"),
"cupy.core.core.ndarray": ("cupy.ndarray", "cupy.ndarray"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Both elements of the tuple here are the same -- is that intended?

Copy link
Contributor Author

@isVoid isVoid Mar 2, 2021

Choose a reason for hiding this comment

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

Yeah, because in cupy sphinx doc cupy.core.core.ndarray is mapped to cupy.ndarray. This is to link to the right entry. The second item is just the display text.

docs/cudf/source/conf.py Outdated Show resolved Hide resolved
@isVoid isVoid requested a review from shwina March 8, 2021 19:51
@shwina
Copy link
Contributor

shwina commented Mar 8, 2021

@gpucibot merge

@shwina
Copy link
Contributor

shwina commented Mar 8, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit ddc0990 into rapidsai:branch-0.19 Mar 8, 2021
hyperbolic2346 pushed a commit to hyperbolic2346/cudf that referenced this pull request Mar 25, 2021
Closes rapidsai#7320 

This PR adds an additional preprocessing step in documentation generation. It traverses through the doctree generated by Sphinx and replaces unresolved type short hands with proper target reference, while keeping the shortened name for display text.

An additional preprocessing step is added to ignore internal types to APIs facing both internally and externally, such as `cudf.core.column.string.StringColumn`

`cupy` API reference is added to intersphinx.

Minor changes:
- Fixes a small doc bug in `frame.copy`

Authors:
  - Michael Wang (@isVoid)

Approvers:
  - Ashwin Srinath (@shwina)

URL: rapidsai#7416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team doc Documentation non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Broken reference in StringMethod and CategoricalAccessor
2 participants