Skip to content

Commit

Permalink
docs(python): add integrated support for copying API examples, and au…
Browse files Browse the repository at this point in the history
…to-parallelise docs build (#5393)
  • Loading branch information
alexander-beedie committed Nov 1, 2022
1 parent 0349059 commit 445c550
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion py-polars/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build/
pandas/
source/reference/api/
source/reference/api/
source/reference/expressions/api/
source/reference/series/api/
2 changes: 1 addition & 1 deletion py-polars/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS ?= -j auto
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
Expand Down
1 change: 1 addition & 0 deletions py-polars/docs/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ hypothesis==6.56.3
ghp-import==2.1.0
sphinx==5.3.0
sphinx-autosummary-accessors==2022.4.0
sphinx-copybutton==0.5.0
pydata-sphinx-theme==0.11.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
Expand Down
9 changes: 7 additions & 2 deletions py-polars/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"sphinx.ext.mathjax",
"sphinx.ext.todo",
"sphinx_autosummary_accessors",
"sphinx_copybutton",
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -70,10 +71,14 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_css_files = ["css/custom.css"] # relative to html_static_path

html_show_sourcelink = False

html_logo = "../img/polars_logo.png"

# adds useful copy functionality to all the examples; also
# strips the '>>>' and '...' prompt/continuation prefixes.
copybutton_prompt_text = r">>> |\.\.\. "
copybutton_prompt_is_regexp = True

autosummary_generate = True

html_theme_options = {
Expand Down

0 comments on commit 445c550

Please sign in to comment.