Skip to content

[Doc] Fix broken data docs; reenable nitpicky mode - #46279

Merged
can-anyscale merged 13 commits into
ray-project:masterfrom
peytondmurray:fix-broken-data-docs
Jun 27, 2024
Merged

can-anyscale merged 13 commits into
ray-project:masterfrom
peytondmurray:fix-broken-data-docs

Conversation

@peytondmurray

@peytondmurray peytondmurray commented Jun 26, 2024 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

This PR fixes a broken link and type annotation in Ray Train, and re-enables nitpicky mode in the docs.

There were two issues affecting the documentation:

  1. The autosummary of ray.data.dataset.Schema was incorrectly referencing ray.data.Schema
  2. The docstring of Schema contained entries (types and names) under the Attribute section which were already documented using docstrings of their respective properties. The build error that you get when you build the documentation unhelpfully suggested using noindex, but instead we just need to either use the docstrings in Attributes or the docstrings under the property methods, not both.

Related issue number

Reverts #46241. Blocked by #46280.

Checks

@peytondmurray
peytondmurray force-pushed the fix-broken-data-docs branch from 445ffd2 to 70afe44 Compare June 26, 2024 16:01
@peytondmurray
peytondmurray marked this pull request as ready for review June 26, 2024 18:50
@peytondmurray peytondmurray mentioned this pull request Jun 26, 2024
5 of 8 tasks
Comment thread doc/source/data/api/dataset.rst Resolved
Comment thread python/ray/data/dataset.py Resolved

@can-anyscale can-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for fixing!

@can-anyscale
can-anyscale enabled auto-merge (squash) June 26, 2024 23:56
@github-actions github-actions Bot added the go add ONLY when ready to merge, run all tests label Jun 26, 2024
Comment thread doc/source/conf.py
# arising from type annotations. See https://github.com/ray-project/ray/pull/46103
# for additional context.
nitpicky = True
nitpick_ignore_regex = [("py:class", ".*")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happens if we exclude ".*"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We get a bunch of false error messages from trouble that Sphinx has with type generics, which are used as annotations in various places in the code base. There's definitely other ways to deal with this issue, but this is the most straightforward right now.

In the future it might be worth investigating ways to remove this rule, because we'll be better protected against invalid class references, but for now I think this is a good start.

Comment thread python/ray/data/dataset.py Resolved
Comment thread doc/source/data/api/dataset.rst Resolved
Co-authored-by: Balaji Veeramani <[email protected]>
Signed-off-by: Peyton Murray <[email protected]>
@github-actions
github-actions Bot disabled auto-merge June 27, 2024 03:24

@can-anyscale can-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

request change since the name of the api is incorrect (see comments); let me know otherwise

@peytondmurray
peytondmurray requested a review from bveeramani June 27, 2024 15:50

@bveeramani bveeramani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@can-anyscale
can-anyscale enabled auto-merge (squash) June 27, 2024 18:58
@can-anyscale
can-anyscale merged commit 9bed343 into ray-project:master Jun 27, 2024
@peytondmurray
peytondmurray deleted the fix-broken-data-docs branch June 27, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants