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] Use autodoc_mock_imports to mock deps for sphinx builds (#38817) #39485

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

GeneDer
Copy link
Contributor

@GeneDer GeneDer commented Sep 8, 2023

This PR is the first in a series needed to update Sphinx to the latest version. In this PR, we

  • Remove a lot of external dependencies that aren't necessary for building the docs. The one exception to this is tune-sklearn, a project owned by ray-project which actually does have documentation hosted on the Ray docs site.
  • External dependencies are now mocked out using Sphinx's autodoc_mock_imports mechanism, which is used by both autodoc and autosummary. The old module mocking mechanism has been removed in favor of this. The one exception to this is packaging.version.Version: Ray currently uses Version to modify some behaviors depending on the version of certain dependencies that the user has installed.

Why are these changes needed?

To ensure docs on the release branch are up-to-date

Related issue number

Pick of #38817

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

@GeneDer GeneDer requested a review from a team as a code owner September 8, 2023 21:01
@GeneDer GeneDer requested a review from zhe-thoughts September 8, 2023 21:01
…oject#38817)

This PR is the first in a series needed to update Sphinx to the latest version. In this PR, we

- Remove a lot of external dependencies that aren't necessary for building the docs. The one exception to this is tune-sklearn, a project owned by ray-project which actually does have documentation hosted on the Ray docs site.
- External dependencies are now mocked out using Sphinx's autodoc_mock_imports mechanism, which is used by both autodoc and autosummary. The old module mocking mechanism has been removed in favor of this. The one exception to this is packaging.version.Version: Ray currently uses Version to modify some behaviors depending on the version of certain dependencies that the user has installed.

---------

Signed-off-by: pdmurray <peynmurray@gmail.com>
Co-authored-by: Max Pumperla <max.pumperla@googlemail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Copy link
Collaborator

@zhe-thoughts zhe-thoughts left a comment

Choose a reason for hiding this comment

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

Clean docs change; qualifies for picking

@GeneDer GeneDer merged commit b481989 into ray-project:releases/2.7.0 Sep 9, 2023
@GeneDer GeneDer deleted the cp-38817 branch September 9, 2023 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants