Skip to content

Commit f89dc23

Browse files
committed
docs: switch API reference docs to pydata theme
1 parent da9ba26 commit f89dc23

File tree

4 files changed

+38
-42
lines changed

4 files changed

+38
-42
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
BigQuery DataFrames (BigFrames)
24
===============================
35

docs/conf.py

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
# All configuration values have a default; values that are commented out
2525
# serve to show the default.
2626

27+
from __future__ import annotations
28+
2729
import os
28-
import shlex
2930
import sys
31+
from typing import Any
3032

3133
# If extensions (or modules to document with autodoc) are in another directory,
3234
# add these directories to sys.path here. If the directory is relative to the
@@ -56,7 +58,7 @@
5658
"sphinx.ext.napoleon",
5759
"sphinx.ext.todo",
5860
"sphinx.ext.viewcode",
59-
"recommonmark",
61+
"myst_parser",
6062
]
6163

6264
# autodoc/autosummary flags
@@ -98,7 +100,7 @@
98100
#
99101
# This is also used if you do content translation via gettext catalogs.
100102
# Usually you set "language" from the command line for these cases.
101-
language = None
103+
language = "en-US"
102104

103105
# There are two options for replacing |today|: either, you set today to some
104106
# non-false value, then it is used:
@@ -148,19 +150,27 @@
148150

149151
# The theme to use for HTML and HTML Help pages. See the documentation for
150152
# a list of builtin themes.
151-
html_theme = "alabaster"
153+
html_theme = "pydata_sphinx_theme"
152154

153155
# Theme options are theme-specific and customize the look and feel of a theme
154156
# further. For a list of options available for each theme, see the
155157
# documentation.
158+
# https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html#references
156159
html_theme_options = {
157-
"description": "BigQuery DataFrames provides DataFrame APIs on the BigQuery engine",
158-
"github_user": "googleapis",
159-
"github_repo": "python-bigquery-dataframes",
160-
"github_banner": True,
161-
"font_family": "'Roboto', Georgia, sans",
162-
"head_font_family": "'Roboto', Georgia, serif",
163-
"code_font_family": "'Roboto Mono', 'Consolas', monospace",
160+
"github_url": "https://github.com/googleapis/python-bigquery-dataframes",
161+
"logo": {
162+
"text": "BigQuery DataFrames (BigFrames)",
163+
},
164+
"external_links": [
165+
{
166+
"name": "Getting started",
167+
"url": "https://docs.cloud.google.com/bigquery/docs/dataframes-quickstart",
168+
},
169+
{
170+
"name": "User guide",
171+
"url": "https://docs.cloud.google.com/bigquery/docs/bigquery-dataframes-introduction",
172+
},
173+
],
164174
}
165175

166176
# Add any paths that contain custom themes here, relative to this directory.
@@ -264,7 +274,7 @@
264274

265275
# -- Options for LaTeX output ---------------------------------------------
266276

267-
latex_elements = {
277+
latex_elements: dict[str, Any] = {
268278
# The paper size ('letterpaper' or 'a4paper').
269279
#'papersize': 'letterpaper',
270280
# The font size ('10pt', '11pt' or '12pt').
@@ -282,7 +292,7 @@
282292
(
283293
root_doc,
284294
"bigframes.tex",
285-
"bigframes Documentation",
295+
"BigQuery DataFrames (BigFrames)",
286296
author,
287297
"manual",
288298
)
@@ -317,7 +327,7 @@
317327
(
318328
root_doc,
319329
"bigframes",
320-
"bigframes Documentation",
330+
"BigQuery DataFrames (BigFrames)",
321331
[author],
322332
1,
323333
)
@@ -336,7 +346,7 @@
336346
(
337347
root_doc,
338348
"bigframes",
339-
"bigframes Documentation",
349+
"BigQuery DataFrames (BigFrames)",
340350
author,
341351
"bigframes",
342352
"bigframes Library",

noxfile.py

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -515,24 +515,14 @@ def cover(session):
515515
session.run("coverage", "erase")
516516

517517

518-
@nox.session(python=DEFAULT_PYTHON_VERSION)
518+
@nox.session(python="3.13")
519519
def docs(session):
520520
"""Build the docs for this library."""
521521
session.install("-e", ".[scikit-learn]")
522522
session.install(
523-
# We need to pin to specific versions of the `sphinxcontrib-*` packages
524-
# which still support sphinx 4.x.
525-
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
526-
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
527-
"sphinxcontrib-applehelp==1.0.4",
528-
"sphinxcontrib-devhelp==1.0.2",
529-
"sphinxcontrib-htmlhelp==2.0.1",
530-
"sphinxcontrib-qthelp==1.0.3",
531-
"sphinxcontrib-serializinghtml==1.1.5",
532-
SPHINX_VERSION,
533-
"alabaster",
534-
"recommonmark",
535-
"anywidget",
523+
"sphinx==8.2.3",
524+
"myst-parser==4.0.1",
525+
"pydata-sphinx-theme==0.16.1",
536526
)
537527

538528
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
@@ -562,19 +552,10 @@ def docfx(session):
562552

563553
session.install("-e", ".[scikit-learn]")
564554
session.install(
565-
# We need to pin to specific versions of the `sphinxcontrib-*` packages
566-
# which still support sphinx 4.x.
567-
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
568-
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
569-
"sphinxcontrib-applehelp==1.0.4",
570-
"sphinxcontrib-devhelp==1.0.2",
571-
"sphinxcontrib-htmlhelp==2.0.1",
572-
"sphinxcontrib-qthelp==1.0.3",
573-
"sphinxcontrib-serializinghtml==1.1.5",
574555
SPHINX_VERSION,
575-
"alabaster",
576-
"recommonmark",
577-
"gcp-sphinx-docfx-yaml==3.0.1",
556+
"pydata-sphinx-theme==0.13.3",
557+
"myst-parser==0.18.1",
558+
"gcp-sphinx-docfx-yaml==3.2.4",
578559
"anywidget",
579560
)
580561

@@ -599,7 +580,7 @@ def docfx(session):
599580
"sphinx.ext.napoleon,"
600581
"sphinx.ext.todo,"
601582
"sphinx.ext.viewcode,"
602-
"recommonmark"
583+
"myst_parser"
603584
),
604585
"-b",
605586
"html",

scripts/publish_api_coverage.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ def generate_pandas_api_coverage():
205205
def generate_sklearn_api_coverage():
206206
"""Explore all SKLearn modules, and for each item contained generate a
207207
regex to detect it being imported, and record whether we implement it"""
208+
209+
import sklearn # noqa
210+
208211
sklearn_modules = [
209212
"sklearn",
210213
"sklearn.model_selection",

0 commit comments

Comments
 (0)