Skip to content

Commit d49c434

Browse files
committed
chore: Switch from edx-sphinx-theme to sphinx-book-theme
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.
1 parent d16c548 commit d49c434

File tree

12 files changed

+286
-239
lines changed

12 files changed

+286
-239
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Change Log
1414
Unreleased
1515
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1616

17+
* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
18+
deprecated
19+
1720
[1.4.0] - 2022-05-23
1821
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1922

docs/conf.py

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
import os
1818
import re
1919
import sys
20+
from datetime import datetime
2021
from subprocess import check_call
2122

22-
import edx_theme
23+
2324

2425

2526
def get_version(*file_paths):
@@ -57,7 +58,6 @@ def get_version(*file_paths):
5758
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
5859
# ones.
5960
extensions = [
60-
'edx_theme',
6161
'sphinx.ext.autodoc',
6262
'sphinx.ext.doctest',
6363
'sphinx.ext.intersphinx',
@@ -88,8 +88,8 @@ def get_version(*file_paths):
8888

8989
# General information about the project.
9090
project = 'code-annotations'
91-
copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin
92-
author = edx_theme.AUTHOR
91+
copyright = f'{datetime.now().year}, edX Inc.' # pylint: disable=redefined-builtin
92+
author = 'edX Inc.'
9393
project_title = 'Code Annotations'
9494
documentation_title = f"{project_title}"
9595

@@ -160,16 +160,46 @@ def get_version(*file_paths):
160160
# The theme to use for HTML and HTML Help pages. See the documentation for
161161
# a list of builtin themes.
162162

163-
html_theme = 'edx_theme'
163+
html_theme = 'sphinx_book_theme'
164164

165165
# Theme options are theme-specific and customize the look and feel of a theme
166166
# further. For a list of options available for each theme, see the
167167
# documentation.
168168
#
169-
# html_theme_options = {}
169+
html_theme_options = {
170+
"repository_url": "https://github.com/openedx/code-annotations",
171+
"repository_branch": "master",
172+
"path_to_docs": "docs/",
173+
"home_page_in_toc": True,
174+
"use_repository_button": True,
175+
"use_issues_button": True,
176+
"use_edit_page_button": True,
177+
# Please don't change unless you know what you're doing.
178+
"extra_footer": """
179+
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
180+
<img
181+
alt="Creative Commons License"
182+
style="border-width:0"
183+
src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"/>
184+
</a>
185+
<br>
186+
These works by
187+
<a
188+
xmlns:cc="https://creativecommons.org/ns#"
189+
href="https://openedx.org"
190+
property="cc:attributionName"
191+
rel="cc:attributionURL"
192+
>The Center for Reimagining Learning</a>
193+
are licensed under a
194+
<a
195+
rel="license"
196+
href="https://creativecommons.org/licenses/by-sa/4.0/"
197+
>Creative Commons Attribution-ShareAlike 4.0 International License</a>.
198+
"""
199+
}
170200

171201
# Add any paths that contain custom themes here, relative to this directory.
172-
html_theme_path = [edx_theme.get_html_theme_path()]
202+
# html_theme_path = []
173203

174204
# The name for this set of Sphinx documents.
175205
# "<project> v<release> documentation" by default.
@@ -183,13 +213,13 @@ def get_version(*file_paths):
183213
# The name of an image file (relative to this directory) to place at the top
184214
# of the sidebar.
185215
#
186-
# html_logo = None
216+
html_logo = "https://logos.openedx.org/open-edx-logo-color.png"
187217

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

194224
# Add any paths that contain custom static files (such as style sheets) here,
195225
# relative to this directory. They are copied after the builtin static files,

requirements/base.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
55
# make upgrade
66
#
77
click==8.1.3
88
# via -r requirements/base.in
99
jinja2==3.1.2
1010
# via -r requirements/base.in
11-
markupsafe==2.1.1
11+
markupsafe==2.1.2
1212
# via jinja2
13-
pbr==5.9.0
13+
pbr==5.11.1
1414
# via stevedore
15-
python-slugify==6.1.2
15+
python-slugify==8.0.1
1616
# via -r requirements/base.in
1717
pyyaml==6.0
1818
# via -r requirements/base.in
19-
stevedore==3.5.0
19+
stevedore==5.0.0
2020
# via -r requirements/base.in
2121
text-unidecode==1.3
2222
# via python-slugify

requirements/ci.txt

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,47 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
55
# make upgrade
66
#
7-
certifi==2022.6.15
7+
certifi==2022.12.7
88
# via requests
9-
charset-normalizer==2.0.12
9+
charset-normalizer==3.1.0
1010
# via requests
1111
codecov==2.1.12
1212
# via -r requirements/ci.in
13-
coverage==6.4.1
13+
coverage==7.2.2
1414
# via codecov
15-
distlib==0.3.4
15+
distlib==0.3.6
1616
# via virtualenv
17-
filelock==3.7.1
17+
filelock==3.10.3
1818
# via
1919
# tox
2020
# virtualenv
21-
idna==3.3
21+
idna==3.4
2222
# via requests
23-
packaging==21.3
23+
packaging==23.0
2424
# via tox
25-
platformdirs==2.5.2
25+
platformdirs==3.1.1
2626
# via virtualenv
2727
pluggy==1.0.0
2828
# via tox
2929
py==1.11.0
3030
# via tox
31-
pyparsing==3.0.9
32-
# via packaging
33-
requests==2.28.0
31+
requests==2.28.2
3432
# via codecov
3533
six==1.16.0
36-
# via
37-
# tox
38-
# virtualenv
39-
toml==0.10.2
4034
# via tox
41-
tox==3.25.0
35+
tomli==2.0.1
36+
# via tox
37+
tox==3.28.0
4238
# via
39+
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
4340
# -r requirements/ci.in
4441
# tox-battery
4542
tox-battery==0.6.1
4643
# via -r requirements/ci.in
47-
urllib3==1.26.9
44+
urllib3==1.26.15
4845
# via requests
49-
virtualenv==20.15.0
46+
virtualenv==20.21.0
5047
# via tox

0 commit comments

Comments
 (0)