Skip to content

Commit 157b3f4

Browse files
Update docs theme, use sphinx-tabs for CPU/GPU examples (#394)
* Relocate doc source files * Move conf.py to docs source folder * Fix broken links in index * Simplify environment file * Start adding CPU/GPU tabs for code blocks * Add GPU tabs to ML docs * dask_ml_docs_fix * Run pre-commit hooks * Add TODOs to ML docs * Start updating docs around code blocks * Disable collapsible tabs * Ignore docs build directory * Use pip for RTD builds * Attempt to install maven through apt for RTD builds * Remove maven from pip requirements * Add conda environment for convenience Co-authored-by: Vibhu Jawa <vibhujawa@gmail.com>
1 parent c3ad6a9 commit 157b3f4

25 files changed

Lines changed: 355 additions & 271 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ dask_sql/jar
5858
.next/
5959
dask-worker-space/
6060
node_modules/
61+
docs/source/_build/

.readthedocs.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
12
version: 2
3+
build:
4+
os: ubuntu-20.04
5+
tools:
6+
python: "3.8"
7+
apt_packages:
8+
- maven
9+
10+
sphinx:
11+
configuration: docs/source/conf.py
212

313
python:
4-
version: 3.8
514
install:
6-
- method: setuptools
15+
- requirements: docs/requirements-docs.txt
16+
- method: pip
717
path: .
8-
9-
conda:
10-
environment: docs/environment.yaml

docs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# from the environment for the first two.
66
SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
8-
SOURCEDIR = .
9-
BUILDDIR = _build
8+
SOURCEDIR = source
9+
BUILDDIR = build
1010

1111
# Put it first so that "make" without argument is like "make help".
1212
help:

docs/environment.yaml

Lines changed: 0 additions & 153 deletions
This file was deleted.

docs/environment.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: dask-sql-docs
2+
channels:
3+
- conda-forge
4+
- nodefaults
5+
dependencies:
6+
- python=3.9
7+
- sphinx>=4.0.0
8+
- sphinx-tabs
9+
- dask-sphinx-theme>=2.0.3
10+
- maven>=3.6.0
11+
- dask>=2021.11.1
12+
- pandas>=1.0.0
13+
- fugue>=0.5.3
14+
- jpype1>=1.0.2
15+
- fastapi>=0.61.1
16+
- uvicorn>=0.11.3
17+
- tzlocal>=2.1
18+
- prompt_toolkit
19+
- pygments
20+
- tabulate
21+
- nest-asyncio

docs/make.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ REM Command file for Sphinx documentation
77
if "%SPHINXBUILD%" == "" (
88
set SPHINXBUILD=sphinx-build
99
)
10-
set SOURCEDIR=.
11-
set BUILDDIR=_build
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
1212

1313
if "%1" == "" goto help
1414

@@ -21,7 +21,7 @@ if errorlevel 9009 (
2121
echo.may add the Sphinx directory to PATH.
2222
echo.
2323
echo.If you don't have Sphinx installed, grab it from
24-
echo.http://sphinx-doc.org/
24+
echo.https://www.sphinx-doc.org/
2525
exit /b 1
2626
)
2727

docs/requirements-docs.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sphinx>=4.0.0
2+
sphinx-tabs
3+
dask-sphinx-theme>=2.0.3
4+
dask>=2021.11.1
5+
pandas>=1.0.0
6+
fugue>=0.5.3
7+
jpype1>=1.0.2
8+
fastapi>=0.61.1
9+
uvicorn>=0.11.3
10+
tzlocal>=2.1
11+
prompt_toolkit
12+
pygments
13+
tabulate
14+
nest-asyncio
File renamed without changes.
File renamed without changes.

docs/conf.py renamed to docs/source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
extensions = [
3333
"sphinx.ext.autodoc",
3434
"sphinx.ext.napoleon",
35+
"sphinx_tabs.tabs",
3536
"dask_sphinx_theme.ext.dask_config_sphinx_ext",
3637
]
3738

@@ -61,3 +62,6 @@
6162

6263
# Do not show type mappings
6364
autodoc_typehints = "none"
65+
66+
# disable collapsible tabs
67+
sphinx_tabs_disable_tab_closing = True

0 commit comments

Comments
 (0)