2016-07-01 18:21:02 -07:00
|
|
|
# -*- coding: utf-8 -*-
|
2022-05-02 16:37:40 +02:00
|
|
|
from pathlib import Path
|
2016-07-01 18:21:02 -07:00
|
|
|
import sys
|
|
|
|
import os
|
2021-06-03 07:17:58 -07:00
|
|
|
|
2022-01-13 00:17:28 +01:00
|
|
|
sys.path.insert(0, os.path.abspath("."))
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
from custom_directives import *
|
2020-09-29 13:57:06 -07:00
|
|
|
from datetime import datetime
|
2016-07-01 18:21:02 -07:00
|
|
|
|
2022-02-19 10:19:07 +01:00
|
|
|
# Mocking modules allows Sphinx to work without installing Ray.
|
|
|
|
mock_modules()
|
2021-07-07 13:45:33 -04:00
|
|
|
|
2022-01-13 00:17:28 +01:00
|
|
|
assert (
|
|
|
|
"ray" not in sys.modules
|
|
|
|
), "If ray is already imported, we will not render documentation correctly!"
|
2020-09-03 18:16:08 +01:00
|
|
|
|
2016-07-01 18:21:02 -07:00
|
|
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
|
|
# add these directories to sys.path here. If the directory is relative to the
|
|
|
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
2017-02-27 21:14:31 -08:00
|
|
|
sys.path.insert(0, os.path.abspath("../../python/"))
|
2016-07-01 18:21:02 -07:00
|
|
|
|
2020-02-08 13:01:28 +08:00
|
|
|
import ray
|
|
|
|
|
2016-07-01 18:21:02 -07:00
|
|
|
# -- General configuration ------------------------------------------------
|
|
|
|
|
|
|
|
extensions = [
|
2022-01-25 02:00:41 +01:00
|
|
|
"sphinx_panels",
|
2022-01-13 00:17:28 +01:00
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"sphinx.ext.viewcode",
|
|
|
|
"sphinx.ext.napoleon",
|
|
|
|
"sphinx_click.ext",
|
|
|
|
"sphinx-jsonschema",
|
|
|
|
"sphinxemoji.sphinxemoji",
|
|
|
|
"sphinx_copybutton",
|
|
|
|
"sphinxcontrib.yt",
|
|
|
|
"versionwarning.extension",
|
|
|
|
"sphinx_sitemap",
|
2022-02-03 09:13:04 +01:00
|
|
|
"myst_nb",
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
"sphinx.ext.doctest",
|
|
|
|
"sphinx.ext.coverage",
|
|
|
|
"sphinx_external_toc",
|
2022-03-02 10:27:00 +01:00
|
|
|
"sphinx_thebe",
|
2022-03-29 11:33:14 -07:00
|
|
|
"sphinxcontrib.autodoc_pydantic",
|
2016-07-01 18:21:02 -07:00
|
|
|
]
|
|
|
|
|
2022-01-27 02:14:25 +01:00
|
|
|
myst_enable_extensions = [
|
2022-02-03 09:13:04 +01:00
|
|
|
"dollarmath",
|
|
|
|
"amsmath",
|
|
|
|
"deflist",
|
2022-01-27 02:14:25 +01:00
|
|
|
"html_admonition",
|
|
|
|
"html_image",
|
2022-02-03 09:13:04 +01:00
|
|
|
"colon_fence",
|
|
|
|
"smartquotes",
|
|
|
|
"replacements",
|
2022-01-27 02:14:25 +01:00
|
|
|
]
|
|
|
|
|
2022-03-02 10:27:00 +01:00
|
|
|
# Thebe configuration for launching notebook cells within the docs.
|
|
|
|
thebe_config = {
|
|
|
|
"selector": "div.highlight",
|
|
|
|
"repository_url": "https://github.com/ray-project/ray",
|
|
|
|
"repository_branch": "master",
|
|
|
|
}
|
|
|
|
|
2022-02-03 09:13:04 +01:00
|
|
|
# Cache notebook outputs in _build/.jupyter_cache
|
|
|
|
# To prevent notebook execution, set this to "off". To force re-execution, set this to "force".
|
|
|
|
# To cache previous runs, set this to "cache".
|
|
|
|
jupyter_execute_notebooks = os.getenv("RUN_NOTEBOOKS", "off")
|
|
|
|
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
external_toc_exclude_missing = False
|
2022-01-29 18:41:57 -08:00
|
|
|
external_toc_path = "_toc.yml"
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
|
|
|
|
# There's a flaky autodoc import for "TensorFlowVariables" that fails depending on the doc structure / order
|
|
|
|
# of imports.
|
|
|
|
# autodoc_mock_imports = ["ray.experimental.tf_utils"]
|
|
|
|
|
|
|
|
# This is used to suppress warnings about explicit "toctree" directives.
|
|
|
|
suppress_warnings = ["etoc.toctree"]
|
|
|
|
|
2021-05-20 11:56:12 -07:00
|
|
|
versionwarning_admonition_type = "note"
|
2021-08-09 18:51:00 -07:00
|
|
|
versionwarning_banner_title = "Join the Ray Discuss Forums!"
|
2020-09-08 17:00:09 -07:00
|
|
|
|
2022-01-13 00:17:28 +01:00
|
|
|
FORUM_LINK = "https://discuss.ray.io"
|
2020-04-13 15:21:08 -07:00
|
|
|
versionwarning_messages = {
|
2021-05-20 11:56:12 -07:00
|
|
|
# Re-enable this after Ray Summit.
|
|
|
|
# "latest": (
|
|
|
|
# "This document is for the latest pip release. "
|
|
|
|
# 'Visit the <a href="/en/master/">master branch documentation here</a>.'
|
|
|
|
# ),
|
2021-07-24 10:38:46 -07:00
|
|
|
"master": (
|
|
|
|
"<b>Got questions?</b> Join "
|
|
|
|
f'<a href="{FORUM_LINK}">the Ray Community forum</a> '
|
|
|
|
"for Q&A on all things Ray, as well as to share and learn use cases "
|
2022-01-29 18:41:57 -08:00
|
|
|
"and best practices with the Ray community."
|
|
|
|
),
|
2020-04-13 15:21:08 -07:00
|
|
|
}
|
|
|
|
|
2020-09-08 16:25:23 -07:00
|
|
|
versionwarning_body_selector = "#main-content"
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
|
2016-07-01 18:21:02 -07:00
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
2022-01-13 00:17:28 +01:00
|
|
|
templates_path = ["_templates"]
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# The encoding of source files.
|
2022-01-13 00:17:28 +01:00
|
|
|
# source_encoding = 'utf-8-sig'
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# The master toctree document.
|
2022-01-13 00:17:28 +01:00
|
|
|
master_doc = "index"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# General information about the project.
|
2022-01-13 00:17:28 +01:00
|
|
|
project = "Ray"
|
|
|
|
copyright = str(datetime.now().year) + ", The Ray Team"
|
|
|
|
author = "The Ray Team"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# The version info for the project you're documenting, acts as replacement for
|
|
|
|
# |version| and |release|, also used in various other places throughout the
|
|
|
|
# built documents.
|
2017-02-28 18:57:51 -08:00
|
|
|
from ray import __version__ as version
|
2022-01-13 00:17:28 +01:00
|
|
|
|
2016-07-01 18:21:02 -07:00
|
|
|
# The full version, including alpha/beta/rc tags.
|
2017-02-28 18:57:51 -08:00
|
|
|
release = version
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
language = None
|
|
|
|
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
|
|
# directories to ignore when looking for source files.
|
2022-01-13 00:17:28 +01:00
|
|
|
exclude_patterns = ["_build"]
|
2016-07-01 18:21:02 -07:00
|
|
|
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
# If "DOC_LIB" is found, only build that top-level navigation item.
|
|
|
|
build_one_lib = os.getenv("DOC_LIB")
|
2016-07-01 18:21:02 -07:00
|
|
|
|
2022-01-29 18:41:57 -08:00
|
|
|
all_toc_libs = [f.path for f in os.scandir(".") if f.is_dir() and "ray-" in f.path]
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
all_toc_libs += [
|
2022-01-29 18:41:57 -08:00
|
|
|
"cluster",
|
|
|
|
"tune",
|
|
|
|
"data",
|
|
|
|
"train",
|
|
|
|
"rllib",
|
|
|
|
"serve",
|
|
|
|
"workflows",
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
]
|
|
|
|
if build_one_lib and build_one_lib in all_toc_libs:
|
|
|
|
all_toc_libs.remove(build_one_lib)
|
|
|
|
exclude_patterns += all_toc_libs
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
pygments_style = "lovelace"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
|
|
todo_include_todos = False
|
|
|
|
|
2021-11-04 13:19:43 -07:00
|
|
|
# Do not check anchors for links because it produces many false positives
|
|
|
|
# and is slow (it needs to download the linked website).
|
|
|
|
linkcheck_anchors = False
|
|
|
|
|
2022-03-18 21:02:52 -07:00
|
|
|
# Only check external links, i.e. the ones starting with http:// or https://.
|
|
|
|
linkcheck_ignore = [
|
|
|
|
r"^((?!http).)*$", # exclude links not starting with http
|
|
|
|
"http://ala2017.it.nuigalway.ie/papers/ALA2017_Gupta.pdf", # broken
|
|
|
|
"https://mvnrepository.com/artifact/*", # working but somehow not with linkcheck
|
|
|
|
# This should be fixed -- is temporal the successor of cadence? Do the examples need to be updated?
|
|
|
|
"https://github.com/serverlessworkflow/specification/blob/main/comparisons/comparison-cadence.md",
|
|
|
|
# TODO(richardliaw): The following probably needs to be fixed in the tune_sklearn package
|
|
|
|
"https://scikit-optimize.github.io/stable/modules/",
|
2022-03-23 17:14:52 +00:00
|
|
|
"https://www.oracle.com/java/technologies/javase-jdk15-downloads.html", # forbidden for client
|
2022-03-24 07:51:49 -07:00
|
|
|
r"https://huggingface.co/*", # seems to be flaky
|
2022-03-25 08:58:24 -07:00
|
|
|
r"https://www.meetup.com/*", # seems to be flaky
|
2022-03-29 08:36:54 -07:00
|
|
|
r"https://www.pettingzoo.ml/*", # seems to be flaky
|
2022-03-18 21:02:52 -07:00
|
|
|
]
|
|
|
|
|
2016-07-01 18:21:02 -07:00
|
|
|
# -- Options for HTML output ----------------------------------------------
|
|
|
|
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
|
|
# a list of builtin themes.
|
2020-09-08 16:25:23 -07:00
|
|
|
html_theme = "sphinx_book_theme"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# Theme options are theme-specific and customize the look and feel of a theme
|
|
|
|
# further. For a list of options available for each theme, see the
|
|
|
|
# documentation.
|
2020-09-08 16:25:23 -07:00
|
|
|
html_theme_options = {
|
|
|
|
"repository_url": "https://github.com/ray-project/ray",
|
|
|
|
"use_repository_button": True,
|
|
|
|
"use_issues_button": True,
|
|
|
|
"use_edit_page_button": True,
|
|
|
|
"path_to_docs": "doc/source",
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
"home_page_in_toc": False,
|
2021-08-05 14:02:05 -07:00
|
|
|
"show_navbar_depth": 0,
|
2022-02-03 09:13:04 +01:00
|
|
|
"launch_buttons": {
|
|
|
|
"notebook_interface": "jupyterlab",
|
|
|
|
"binderhub_url": "https://mybinder.org",
|
|
|
|
"colab_url": "https://colab.research.google.com",
|
|
|
|
},
|
2020-09-08 16:25:23 -07:00
|
|
|
}
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# Add any paths that contain custom themes here, relative to this directory.
|
2022-01-13 00:17:28 +01:00
|
|
|
# html_theme_path = []
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# The name for this set of Sphinx documents. If None, it defaults to
|
|
|
|
# "<project> v<release> documentation".
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
html_title = f"Ray {release}"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# A shorter title for the navigation bar. Default is the same as html_title.
|
2022-01-13 00:17:28 +01:00
|
|
|
# html_short_title = None
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# The name of an image file (relative to this directory) to place at the top
|
|
|
|
# of the sidebar.
|
2020-09-08 16:25:23 -07:00
|
|
|
html_logo = "images/ray_logo.png"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# The name of an image file (within the static path) to use as favicon of the
|
|
|
|
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
|
|
|
# pixels large.
|
2020-09-08 16:25:23 -07:00
|
|
|
html_favicon = "_static/favicon.ico"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
|
|
# relative to this directory. They are copied after the builtin static files,
|
|
|
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
2022-01-13 00:17:28 +01:00
|
|
|
html_static_path = ["_static"]
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
# Output file base name for HTML help builder.
|
2022-01-13 00:17:28 +01:00
|
|
|
htmlhelp_basename = "Raydoc"
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# -- Options for LaTeX output ---------------------------------------------
|
|
|
|
|
|
|
|
latex_elements = {
|
2018-10-26 13:36:58 -07:00
|
|
|
# The paper size ('letterpaper' or 'a4paper').
|
2022-01-13 00:17:28 +01:00
|
|
|
# 'papersize': 'letterpaper',
|
2018-10-26 13:36:58 -07:00
|
|
|
# The font size ('10pt', '11pt' or '12pt').
|
2022-01-13 00:17:28 +01:00
|
|
|
# 'pointsize': '10pt',
|
2018-10-26 13:36:58 -07:00
|
|
|
# Additional stuff for the LaTeX preamble.
|
2022-01-13 00:17:28 +01:00
|
|
|
# 'preamble': '',
|
2018-10-26 13:36:58 -07:00
|
|
|
# Latex figure (float) alignment
|
2022-01-13 00:17:28 +01:00
|
|
|
# 'figure_align': 'htbp',
|
2016-07-01 18:21:02 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
latex_documents = [
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
(master_doc, "Ray.tex", "Ray Documentation", author, "manual"),
|
2016-07-01 18:21:02 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
# -- Options for manual page output ---------------------------------------
|
|
|
|
|
2022-01-13 00:17:28 +01:00
|
|
|
man_pages = [(master_doc, "ray", "Ray Documentation", [author], 1)]
|
2016-07-01 18:21:02 -07:00
|
|
|
|
|
|
|
# -- Options for Texinfo output -------------------------------------------
|
|
|
|
texinfo_documents = [
|
2022-01-13 00:17:28 +01:00
|
|
|
(
|
|
|
|
master_doc,
|
|
|
|
"Ray",
|
|
|
|
"Ray Documentation",
|
|
|
|
author,
|
|
|
|
"Ray",
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
"Ray provides a simple, universal API for building distributed applications.",
|
2022-01-13 00:17:28 +01:00
|
|
|
"Miscellaneous",
|
|
|
|
),
|
2016-07-01 18:21:02 -07:00
|
|
|
]
|
|
|
|
|
2018-03-15 15:57:31 -07:00
|
|
|
# Python methods should be presented in source code order
|
2022-01-13 00:17:28 +01:00
|
|
|
autodoc_member_order = "bysource"
|
2018-03-15 15:57:31 -07:00
|
|
|
|
2019-09-24 15:46:56 -07:00
|
|
|
|
2022-03-25 01:04:02 +01:00
|
|
|
# Add a render priority for doctest
|
|
|
|
nb_render_priority = {
|
|
|
|
"doctest": (),
|
|
|
|
"html": (
|
|
|
|
"application/vnd.jupyter.widget-view+json",
|
|
|
|
"application/javascript",
|
|
|
|
"text/html",
|
|
|
|
"image/svg+xml",
|
|
|
|
"image/png",
|
|
|
|
"image/jpeg",
|
|
|
|
"text/markdown",
|
|
|
|
"text/latex",
|
|
|
|
"text/plain",
|
|
|
|
),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-02 01:28:28 -07:00
|
|
|
def setup(app):
|
2022-01-13 00:17:28 +01:00
|
|
|
app.connect("html-page-context", update_context)
|
2022-02-19 10:19:07 +01:00
|
|
|
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
# Custom CSS
|
2022-01-25 02:00:41 +01:00
|
|
|
app.add_css_file("css/custom.css", priority=800)
|
|
|
|
app.add_css_file(
|
|
|
|
"https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"
|
|
|
|
)
|
2022-02-19 10:19:07 +01:00
|
|
|
|
2022-01-25 02:00:41 +01:00
|
|
|
# Custom JS
|
|
|
|
app.add_js_file(
|
|
|
|
"https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js",
|
2022-01-29 18:41:57 -08:00
|
|
|
defer="defer",
|
|
|
|
)
|
2022-01-27 02:14:25 +01:00
|
|
|
app.add_js_file("js/docsearch.js", defer="defer")
|
2022-02-19 10:19:07 +01:00
|
|
|
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
# Custom docstring processor
|
2022-01-13 00:17:28 +01:00
|
|
|
app.connect("autodoc-process-docstring", fix_xgb_lgbm_docs)
|
2022-05-02 16:37:40 +02:00
|
|
|
|
|
|
|
base_path = Path(__file__).parent
|
|
|
|
github_docs = DownloadAndPreprocessEcosystemDocs(base_path)
|
|
|
|
# Download docs from ecosystem library repos
|
|
|
|
app.connect("builder-inited", github_docs.write_new_docs)
|
|
|
|
# Restore original file content after build
|
|
|
|
app.connect("build-finished", github_docs.write_original_docs)
|