Skip to content

Conversation

thomasdesr
Copy link
Contributor

Why are these changes needed?

This changes are part a batch effort to rewrite Ray's docstrings to be minimally pydoclint compliant. This PR focuses on making them at least pass basic formatting checks

Related issue number

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 :(

@pcmoritz pcmoritz enabled auto-merge (squash) May 8, 2025 19:33
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label May 8, 2025
@pcmoritz pcmoritz merged commit ebdcd2e into ray-project:master May 8, 2025
5 of 6 checks passed
@thomasdesr thomasdesr mentioned this pull request May 13, 2025
8 tasks
thomasdesr added a commit that referenced this pull request May 13, 2025
## Why are these changes needed?

Right now the docstring's across Ray's code base are very inconsistent
which leads to a number of problems when they are parsed by Sphynx to
generate documentation, and are otherwise just harder for folks to read.

This adds https://github.com/jsh9/pydoclint to the pre-commit checks to
validate that we're meeting a minimum standard that should keep things
working (it currently excludes several settings that should probably not
be excluded, but they significantly reduce the size of the ratchet
file).

This PR also includes an allowlist of everything that is currently
failing as of commit 25ea331. We'll circle back around over time and
fix these, but it should currently operate as a ratchet and only allow
the exact set of existing failures to persist.



This is likely to generate some logical merge conflicts over the next
week or two as PRs are merged that were not based after this was merged,
we'll fix them in follow up PRs instead of trying to coordinate a global
rollout.

## Related issue number

We merged a number of fix PRs already to address basic structural
problems in a lot of docstrings:
* #52872
* #52873
* #52875
* #52876
* #52877
* #52878
* #52879
* #52880
* #52881
* #52883

+ probably more xD
<!-- For example: "Closes #1234" -->

## Checks

- [x] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [x] 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 :(

Signed-off-by: Thomas Desrosiers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-backlog go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants