Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b781602
[Doc] Upgrade docs build system
peytondmurray Nov 14, 2023
89d6892
[Doc] Upgrade build tooling
peytondmurray Nov 14, 2023
d79e657
[Doc] Add navbar machinery
peytondmurray Nov 14, 2023
6e6aa44
[Doc] Add docs index page
peytondmurray Nov 14, 2023
0c2b7ca
[Doc] Upgrade example gallery
peytondmurray Nov 14, 2023
cc9e236
[Doc] Add CSAT and Ray Assistant widgets
peytondmurray Nov 14, 2023
7e27696
[Doc] Add assets needed for new docs build system
peytondmurray Nov 14, 2023
e1b16b6
[Doc] Add all pages to the toctree
peytondmurray Nov 14, 2023
ffdc1ed
[Doc] Refactor tab widgets
peytondmurray Nov 14, 2023
bbde3f0
[Doc] Miscellaneous changes
peytondmurray Nov 14, 2023
93fe6bd
[Doc] Optimize sidebar nav creation to speed up build
peytondmurray Nov 16, 2023
b1a0d78
[Doc] Fix cached toctree behavior
peytondmurray Nov 17, 2023
1c79729
[Doc] Final cleanup
peytondmurray Nov 18, 2023
6229276
[Doc] Fix premerge CI job
peytondmurray Nov 20, 2023
f3b5245
[Doc] Address final comments
peytondmurray Nov 20, 2023
984476c
[Doc] Premerge troubleshooting
peytondmurray Nov 20, 2023
3b03385
[Doc] Install doc-dependencies.txt in doc_builder_container.py
peytondmurray Nov 21, 2023
9a1bc99
[Doc] Fix tabs widgets in cluster/vms/getting-started
peytondmurray Nov 21, 2023
ac1f80a
[Doc] Improved train logo style, pygments diff css; rework tune toctree
peytondmurray Nov 23, 2023
f856709
[Doc] Modify doc build dockerfile to install deps properly
peytondmurray Nov 27, 2023
5fe326c
[Doc] Fix merge conflicts
peytondmurray Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
3 changes: 1 addition & 2 deletions ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ compile_pip_dependencies() {
"${WORKSPACE_DIR}/python/requirements/ml/train-requirements.txt" \
"${WORKSPACE_DIR}/python/requirements/ml/train-test-requirements.txt" \
"${WORKSPACE_DIR}/python/requirements/ml/tune-requirements.txt" \
"${WORKSPACE_DIR}/python/requirements/ml/tune-test-requirements.txt" \
"${WORKSPACE_DIR}/doc/requirements-doc.txt"
"${WORKSPACE_DIR}/python/requirements/ml/tune-test-requirements.txt"

# Remove some pins from upstream dependencies:
# ray, xgboost-ray, lightgbm-ray, tune-sklearn
Expand Down
10 changes: 1 addition & 9 deletions ci/docker/doc.build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,4 @@ SHELL ["/bin/bash", "-ice"]

COPY . .

RUN pip install -U --ignore-installed \
-c python/requirements_compiled.txt \
-r python/requirements.txt \
-r python/requirements/test-requirements.txt \
-r python/requirements/lint-requirements.txt \
-r doc/requirements-doc.txt

RUN HOROVOD_WITH_GLOO=1 HOROVOD_WITHOUT_MPI=1 HOROVOD_WITHOUT_MXNET=1 \
pip install -U --ignore-installed -c python/requirements_compiled.txt horovod
RUN pip install -r doc/requirements-doc.txt
4 changes: 0 additions & 4 deletions ci/docker/doc.build.wanda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: "docbuild"
froms: ["cr.ray.io/rayproject/oss-ci-base_build"]
dockerfile: ci/docker/doc.build.Dockerfile
srcs:
- python/requirements.txt
- python/requirements_compiled.txt
- python/requirements/test-requirements.txt
- python/requirements/lint-requirements.txt
- doc/requirements-doc.txt
tags:
- cr.ray.io/rayproject/docbuild
2 changes: 2 additions & 0 deletions ci/pipeline/determine_tests_to_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ def get_commit_range():
):
RAY_CI_DOCKER_AFFECTED = 1
RAY_CI_LINUX_WHEELS_AFFECTED = 1
elif changed_file == ".readthedocs.yaml":
Copy link
Contributor

