-
Notifications
You must be signed in to change notification settings - Fork 903
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix all warnings in Python docs (#13789)
The Sphinx documentation has historically been warning-filled, which makes it difficult to identify when there are real issues like missing APIs. This PR fixes all the current issues and converts warnings to errors during the build, ensuring that doc builds are reliable indicators of issues in the future. I will say that there are a few changes that may not be exactly what we want, particularly in cases of including APIs that may not be documented in exactly the same way in pandas. However, I think we'd be better off merging this PR so that we can get to a 0 warnings state and then work through further improvements in follow-ups where the build will be more robust. Here is an inexhaustive list of the most significant changes: - Adds all missing BaseIndex APIs. The goal of BaseIndex is to provide an abstract interface defining all functions that should match pandas.Index, but up until now some methods were missing. This PR does not implement any new ones, it either lifts existing implementations up from subclasses (where those implementations are generic for all Index types) or it simply defines them as returning NotImplemented. The result is that all methods at least exist so that docs don't complain. - Cleans up the listed APIs in rst files so that all existing APIs are included somewhere and no nonexistent APIs are listed anywhere. APIs that don't have an exact equivalent in the pandas docs are given a new home in these docs. That includes pieces like extension dtypes, which were previously documented in the user guide and therefore weren't part of any summary list (causing warnings). - Fixed missing dependencies for doc notebooks. - Fixed various formatting issues with docstrings, especially around bulleted lists that were missing the requisite spacing to be rendered correctly. - Fixing header ordering (going from level 1 to level 3 headings is a warning in Sphinx) and links in notebooks. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #13789
- Loading branch information
Showing
39 changed files
with
640 additions
and
411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
================ | ||
Extension Dtypes | ||
================ | ||
.. currentmodule:: cudf.core.dtypes | ||
|
||
cuDF supports a number of extension dtypes that build on top of the types that pandas supports. These dtypes are not directly available in pandas, which instead relies on object dtype arrays that run at Python rather than native speeds. The following dtypes are supported: | ||
|
||
|
||
cudf.CategoricalDtype | ||
===================== | ||
.. autosummary:: | ||
:toctree: api/ | ||
:template: autosummary/class_without_autosummary.rst | ||
|
||
CategoricalDtype | ||
|
||
|
||
Properties and Methods | ||
---------------------- | ||
.. autosummary:: | ||
:toctree: api/ | ||
|
||
CategoricalDtype.categories | ||
CategoricalDtype.construct_from_string | ||
CategoricalDtype.deserialize | ||
CategoricalDtype.device_deserialize | ||
CategoricalDtype.device_serialize | ||
CategoricalDtype.from_pandas | ||
CategoricalDtype.host_deserialize | ||
CategoricalDtype.host_serialize | ||
CategoricalDtype.is_dtype | ||
CategoricalDtype.name | ||
CategoricalDtype.ordered | ||
CategoricalDtype.serialize | ||
CategoricalDtype.str | ||
CategoricalDtype.to_pandas | ||
CategoricalDtype.type | ||
|
||
|
||
cudf.Decimal32Dtype | ||
=================== | ||
.. autosummary:: | ||
:toctree: api/ | ||
:template: autosummary/class_without_autosummary.rst | ||
|
||
Decimal32Dtype | ||
|
||
Properties and Methods | ||
---------------------- | ||
.. autosummary:: | ||
:toctree: api/ | ||
|
||
Decimal32Dtype.ITEMSIZE | ||
Decimal32Dtype.MAX_PRECISION | ||
Decimal32Dtype.deserialize | ||
Decimal32Dtype.device_deserialize | ||
Decimal32Dtype.device_serialize | ||
Decimal32Dtype.from_arrow | ||
Decimal32Dtype.host_deserialize | ||
Decimal32Dtype.host_serialize | ||
Decimal32Dtype.is_dtype | ||
Decimal32Dtype.itemsize | ||
Decimal32Dtype.precision | ||
Decimal32Dtype.scale | ||
Decimal32Dtype.serialize | ||
Decimal32Dtype.str | ||
Decimal32Dtype.to_arrow | ||
|
||
cudf.Decimal64Dtype | ||
=================== | ||
.. autosummary:: | ||
:toctree: api/ | ||
:template: autosummary/class_without_autosummary.rst | ||
|
||
Decimal64Dtype | ||
|
||
Properties and Methods | ||
---------------------- | ||
.. autosummary:: | ||
:toctree: api/ | ||
|
||
Decimal64Dtype.ITEMSIZE | ||
Decimal64Dtype.MAX_PRECISION | ||
Decimal64Dtype.deserialize | ||
Decimal64Dtype.device_deserialize | ||
Decimal64Dtype.device_serialize | ||
Decimal64Dtype.from_arrow | ||
Decimal64Dtype.host_deserialize | ||
Decimal64Dtype.host_serialize | ||
Decimal64Dtype.is_dtype | ||
Decimal64Dtype.itemsize | ||
Decimal64Dtype.precision | ||
Decimal64Dtype.scale | ||
Decimal64Dtype.serialize | ||
Decimal64Dtype.str | ||
Decimal64Dtype.to_arrow | ||
|
||
cudf.Decimal128Dtype | ||
==================== | ||
.. autosummary:: | ||
:toctree: api/ | ||
:template: autosummary/class_without_autosummary.rst | ||
|
||
Decimal128Dtype | ||
|
||
Properties and Methods | ||
---------------------- | ||
.. autosummary:: | ||
:toctree: api/ | ||
|
||
Decimal128Dtype.ITEMSIZE | ||
Decimal128Dtype.MAX_PRECISION | ||
Decimal128Dtype.deserialize | ||
Decimal128Dtype.device_deserialize | ||
Decimal128Dtype.device_serialize | ||
Decimal128Dtype.from_arrow | ||
Decimal128Dtype.host_deserialize | ||
Decimal128Dtype.host_serialize | ||
Decimal128Dtype.is_dtype | ||
Decimal128Dtype.itemsize | ||
Decimal128Dtype.precision | ||
Decimal128Dtype.scale | ||
Decimal128Dtype.serialize | ||
Decimal128Dtype.str | ||
Decimal128Dtype.to_arrow | ||
|
||
cudf.ListDtype | ||
============== | ||
.. autosummary:: | ||
:toctree: api/ | ||
:template: autosummary/class_without_autosummary.rst | ||
|
||
ListDtype | ||
|
||
Properties and Methods | ||
---------------------- | ||
.. autosummary:: | ||
:toctree: api/ | ||
|
||
ListDtype.deserialize | ||
ListDtype.device_deserialize | ||
ListDtype.device_serialize | ||
ListDtype.element_type | ||
ListDtype.from_arrow | ||
ListDtype.host_deserialize | ||
ListDtype.host_serialize | ||
ListDtype.is_dtype | ||
ListDtype.leaf_type | ||
ListDtype.serialize | ||
ListDtype.to_arrow | ||
ListDtype.type | ||
|
||
cudf.StructDtype | ||
================ | ||
.. autosummary:: | ||
:toctree: api/ | ||
:template: autosummary/class_without_autosummary.rst | ||
|
||
StructDtype | ||
|
||
Properties and Methods | ||
---------------------- | ||
.. autosummary:: | ||
:toctree: api/ | ||
|
||
StructDtype.deserialize | ||
StructDtype.device_deserialize | ||
StructDtype.device_serialize | ||
StructDtype.fields | ||
StructDtype.from_arrow | ||
StructDtype.host_deserialize | ||
StructDtype.host_serialize | ||
StructDtype.is_dtype | ||
StructDtype.serialize | ||
StructDtype.to_arrow | ||
StructDtype.type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.