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

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

Merged
merged 13 commits into from
Jun 27, 2024

Conversation

peytondmurray
Copy link
Contributor

@peytondmurray peytondmurray commented Jun 26, 2024

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

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

This reverts commit 70a8152.

Signed-off-by: pdmurray <peynmurray@gmail.com>
Signed-off-by: pdmurray <peynmurray@gmail.com>
Copy link
Collaborator

@can-anyscale can-anyscale left a comment

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
# 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
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
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.

python/ray/data/dataset.py Outdated Show resolved Hide resolved
doc/source/data/api/dataset.rst Outdated Show resolved Hide resolved
Co-authored-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Peyton Murray <peynmurray@gmail.com>
@github-actions github-actions bot disabled auto-merge June 27, 2024 03:24
Copy link
Collaborator

@can-anyscale can-anyscale left a comment

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

Copy link
Member

@bveeramani bveeramani left a comment

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
7 checks passed
@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