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

Generate unified Python/C++ docs #13846

Merged
merged 80 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
2ebf609
Add breathe dep
vyasr Aug 9, 2023
efdd554
Add all libcudf doc pages
vyasr Aug 9, 2023
a2a5598
Remove extraneous file
vyasr Aug 9, 2023
91db8c7
Temporarily allow building with warnings so that CI can complete and …
vyasr Aug 10, 2023
0ec51ea
Temporarily disable CI doxygen check
vyasr Aug 10, 2023
0aee382
Fix cmake format
vyasr Aug 10, 2023
fd6f9e7
Start handling more missing refs
vyasr Nov 8, 2023
3229d52
Add lexer for pseudocode
vyasr Nov 8, 2023
ec0d1ba
Add the default stream to a group and link it
vyasr Nov 8, 2023
fe34bf3
Add a few more types to ignore
vyasr Nov 9, 2023
86ca9d5
Add extra intersphinx lookup step
vyasr Nov 9, 2023
884c5b8
Add more types to ignore
vyasr Nov 9, 2023
269f7ba
Add more robust logic for parsing namespaces
vyasr Nov 9, 2023
4e25e15
Add expressions to Sphinx
vyasr Nov 10, 2023
81eb699
Ignore detail APIs for now
vyasr Nov 10, 2023
327ec95
Add io_types to Sphinx docs
vyasr Nov 10, 2023
e100ee4
Also ignore md_regex
vyasr Nov 21, 2023
740c4f7
Breathe doesn't support deprecated tag.
vyasr Nov 21, 2023
3c610ed
Add anchors for namespaces
vyasr Nov 21, 2023
fbb1396
Add md_regex page
vyasr Nov 30, 2023
2952b4b
Also search the numeric namespace
vyasr Nov 30, 2023
7383e92
Add range_window_bounds to group
vyasr Nov 30, 2023
4ba01d3
Add nvtext namespace and clean up namespace logic
vyasr Nov 30, 2023
fcc9fc3
Ignore kafka objects
vyasr Nov 30, 2023
a182b49
Make sure to use the template-stripped reftarget when searching inter…
vyasr Nov 30, 2023
5ed9a0d
Add spans to Sphinx
vyasr Nov 30, 2023
0850b1c
Ignore dlmanagedtensor for now
vyasr Nov 30, 2023
7dcf8f9
Add tdigest to Sphinx
vyasr Nov 30, 2023
2c111eb
Ignore char_utf8
vyasr Nov 30, 2023
7b690f8
Also account for std namespaced objects
vyasr Dec 1, 2023
de3e5de
Add a couple more specific names to remap
vyasr Dec 1, 2023
f0e030e
Add io::datasource
vyasr Dec 1, 2023
153a695
Repoint intersphinx to the online docs
vyasr Dec 1, 2023
6a72a57
Add missing orc types
vyasr Dec 1, 2023
b3c4157
Ignore bpe pairs impl
vyasr Dec 1, 2023
6ddaa4e
Add newly added doxygen namespaces to Sphinx
vyasr Dec 1, 2023
7ceb302
Remove unused ingroup from src file and ignore symbol instead
vyasr Dec 2, 2023
4f19a29
Ignore TypeKind
vyasr Dec 2, 2023
b224641
Fix header
vyasr Dec 2, 2023
93a432d
Add script to parse xml and fix known issues
vyasr Dec 15, 2023
6817217
Parse more precisely and remove potential SFINAE duplicates
vyasr Dec 15, 2023
9ea9c75
Remove nonexistent group from Sphinx
vyasr Dec 15, 2023
3ed3a2f
Simplify script
vyasr Dec 15, 2023
8151aad
Make checks strict again
vyasr Dec 15, 2023
da266dc
Temporarily move parsing script
vyasr Dec 15, 2023
06625bf
Moving parsing into conf.py
vyasr Dec 15, 2023
527181f
Remove outdated reference
vyasr Dec 15, 2023
59c5844
Remove ignores that are no longer necessary
vyasr Dec 15, 2023
90c63e5
Add links for dlpack
vyasr Dec 15, 2023
238a553
Remove old test changes
vyasr Dec 15, 2023
895caf8
Put back detail ignore
vyasr Dec 15, 2023
15942d4
Temporarily disable text docs for cudf
vyasr Dec 16, 2023
0663d2e
Make table compatible with text output
vyasr Dec 16, 2023
90c89c5
Optimize missing reference hook
vyasr Dec 17, 2023
5161a3a
Reenable notebooks
vyasr Dec 17, 2023
b4ccc3b
Reenable text builds
vyasr Dec 17, 2023
a90679b
Address PR feedback
vyasr Dec 18, 2023
2edd7ad
Add one more note
vyasr Dec 18, 2023
bd3a9e1
Merge remote-tracking branch 'origin/branch-24.02' into feat/unify_docs
vyasr Dec 18, 2023
42604fa
Match group layout of modules from doxygen HTML
vyasr Dec 18, 2023
5ece824
Reorganize to add in non-API pages
vyasr Dec 18, 2023
0ede73e
Require new Breathe
vyasr Dec 18, 2023
beaceaf
Fix issues with developer guide links
vyasr Dec 18, 2023
7a9581f
Merge remote-tracking branch 'origin/branch-24.02' into feat/unify_docs
vyasr Dec 19, 2023
89ce4dc
Test parallel builds
vyasr Dec 19, 2023
08797fb
Move parallelism flag to build script so that it's not hardcoded in M…
vyasr Dec 19, 2023
cf40777
More optimizations
vyasr Dec 19, 2023
6c2fa6b
Merge branch 'branch-24.02' into feat/unify_docs
vyasr Dec 19, 2023
39bfa1a
Merge branch 'branch-24.02' into feat/unify_docs
vyasr Jan 9, 2024
8ea7a61
Merge remote-tracking branch 'origin/branch-24.02' into feat/unify_docs
vyasr Jan 9, 2024
aab3e86
Fix style
vyasr Jan 9, 2024
ff12064
Merge remote-tracking branch 'origin/branch-24.02' into feat/unify_docs
vyasr Jan 11, 2024
0efd3bc
Put back doxygen HTML generation for now.
vyasr Jan 11, 2024
3f598a7
Fix typo
vyasr Jan 12, 2024
2bcb370
Merge remote-tracking branch 'origin/branch-24.02' into feat/unify_docs
vyasr Jan 16, 2024
7445e50
Merge remote-tracking branch 'origin/branch-24.02' into feat/unify_docs
vyasr Jan 17, 2024
a5bc91a
Fix one more doxygen error
vyasr Jan 17, 2024
b2dae66
Revert all changes that break the doxygen build
vyasr Jan 17, 2024
7f8a50d
Fix a typo
vyasr Jan 17, 2024
13cd4c0
Disable APIs containing tables for now due to failing text builds
vyasr Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

