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

Fix doxygen warnings #1317

Merged
merged 13 commits into from
Sep 1, 2023
Merged

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Aug 1, 2023

Description

This PR fixes all doxygen warnings from building the C++ documentation.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vyasr vyasr added doc Documentation non-breaking Non-breaking change labels Aug 1, 2023
@vyasr vyasr requested a review from a team as a code owner August 1, 2023 01:00
@vyasr vyasr self-assigned this Aug 1, 2023
@vyasr vyasr requested review from rongou and bdice August 1, 2023 01:00
@github-actions github-actions bot added the cpp Pertains to C++ code label Aug 1, 2023
bdice
bdice previously requested changes Aug 1, 2023
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

A handful of comments. Most are small but a couple are blocking so I'll request changes.

include/rmm/device_buffer.hpp Outdated Show resolved Hide resolved
include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
include/rmm/exec_policy.hpp Outdated Show resolved Hide resolved
include/rmm/mr/device/fixed_size_memory_resource.hpp Outdated Show resolved Hide resolved
include/rmm/mr/device/logging_resource_adaptor.hpp Outdated Show resolved Hide resolved
include/rmm/mr/device/statistics_resource_adaptor.hpp Outdated Show resolved Hide resolved
include/rmm/mr/host/pinned_memory_resource.hpp Outdated Show resolved Hide resolved
include/rmm/cuda_device.hpp Outdated Show resolved Hide resolved
include/rmm/device_buffer.hpp Outdated Show resolved Hide resolved
include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
include/rmm/device_uvector.hpp Show resolved Hide resolved
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

I didn't make it all the way through. I definitely value fixing cases where things were undocumented that really should be, or that had // documents that don't show up in Doxygen. But there's a lot of irritating superfluous documentation in this PR and a lot of duplication (@brief == @return) that I would rather avoid.

Can the warnings be suppressed in other ways? Can we just live with or ignore some warnings?

include/rmm/cuda_device.hpp Show resolved Hide resolved
include/rmm/cuda_device.hpp Outdated Show resolved Hide resolved
include/rmm/cuda_device.hpp Outdated Show resolved Hide resolved
include/rmm/cuda_stream_view.hpp Outdated Show resolved Hide resolved
include/rmm/cuda_stream_view.hpp Outdated Show resolved Hide resolved
include/rmm/device_buffer.hpp Outdated Show resolved Hide resolved
include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
include/rmm/exec_policy.hpp Outdated Show resolved Hide resolved
include/rmm/logger.hpp Show resolved Hide resolved
@vyasr
Copy link
Contributor Author

vyasr commented Aug 2, 2023

I've defined ALIASES for @brief + @return as requested, and also for copy/move constructors/assignment. For assignment operators it's helpful since it turns a 5 line docstring into a short one-liner. For the constructors I'm not convinced it's a good idea; it doesn't improve brevity or readability and it introduces some extra cognitive overload (a couple more commands). The only (very minor IMO) benefit is that it ensure that all those functions are documented identically across all classes. I'm curious to hear how others feel, but I'm inclined to remove those.

@bdice
Copy link
Contributor

bdice commented Aug 4, 2023

I'm curious to hear how others feel, but I'm inclined to remove those.

I don't feel strongly about how this is implemented, I might be weakly in favor of removing them and using "normal" Doxygen rather than aliases. I'd approve it either way though.

@harrism
Copy link
Member

harrism commented Aug 15, 2023

@vyasr have you seen doxygen Member Groups? I just ran across them. Might be useful for group-documenting defaulted ctors/methods, using declarations, etc.? https://www.doxygen.nl/manual/grouping.html#memgroup

@vyasr
Copy link
Contributor Author

vyasr commented Aug 17, 2023

No, I haven't seen those before, only the module-level groups. That certainly could be helpful for improving the documentation.

@vyasr vyasr mentioned this pull request Aug 17, 2023
3 tasks
@vyasr
Copy link
Contributor Author

vyasr commented Aug 28, 2023

I've addressed some of the requests made during review of this PR. In the interest of making what's left for this PR actionable, here are the outstanding issues that I see, along with potential unapplied mitigations. Then we can evaluate whether any of the issues with a solution are dealbreakers:

  • Documenting copy/move constructors/assignments, even if they are defined as default: these are required, but I've added an alias to at least reduce the duplication
  • device_scalar unused using declarations: I've left these docs in for now, but I think we could remove these aliases altogether in a follow-up PR because they are unused. I didn't want to do it in this PR because it would technically be a breaking change

Aside from that I think that aliases and some cleanup have resolved the worst remaining offenders from the first pass of changes.

@harrism @bdice @wence- WDYT?

@vyasr vyasr requested review from harrism, wence- and bdice August 29, 2023 03:57
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Looking good. Some suggestions for type documentation and a couple of corrections.

include/rmm/cuda_device.hpp Outdated Show resolved Hide resolved
include/rmm/device_buffer.hpp Outdated Show resolved Hide resolved
include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
include/rmm/mr/device/logging_resource_adaptor.hpp Outdated Show resolved Hide resolved
include/rmm/mr/device/polymorphic_allocator.hpp Outdated Show resolved Hide resolved
include/rmm/mr/device/polymorphic_allocator.hpp Outdated Show resolved Hide resolved
include/rmm/mr/device/polymorphic_allocator.hpp Outdated Show resolved Hide resolved
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Some more minor issues, but @harrism covered most of them.

include/rmm/device_scalar.hpp Outdated Show resolved Hide resolved
vyasr and others added 3 commits August 30, 2023 14:47
Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>
Co-authored-by: Lawrence Mitchell <wence@gmx.li>
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for pushing it through!

@wence- wence- dismissed bdice’s stale review September 1, 2023 10:12

All comments/issues addressed

@vyasr
Copy link
Contributor Author

vyasr commented Sep 1, 2023

/merge

@rapids-bot rapids-bot bot merged commit 93e616a into rapidsai:branch-23.10 Sep 1, 2023
44 checks passed
@vyasr vyasr deleted the doc/fix_doxygen_warnings branch September 1, 2023 17:24
@vyasr vyasr mentioned this pull request Sep 25, 2023
3 tasks
rapids-bot bot pushed a commit that referenced this pull request Sep 25, 2023
doxygen catches more doc issues (of the types fixed in #1317) when more build outputs are turned on, which is indicative of some bugs/limitations in doxygen. XML builds will be necessary to leverage Breathe (see #1324) so this PR enables XML builds and fixes the associated issues.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Rong Ou (https://github.com/rongou)

URL: #1348
rapids-bot bot pushed a commit that referenced this pull request Nov 2, 2023
This PR leverages [Breathe](https://breathe.readthedocs.io/en/latest/) to pull the rmm C++ API documentation into the python Sphinx docs build, generating a single unified build of the documentation that supports cross-linking between language libraries and also simplifies cross-linking from other libraries that wish to link here (such as higher-level RAPIDS libraries that use both rmm's Python and C++ APIs).

Using Breathe requires changing the doxygen build to generate XML in addition to the usual HTML. It turns out that doxygen catches more doc issues (of the types fixed in #1317) when more build outputs are turned on, which is indicative of some bugs/limitations in doxygen, but nonetheless I've fixed the additional issues in this PR as well.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Bradley Dice (https://github.com/bdice)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp Pertains to C++ code doc Documentation non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants