Skip to content

Commit

Permalink
chore: Switch from edx-sphinx-theme to sphinx-book-theme
Browse files Browse the repository at this point in the history
The edx-sphinx theme is being deprecated, and replaced with sphinx-book-theme.
This removes references to the deprecated theme and replaces them with the new
standard theme for the platform.

See https://github.com/openedx/edx-sphinx-theme/issues/184
  • Loading branch information
xitij2000 committed Apr 24, 2023
1 parent 774eab8 commit 9ac4985
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 17 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Change Log
Unreleased
~~~~~~~~~~
*

* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
deprecated

[1.2.2] - 2022-01-24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
47 changes: 38 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import os
from subprocess import check_call
from datetime import datetime
import sys

import django

import edx_theme

# Configure Django for autodoc usage
django.setup()
Expand All @@ -43,7 +43,6 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'edx_theme',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
Expand Down Expand Up @@ -74,8 +73,8 @@

# General information about the project.
project = 'edx-celeryutils'
copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin
author = edx_theme.AUTHOR
copyright = f'{datetime.now().year}, Axim Collaborative, Inc' # pylint: disable=redefined-builtin
author = 'Axim Collaborative, Inc'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -144,16 +143,46 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.

html_theme = 'edx_theme'
html_theme = 'sphinx_book_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
html_theme_options = {
"repository_url": "https://github.com/openedx/edx-celeryutils",
"repository_branch": "master",
"path_to_docs": "docs/",
"home_page_in_toc": True,
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
# Please don't change unless you know what you're doing.
"extra_footer": """
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
<img
alt="Creative Commons License"
style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"/>
</a>
<br>
These works by
<a
xmlns:cc="https://creativecommons.org/ns#"
href="https://openedx.org"
property="cc:attributionName"
rel="cc:attributionURL"
>Axim Collaborative, Inc</a>
are licensed under a
<a
rel="license"
href="https://creativecommons.org/licenses/by-sa/4.0/"
>Creative Commons Attribution-ShareAlike 4.0 International License</a>.
"""
}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [edx_theme.get_html_theme_path()]
# html_theme_path = []

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
Expand All @@ -167,13 +196,13 @@
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = None
html_logo = "https://logos.openedx.org/open-edx-logo-color.png"

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
html_favicon = "https://logos.openedx.org/open-edx-favicon.ico"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
12 changes: 12 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ bleach==6.0.0
# via readme-renderer
certifi==2022.12.7
# via requests
cffi==1.15.1
# via cryptography
chardet==5.1.0
# via diff-cover
charset-normalizer==3.1.0
Expand All @@ -27,6 +29,8 @@ click-log==0.4.0
# via edx-lint
code-annotations==1.3.0
# via edx-lint
cryptography==40.0.2
# via secretstorage
diff-cover==7.5.0
# via -r requirements/dev.in
dill==0.3.6
Expand Down Expand Up @@ -63,6 +67,10 @@ isort==5.12.0
# pylint
jaraco-classes==3.2.3
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
jinja2==3.1.2
# via
# code-annotations
Expand Down Expand Up @@ -103,6 +111,8 @@ py==1.11.0
# via tox
pycodestyle==2.10.0
# via -r requirements/quality.in
pycparser==2.21
# via cffi
pydocstyle==3.0.0
# via -r requirements/quality.in
pygments==2.15.0
Expand Down Expand Up @@ -144,6 +154,8 @@ rfc3986==2.0.0
# via twine
rich==13.3.4
# via twine
secretstorage==3.3.3
# via keyring
six==1.16.0
# via
# bleach
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-c constraints.txt

doc8 # reStructuredText style checker
edx_sphinx_theme # edX theme for Sphinx output
sphinx-book-theme # Common theme for all Open edX projects
build # Needed to build wheel for the twine check
twine # Validates README.rst for usage on PyPI
Sphinx # Documentation builder
Expand Down
40 changes: 34 additions & 6 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
#
# make upgrade
#
accessible-pygments==0.0.4
# via pydata-sphinx-theme
alabaster==0.7.13
# via sphinx
amqp==5.1.1
# via kombu
asgiref==3.6.0
# via django
babel==2.12.1
# via sphinx
# via
# pydata-sphinx-theme
# sphinx
beautifulsoup4==4.12.2
# via pydata-sphinx-theme
billiard==3.6.4.0
# via celery
bleach==6.0.0
Expand All @@ -24,6 +30,8 @@ celery==5.2.7
# -r requirements/base.in
certifi==2022.12.7
# via requests
cffi==1.15.1
# via cryptography
charset-normalizer==3.1.0
# via requests
click==8.1.3
Expand All @@ -38,6 +46,8 @@ click-plugins==1.1.1
# via celery
click-repl==0.2.0
# via celery
cryptography==40.0.2
# via secretstorage
django==3.2.18
# via
# -c requirements/common_constraints.txt
Expand All @@ -51,11 +61,10 @@ doc8==1.1.1
docutils==0.19
# via
# doc8
# pydata-sphinx-theme
# readme-renderer
# restructuredtext-lint
# sphinx
edx-sphinx-theme==3.1.0
# via -r requirements/doc.in
idna==3.4
# via requests
imagesize==1.4.1
Expand All @@ -69,6 +78,10 @@ importlib-resources==5.12.0
# via keyring
jaraco-classes==3.2.3
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
jinja2==3.1.2
# via sphinx
jsonfield==3.1.0
Expand All @@ -88,6 +101,7 @@ more-itertools==9.1.0
packaging==23.1
# via
# build
# pydata-sphinx-theme
# sphinx
pbr==5.11.1
# via stevedore
Expand All @@ -97,9 +111,15 @@ pockets==0.9.1
# via sphinxcontrib-napoleon
prompt-toolkit==3.0.38
# via click-repl
pycparser==2.21
# via cffi
pydata-sphinx-theme==0.13.3
# via sphinx-book-theme
pygments==2.15.0
# via
# accessible-pygments
# doc8
# pydata-sphinx-theme
# readme-renderer
# rich
# sphinx
Expand All @@ -125,20 +145,26 @@ rfc3986==2.0.0
# via twine
rich==13.3.4
# via twine
secretstorage==3.3.3
# via keyring
six==1.16.0
# via
# bleach
# click-repl
# edx-sphinx-theme
# pockets
# sphinxcontrib-napoleon
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.4.1
# via beautifulsoup4
sphinx==5.3.0
# via
# -c requirements/common_constraints.txt
# -r requirements/doc.in
# edx-sphinx-theme
# pydata-sphinx-theme
# sphinx-book-theme
sphinx-book-theme==1.0.1
# via -r requirements/doc.in
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.2
Expand All @@ -165,7 +191,9 @@ tomli==2.0.1
twine==4.0.2
# via -r requirements/doc.in
typing-extensions==4.5.0
# via rich
# via
# pydata-sphinx-theme
# rich
urllib3==1.26.15
# via
# requests
Expand Down

0 comments on commit 9ac4985

Please sign in to comment.