set -euo pipefail

Expand Down Expand Up @@ -40,8 +40,8 @@ popd

rapids-logger "Build Python docs"
pushd docs/cudf
make dirhtml
make text
make dirhtml O="-j 4"
make text O="-j 4"
mkdir -p "${RAPIDS_DOCS_DIR}/cudf/"{html,txt}
mv build/dirhtml/* "${RAPIDS_DOCS_DIR}/cudf/html"
mv build/text/* "${RAPIDS_DOCS_DIR}/cudf/txt"
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- benchmark==1.8.0
- boto3>=1.21.21
- botocore>=1.24.21
- breathe>=4.35.0
- c-compiler
- cachetools
- clang-tools=16.0.6
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- benchmark==1.8.0
- boto3>=1.21.21
- botocore>=1.24.21
- breathe>=4.35.0
- c-compiler
- cachetools
- clang-tools=16.0.6
Expand Down
4 changes: 2 additions & 2 deletions cpp/doxygen/developer_guide/BENCHMARKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ benchmarks in `cpp/benchmarks/copying/scatter.cu`.
In the interest of improving compile time, whenever possible, test source files should be `.cpp`
files because `nvcc` is slower than `gcc` in compiling host code. Note that `thrust::device_vector`
includes device code, and so must only be used in `.cu` files. `rmm::device_uvector`,
`rmm::device_buffer` and the various `column_wrapper` types described in [Testing](TESTING.md)
`rmm::device_buffer` and the various `column_wrapper` types described in [Testing](testing)
vyasr marked this conversation as resolved.
Show resolved Hide resolved
can be used in `.cpp` files, and are therefore preferred in test code over `thrust::device_vector`.

## CUDA Asynchrony and benchmark accuracy
Expand All @@ -37,7 +37,7 @@ performance in repeated iterations.

## Data generation

For generating benchmark input data, helper functions are available at [cpp/benchmarks/common/generate_input.hpp](/cpp/benchmarks/common/generate_input.hpp). The input data generation happens on device, in contrast to any `column_wrapper` where data generation happens on the host.
For generating benchmark input data, helper functions are available at ``cpp/benchmarks/common/generate_input.hpp``. The input data generation happens on device, in contrast to any `column_wrapper` where data generation happens on the host.
* `create_sequence_table` can generate sequence columns starting with value 0 in first row and increasing by 1 in subsequent rows.
* `create_random_column` can generate a column filled with random data. The random data parameters are configurable.
* `create_random_table` can generate a table of columns filled with random data. The random data parameters are configurable.
Expand Down
14 changes: 6 additions & 8 deletions cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# libcudf C++ Developer Guide {#DEVELOPER_GUIDE}

This document serves as a guide for contributors to libcudf C++ code. Developers should also refer
to these additional files for further documentation of libcudf best practices.

* [Documentation Guide](DOCUMENTATION.md) for guidelines on documenting libcudf code.
* [Testing Guide](TESTING.md) for guidelines on writing unit tests.
* [Benchmarking Guide](BENCHMARKING.md) for guidelines on writing unit benchmarks.
This document serves as a guide for contributors to libcudf C++ code.

# Overview

Expand Down Expand Up @@ -135,7 +130,7 @@ Additional style guidelines for libcudf code include:
`1'234'567`. Hexadecimal values should use separators every 4 characters,
like `0x0123'ABCD`.

Documentation is discussed in the [Documentation Guide](DOCUMENTATION.md).
Documentation is discussed in the [Documentation Guide](documentation).

### Includes

Expand Down Expand Up @@ -434,7 +429,7 @@ inputs. The types of those exceptions (e.g. `cudf::logic_error`) are part of the
However, the explanatory string returned by the `what` method of those exceptions is not part of the
API and is subject to change. Calling code should not rely on the contents of libcudf error
messages to determine the nature of the error. For information on the types of exceptions that
libcudf throws under different circumstances, see the [section on error handling](#errors).
libcudf throws under different circumstances, see the [section on error handling](#error-handling).

# libcudf API and Implementation

Expand Down Expand Up @@ -894,6 +889,7 @@ the "breaking" tag. This ensures that the "Breaking" section of the release note
description of what has broken from the past release. Label pull requests that contain deprecations
with the "non-breaking" tag.

(error-handling)=

# Error Handling {#errors}
vyasr marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -1342,6 +1338,8 @@ within the string.

`cudf::type_dispatcher` dispatches to the `string_view` data type when invoked on a `STRING` column.

(utf-8)=

#### UTF-8

The libcudf strings column only supports UTF-8 encoding for strings data.
Expand Down
20 changes: 11 additions & 9 deletions cpp/doxygen/developer_guide/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Doxygen recognizes and parses block comments and performs specialized output for
There are almost 200 commands (also called tags in this document) that doxygen recognizes in comment blocks.
This document provides guidance on which commands/tags to use and how to use them in the libcudf C++ source code.

The doxygen process can be customized using options in the [Doxyfile](../doxygen/Doxyfile).
The doxygen process can be customized using options in the Doxyfile.

Here are some of the custom options in the Doxyfile for libcudf.
| Option | Setting | Description |
Expand Down Expand Up @@ -234,10 +234,10 @@ The following tags should appear near the end of function comment block in the o

| Command | Description |
| ------- | ----------- |
| [\@throw](#throw) | Specify the conditions in which the function may throw an exception |
| [\@tparam](#tparam) | Description for each template parameter |
| [\@param](#param) | Description for each function parameter |
| [\@return](#return) | Short description of object or value returned |
| \@throw | Specify the conditions in which the function may throw an exception |
| \@tparam | Description for each template parameter |
| \@param | Description for each function parameter |
| \@return | Short description of object or value returned |

#### \@throw

Expand Down Expand Up @@ -293,6 +293,8 @@ Include a brief description of what is returned.

Do not include the type of the object returned with the `@return` comment.

(inline-examples)=

### Inline Examples

It is usually helpful to include a source code example inside your comment block when documenting a function or other declaration.
Expand Down Expand Up @@ -378,12 +380,12 @@ The doxygen output includes a _Modules_ page that organizes items into groups sp
These commands can group common functions across header files, source files, and even namespaces.
Groups can also be nested by defining new groups within existing groups.

For libcudf, all the group hierarchy is defined in the [doxygen_groups.h](../include/doxygen_groups.h) header file.
The [doxygen_groups.h](../include/doxygen_groups.h) file does not need to be included in any other source file, because the definitions in this file are used only by the doxygen tool to generate groups in the _Modules_ page.
For libcudf, all the group hierarchy is defined in the ``cpp/include/doxygen_groups.h`` header file.
The doxygen_groups.h file does not need to be included in any other source file, because the definitions in this file are used only by the doxygen tool to generate groups in the _Modules_ page.
Modify this file only to add or update groups.
The existing groups have been carefully structured and named, so new groups should be added thoughtfully.

When creating a new API, specify its group using the [\@ingroup](https://www.doxygen.nl/manual/commands.html#cmdingroup) tag and the group reference id from the [doxygen_groups.h](../include/doxygen_groups.h) file.
When creating a new API, specify its group using the [\@ingroup](https://www.doxygen.nl/manual/commands.html#cmdingroup) tag and the group reference id from the doxygen_groups.h file.

namespace cudf {

Expand Down Expand Up @@ -426,7 +428,7 @@ So include the `@addtogroup` and `@{ ... @}` between the namespace declaration b
Summary of groups tags
| Tag/Command | Where to use |
| ----------- | ------------ |
| `@defgroup` | For use only in [doxygen_groups.h](../include/doxygen_groups.h) and should include the group's title. |
| `@defgroup` | For use only in doxygen_groups.h and should include the group's title. |
| `@ingroup` | Use inside individual doxygen block comments for declaration statements in a header file. |
| `@addtogroup` | Use instead of `@ingroup` for multiple declarations in the same file within a namespace declaration. Do not specify a group title. |
| `@{ ... @}` | Use only with `@addtogroup`. |
Expand Down
7 changes: 5 additions & 2 deletions cpp/include/cudf/io/json.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -72,8 +72,10 @@ enum class json_recovery_mode_t {
*
* Parameters in PANDAS that are unavailable or in cudf:
*
*
* +----------------------+--------------------------------------------------+
* | Name | Description |
* | -------------------- | ------------------------------------------------ |
* +======================+==================================================+
* | `orient` | currently fixed-format |
* | `typ` | data is always returned as a cudf::table |
* | `convert_axes` | use column functions for axes operations instead |
Expand All @@ -84,6 +86,7 @@ enum class json_recovery_mode_t {
* | `date_unit` | only millisecond units are supported |
* | `encoding` | only ASCII-encoded data is supported |
* | `chunksize` | use `byte_range_xxx` for chunking instead |
* +----------------------+--------------------------------------------------+
*/
class json_reader_options {
source_info _source;
Expand Down
Loading
Loading