Skip to content

Commit

Permalink
Backfill static assets for version 0.19.0
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 44a3d17 commit 32a91a7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 111 deletions.
63 changes: 0 additions & 63 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 @@ -193,7 +192,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 @@ -235,9 +234,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 @@ -485,41 +484,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
2 changes: 1 addition & 1 deletion docs/source/starters/new_project_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ To learn more about using logging in your project, or modifying the logging conf
Including the Documentation tool adds a `docs` directory to your project structure and includes the Sphinx setup files, `conf.py` and `index.rst`, with some added features such as auto generation of HTML documentation.
The aim of this tool reflects Kedro's commitment to best practices in understanding code and facilitating collaboration by helping you create and maintain guides and API docs.

If you did not initially select `docs` and want to implement it later you can do so by following the [official documentation](https://docs.kedro.org/en/stable/tutorial/package_a_project.html#add-documentation-to-a-kedro-project) for guidance on adding documentation to a Kedro project.
If you did not initially select `docs` and want to implement it later you can do so by following the [official documentation](https://docs.kedro.org/en/stable/tutorial/package_a_project.html#add-documentation-to-a-kedro-project-if-you-have-not-selected-docs-tool) for guidance on adding documentation to a Kedro project.

### Data Structure

Expand Down
10 changes: 1 addition & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,9 @@ test = [
"trufflehog~=2.1",
]
docs = [
"docutils<0.18",
"sphinx~=5.3.0",
"sphinx_rtd_theme==1.2.0",
# Regression on sphinx-autodoc-typehints 1.21
# that creates some problematic docstrings
"sphinx-autodoc-typehints==1.20.2",
"sphinx_copybutton==0.3.1",
"sphinx-notfound-page",
"kedro-sphinx-theme==2024.4.0",
"ipykernel>=5.3, <7.0",
"sphinxcontrib-mermaid~=0.7.1",
"myst-parser~=1.0.0",
"Jinja2<3.1.0",
]
all = [ "kedro[test,docs]" ]
Expand Down

0 comments on commit 32a91a7

Please sign in to comment.