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] Upgrade build tooling #2

Conversation

peytondmurray
Copy link
Owner

@peytondmurray peytondmurray commented Nov 14, 2023

Why are these changes needed?

This PR implements build tooling changes needed for the doc build system upgrade.

  • Bump RTD python version to 3.11, which is ~40% faster than 3.10
  • Add a few build flags:
    • -W: Turn warnings into errors during the build
    • -j auto: Enable parallel builds, significantly improving the time it takes to build the docs
  • Bump the versions of the build system in requirements-doc.txt
  • Remove sphinx-version-warning - we weren't using it, it's unmaintained, and the JS was throwing errors upon page load
  • Remove sphinx-tabs, because pydata-sphinx-theme uses sphinx-design, which has a tab widget already. Having two tab widgets is a recipe for conflicting styles; additionally, sphinx-tabs has a bug where the js assets for tabs are injected on every page even if no tabs are being used on that page; see sphinx-tabs assets are not removed from pages where tabs aren't being used executablebooks/sphinx-tabs#184
  • Remove sphinx-external-toc as it is incompatible with the latest versions of sphinx. It's not needed here, and has not seen much development in the past year. _toc.yml is removed as a result of this.
  • Switch to pydata-sphinx-theme, which is the theme on which sphinx-book-theme is based. It's currently actively maintained, and has seen recent releases with big improvements to accessibility. It also comes with a lot of what we want right out of the box, and using it removes a dependency from our docs build system. I think I've talked this decision at length now to multiple people, but if there are still any questions about this choice I'm happy to discuss further.

Related issue number

Partially addresses ray-project#37944.

PR 1/x targeting ray-project#41115.

Tests may not pass here because some css and js assets and templates will be committed in a separate PR.

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

@peytondmurray peytondmurray force-pushed the docs-build-system-upgrade-build-tooling branch from 86a6166 to d2b0a4a Compare November 14, 2023 03:57
@peytondmurray peytondmurray marked this pull request as ready for review November 14, 2023 04:00
@peytondmurray peytondmurray mentioned this pull request Nov 14, 2023
8 tasks
@peytondmurray peytondmurray changed the title Docs build system upgrade build tooling [Docs] build system upgrade build tooling Nov 14, 2023
@peytondmurray peytondmurray changed the title [Docs] build system upgrade build tooling [Docs] Upgrade build tooling Nov 14, 2023
@peytondmurray peytondmurray mentioned this pull request Nov 14, 2023
8 tasks
@peytondmurray peytondmurray changed the title [Docs] Upgrade build tooling [Doc] Upgrade build tooling Nov 14, 2023
@peytondmurray peytondmurray force-pushed the docs-build-system-upgrade-build-tooling branch from d2b0a4a to 1129b29 Compare November 14, 2023 06:33
@peytondmurray peytondmurray force-pushed the docs-build-system-upgrade-build-tooling branch from 1129b29 to e4aff8b Compare November 14, 2023 07:44
Signed-off-by: pdmurray <peynmurray@gmail.com>
@peytondmurray peytondmurray force-pushed the docs-build-system-upgrade-build-tooling branch from e4aff8b to 8c1979d Compare November 14, 2023 19:03
https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx-core-events
"""
if pagename == "train/train":
app.add_css_file("css/ray-train.css")

Choose a reason for hiding this comment

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

nice!

Copy link

@maxpumperla maxpumperla left a comment

Choose a reason for hiding this comment

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

This is great, we really needed that clean-up.

Can be done later, but can we move the parse_navbar_config etc. to e.g. custom_directives.py or so? conf.py is the one file most of our devs have to have a look at occasionally, and I don't want to blow it up too much.

@peytondmurray
Copy link
Owner Author

Can be done later, but can we move the parse_navbar_config etc. to e.g. custom_directives.py or so? conf.py is the one file most of our devs have to have a look at occasionally, and I don't want to blow it up too much.

Yep, good idea. I'll make a checklist for this kind of cleanup in the target branch for this PR, and do this before we merge ray-project#41115.

@peytondmurray peytondmurray merged this pull request into docs-build-system-upgrade Nov 16, 2023
1 check passed
@peytondmurray peytondmurray deleted the docs-build-system-upgrade-build-tooling branch November 16, 2023 18:47
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.

2 participants