Choose a reason for hiding this comment

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

w00t look like it still builds everything because of ci/ci.sh; if you change the ci/run here https://github.com/ray-project/ray/blob/master/ci/pipeline/determine_tests_to_run.py#L339 to just ci it should builds only ci and doc

not related to this pr so up to you, if you find yourself continue to iterate, it'll save some ci time

RAY_CI_DOC_AFFECTED = 1
elif changed_file.startswith("doc/"):
if (
changed_file.endswith(".py")
Expand Down
2 changes: 1 addition & 1 deletion ci/ray_ci/doc_builder_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class DocBuilderContainer(Container):
def __init__(self) -> None:
super().__init__("docbuild")
self.install_ray()
self.install_ray(build_type="doc")

def run(self) -> None:
self.run_script(
Expand Down
40 changes: 22 additions & 18 deletions ci/ray_ci/tests.env.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,29 @@ RUN <<EOF

set -euo pipefail

(
cd dashboard/client
npm ci
npm run build
)

if [[ "$BUILD_TYPE" == "debug" ]]; then
RAY_DEBUG_BUILD=debug pip install -v -e python/
elif [[ "$BUILD_TYPE" == "asan" ]]; then
pip install -v -e python/
bazel build $(./ci/run/bazel_export_options) --no//:jemalloc_flag //:ray_pkg
elif [[ "$BUILD_TYPE" == "java" ]]; then
./java/build-jar-multiplatform.sh linux
RAY_INSTALL_JAVA=1 pip install -v -e python/
elif [[ "$BUILD_TYPE" == "clang" || "$BUILD_TYPE" == "asan-clang" || "$BUILD_TYPE" == "tsan-clang" ]]; then
./ci/env/install-llvm-binaries.sh
pip install -v -e python/
if [[ "$BUILD_TYPE" == "doc" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, maybe:

if [[ "$BUILD_TYPE" == "doc" ]]; then
  exit 0
fi

to avoid indentation of the whole block after this

# Do nothing in this case; no need to install ray to build docs
:
else
pip install -v -e python/
(
cd dashboard/client
npm ci
npm run build
)
if [[ "$BUILD_TYPE" == "debug" ]]; then
RAY_DEBUG_BUILD=debug pip install -v -e python/
elif [[ "$BUILD_TYPE" == "asan" ]]; then
pip install -v -e python/
bazel build $(./ci/run/bazel_export_options) --no//:jemalloc_flag //:ray_pkg
elif [[ "$BUILD_TYPE" == "java" ]]; then
./java/build-jar-multiplatform.sh linux
RAY_INSTALL_JAVA=1 pip install -v -e python/
elif [[ "$BUILD_TYPE" == "clang" || "$BUILD_TYPE" == "asan-clang" || "$BUILD_TYPE" == "tsan-clang" ]]; then
./ci/env/install-llvm-binaries.sh
pip install -v -e python/
else
pip install -v -e python/
fi
fi

EOF
7 changes: 5 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#

# You can set these variables from the command line.
SPHINXOPTS = -a -E
SPHINXOPTS = -a -E -W -j auto
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
Expand All @@ -19,7 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext show

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand Down Expand Up @@ -202,3 +202,6 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

show:
python -m http.server -d _build/html/
28 changes: 12 additions & 16 deletions doc/requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
# Production requirements. This is what readthedocs.com picks up

ray
watchfiles # Required because sphinx-click doesn't support mocking
watchfiles==0.19.0 # Required because sphinx-click doesn't support mocking

# Syntax highlighting
Pygments==2.13.0
Pygments==2.16.1

# Sphinx
sphinx==4.3.2
sphinx-click==3.0.2
sphinx-copybutton==0.4.0
sphinx==7.1.2
sphinx-click==5.0.1
sphinx-copybutton==0.5.2
sphinxemoji==0.2.0
sphinx-jsonschema==1.17.2
sphinx-version-warning==1.1.2
sphinx-book-theme==0.3.3
sphinx-external-toc==0.2.4
sphinx-sitemap==2.2.0
sphinx-jsonschema==1.19.1
sphinx-sitemap==2.5.1
sphinxcontrib-redoc==1.6.0
sphinx-tabs==3.4.0
sphinx-remove-toctrees==0.0.3
sphinx_design==0.5.0
pydata-sphinx-theme==0.14.1
autodoc_pydantic==2.0.1
sphinx_design==0.4.1

pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3

# MyST
myst-parser==0.15.2
myst-nb==0.13.1
myst-parser==2.0.0 # Needed to parse markdown
myst-nb==1.0.0rc0 # Most recent version of myst-nb; pin when new release is made

# Jupyter conversion
jupytext==1.13.6
jupytext==1.15.2

# Pin urllib to avoid downstream ssl incompatibility issues
urllib3 < 1.27
Expand Down
136 changes: 136 additions & 0 deletions doc/source/_static/css/assistant.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/* Kapa Ask AI button */
#kapa-widget-container figure {
padding: 0 !important;
}

.mantine-Modal-root figure {
padding: 0 !important;
}

.container-xl.blurred {
filter: blur(5px);
}

.chat-widget {
position: fixed;
bottom: 10px;
right: 10px;
z-index: 1000;
}

.chat-popup {
display: none;
position: fixed;
top: 20%;
left: 50%;
transform: translate(-50%, -20%);
width: 50%;
height: 70%;
background-color: var(--pst-color-surface);
border: 1px solid var(--pst-color-border);
border-radius: 10px;
box-shadow: 0 5px 10px var(--pst-color-shadow);
z-index: 1032;
max-height: 1000px;
overflow: hidden;
padding-bottom: 40px;
}

.chatFooter {
position: absolute;
bottom: 0;
right: 0;
width: 100%;
background-color: var(--pst-color-surface);
}

#openChatBtn {
border: 1px solid var(--pst-color-border);
background-color: var(--pst-color-surface);
color: var(--pst-color-text-base);
width: 70px;
height: 70px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
}

#closeChatBtn {
border: none;
background-color: transparent;
color: var(--pst-color-text-base);
font-size: 1.2em;
}

#closeChatBtn:hover {
color: var(--pst-color-link-hover);
}

