Skip to content

Commit

Permalink
Backfill static assets for version 0.19.3
Browse files Browse the repository at this point in the history
Signed-off-by: Sajid Alam <[email protected]>
  • Loading branch information
SajidAlamQB committed May 17, 2024
1 parent d3e9027 commit 4e8a0b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 123 deletions.
73 changes: 0 additions & 73 deletions docs/source/_templates/layout.html

This file was deleted.

42 changes: 4 additions & 38 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from __future__ import annotations

import importlib
import os
import re
import sys
from inspect import getmembers, isclass, isfunction
Expand Down Expand Up @@ -202,7 +201,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme = "kedro-sphinx-theme"
here = Path(__file__).parent.absolute()

# Theme options are theme-specific and customise the look and feel of a theme
Expand Down Expand Up @@ -243,9 +242,9 @@
"https://github.com/kedro-org/kedro/blob/main/kedro/templates/project/%7B%7B%20cookiecutter.repo_name%20%7D%7D/.flake8",
]

# retry before render a link broken (fix for "too many requests")
linkcheck_retries = 5
linkcheck_rate_limit_timeout = 2.0
# Comment out settings to fix Client Rate Limit Error 429
linkcheck_retries = 3
# linkcheck_rate_limit_timeout = 2.0

html_context = {
"display_github": True,
Expand Down Expand Up @@ -493,41 +492,8 @@ def autodoc_process_docstring(app, what, name, obj, options, lines): # noqa: PL
remove_arrows_in_examples(lines)


def env_override(default_appid):
build_version = os.getenv("READTHEDOCS_VERSION")

if build_version == "latest":
return os.environ["HEAP_APPID_QA"]
if build_version == "stable":
return os.environ["HEAP_APPID_PROD"]

return default_appid # default to Development for local builds


def _add_jinja_filters(app):
# https://github.com/crate/crate/issues/10833
from sphinx.builders.latex import LaTeXBuilder
from sphinx.builders.linkcheck import CheckExternalLinksBuilder

# LaTeXBuilder is used in the PDF docs build,
# and it doesn't have attribute 'templates'
if not (isinstance(app.builder, (LaTeXBuilder, CheckExternalLinksBuilder))):
app.builder.templates.environment.filters["env_override"] = env_override


def _override_permalinks_icon(app):
# https://github.com/readthedocs/sphinx_rtd_theme/issues/98#issuecomment-1503211439
app.config.html_permalinks_icon = "¶"


def setup(app):
app.connect("builder-inited", _add_jinja_filters)
app.connect("builder-inited", _override_permalinks_icon)
app.connect("autodoc-process-docstring", autodoc_process_docstring)
app.add_css_file("css/qb1-sphinx-rtd.css")
# fix a bug with table wraps in Read the Docs Sphinx theme:
# https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
app.add_css_file("css/theme-overrides.css")


# (regex, restructuredText link replacement, object) list
Expand Down
13 changes: 1 addition & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,9 @@ test = [
"types-toposort"
]
docs = [
"docutils<0.21",
"sphinx>=5.3,<7.3",
"sphinx_rtd_theme==2.0.0",
# Regression on sphinx-autodoc-typehints 1.21
# that creates some problematic docstrings
"sphinx-autodoc-typehints==1.20.2",
"sphinx_copybutton==0.5.2",
"sphinx-notfound-page",
"kedro-sphinx-theme==2024.4.0",
"ipykernel>=5.3, <7.0",
"myst-parser>=1.0,<2.1",
"Jinja2<3.2.0",
"sphinx-last-updated-by-git",
"sphinx-favicon",
"sphinxcontrib-youtube",
]
jupyter = [
"ipylab>=1.0.0",
Expand Down

0 comments on commit 4e8a0b3

Please sign in to comment.