#searchBar {
border: 1px solid var(--pst-color-border);
background-color: var(--pst-color-on-surface);
}

.chatHeader {
display: flex;
justify-content: space-between;
align-items: center;
padding: .5rem;
}

.chatHeader > .header-wrapper {
text-align: center;
width: 100%;
}

.chatContentContainer {
padding: 15px;
max-height: calc(100% - 80px);
overflow-y: auto;
}

.chatContentContainer input {
margin-top: 10px;
margin-bottom: 10px;
}

#result{
padding: 15px;
border-radius: 10px;
margin-top: 10px;
margin-bottom: 10px;
background-color: var(--pst-color-on-surface);
max-height: calc(100% - 20px);
overflow-y: auto;
}

.chatContentContainer textarea {
flex-grow: 1;
min-width: 50px;
max-height: 40px;
resize: none;
}

.searchBtn {
white-space: nowrap;
}

.input-group {
display: flex;
align-items: stretch;
}

#blurDiv {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
backdrop-filter: blur(5px);
z-index: 1031;
}

#blurDiv.blurDiv-hidden {
display: none !important;
}
77 changes: 77 additions & 0 deletions doc/source/_static/css/csat.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/* CSAT widgets */
#csat-inputs {
display: flex;
flex-direction: row;
align-items: center;
}

.csat-hidden {
display: none !important;
}

#csat-feedback-label {
color: var(--pst-color-text-base);
font-weight: 500;
}

.csat-button {
margin-left: 16px;
padding: 8px 16px 8px 16px;
border-radius: 4px;
border: 1px solid var(--pst-color-border);
background: var(--pst-color-background);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
cursor: pointer;
width: 85px;
}

#csat-textarea-group {
display: flex;
flex-direction: column;
}

#csat-submit {
margin-left: auto;
font-weight: 700;
border: none;
margin-top: 12px;
cursor: pointer;
}

#csat-feedback-received {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}

.csat-button-active {
border: 1px solid var(--pst-color-border);
}

.csat-icon {
margin-right: 4px;
}

#csat {
padding: 1em;
min-width: 60%;
}

#csat-textarea {
resize: none;
background-color: var(--pst-color-on-background);
border: 1px solid var(--pst-color-border);
border-radius: 4px;
}

#csat-textarea::placeholder {
color: var(--pst-color-text-base);
}

.csat-icon > path {
fill: var(--pst-color-text-base);
}
Loading