From 1560e7c9dc0ba646662554572434c5833d333b28 Mon Sep 17 00:00:00 2001 From: Kshitij Sobti Date: Fri, 24 Mar 2023 12:39:02 +0530 Subject: [PATCH] feat: 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. --- docs/conf.py | 49 +++++++++++++++++++++++------ requirements/ci.txt | 14 ++++----- requirements/dev.txt | 59 ++++++++++++++++------------------- requirements/doc.in | 2 +- requirements/doc.txt | 64 +++++++++++++++++++++----------------- requirements/pip-tools.txt | 8 ++--- requirements/pip.txt | 10 +++--- requirements/quality.txt | 20 ++++++------ requirements/test.txt | 20 +++++------- 9 files changed, 134 insertions(+), 112 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 4f3cfc5a..b0a2bf65 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,9 +14,10 @@ import os import re import sys +from datetime import datetime from subprocess import check_call -import edx_theme + import django from django.conf import settings @@ -61,7 +62,6 @@ def get_version(*file_paths): # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'edx_theme', 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', @@ -92,8 +92,8 @@ def get_version(*file_paths): # General information about the project. project = 'edx-ace' -copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin -author = edx_theme.AUTHOR +copyright = f'{datetime.now().year}, edX Inc.' # pylint: disable=redefined-builtin +author = 'edX Inc.' project_title = 'Automated Communication Engine' documentation_title = f"{project_title}" @@ -164,16 +164,45 @@ def get_version(*file_paths): # 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-ace", + "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": """ + + Creative Commons License + +
+ These works by + The Center for Reimagining Learning + are licensed under a + Creative Commons Attribution-ShareAlike 4.0 International License. + """ +} # 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. # " v documentation" by default. @@ -187,13 +216,13 @@ def get_version(*file_paths): # 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, diff --git a/requirements/ci.txt b/requirements/ci.txt index bfe4479c..e872f2e6 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,20 +1,20 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade # certifi==2022.12.7 # via requests -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 # via requests codecov==2.1.12 # via -r requirements/ci.in -coverage==7.1.0 +coverage==7.2.2 # via codecov distlib==0.3.6 # via virtualenv -filelock==3.9.0 +filelock==3.10.3 # via # tox # virtualenv @@ -22,7 +22,7 @@ idna==3.4 # via requests packaging==23.0 # via tox -platformdirs==3.0.0 +platformdirs==3.1.1 # via virtualenv pluggy==1.0.0 # via tox @@ -41,7 +41,7 @@ tox==3.28.0 # tox-battery tox-battery==0.2 # via -r requirements/ci.in -urllib3==1.26.14 +urllib3==1.26.15 # via requests -virtualenv==20.19.0 +virtualenv==20.21.0 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index b8c4bd18..404693c5 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade # asgiref==3.6.0 # via django -astroid==2.14.2 +astroid==2.15.0 # via # pylint # pylint-celery @@ -22,7 +22,7 @@ cffi==1.15.1 # via cryptography chardet==5.1.0 # via diff-cover -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 # via requests click==8.1.3 # via @@ -34,15 +34,15 @@ click-log==0.4.0 # via edx-lint code-annotations==1.3.0 # via edx-lint -cryptography==39.0.1 +cryptography==40.0.0 # via secretstorage -diff-cover==7.4.0 +diff-cover==7.5.0 # via -r requirements/dev.in dill==0.3.6 # via pylint distlib==0.3.6 # via virtualenv -django==3.2.17 +django==3.2.18 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -51,22 +51,20 @@ docutils==0.19 # via readme-renderer edx-i18n-tools==0.9.2 # via -r requirements/dev.in -edx-lint==5.3.0 +edx-lint==5.3.4 # via # -r requirements/dev.in # -r requirements/quality.in -filelock==3.9.0 +filelock==3.10.3 # via # tox # virtualenv idna==3.4 # via requests -importlib-metadata==6.0.0 +importlib-metadata==6.1.0 # via # keyring # twine -importlib-resources==5.10.2 - # via keyring isort==5.12.0 # via # -r requirements/quality.in @@ -85,7 +83,7 @@ keyring==23.13.1 # via twine lazy-object-proxy==1.9.0 # via astroid -markdown-it-py==2.1.0 +markdown-it-py==2.2.0 # via rich markupsafe==2.1.2 # via jinja2 @@ -93,7 +91,7 @@ mccabe==0.7.0 # via pylint mdurl==0.1.2 # via markdown-it-py -more-itertools==9.0.0 +more-itertools==9.1.0 # via jaraco-classes packaging==23.0 # via @@ -103,11 +101,11 @@ path==16.6.0 # via edx-i18n-tools pbr==5.11.1 # via stevedore -pip-tools==6.12.2 +pip-tools==6.12.3 # via -r requirements/dev.in pkginfo==1.9.6 # via twine -platformdirs==3.0.0 +platformdirs==3.1.1 # via # pylint # virtualenv @@ -115,7 +113,7 @@ pluggy==1.0.0 # via # diff-cover # tox -polib==1.1.1 +polib==1.2.0 # via edx-i18n-tools py==1.11.0 # via tox @@ -130,7 +128,7 @@ pygments==2.14.0 # diff-cover # readme-renderer # rich -pylint==2.16.1 +pylint==2.17.1 # via # edx-lint # pylint-celery @@ -148,7 +146,7 @@ pyproject-hooks==1.0.0 # via build python-dateutil==2.8.2 # via -r requirements/base.in -python-slugify==8.0.0 +python-slugify==8.0.1 # via code-annotations pytz==2022.7.1 # via django @@ -167,13 +165,13 @@ requests-toolbelt==0.10.1 # via twine rfc3986==2.0.0 # via twine -rich==13.3.1 +rich==13.3.2 # via twine sailthru-client==2.2.3 # via -r requirements/base.in secretstorage==3.3.3 # via keyring -simplejson==3.18.3 +simplejson==3.18.4 # via sailthru-client six==1.16.0 # via @@ -206,29 +204,24 @@ tox==3.28.0 # -r requirements/dev.in twine==4.0.2 # via -r requirements/dev.in -typing-extensions==4.4.0 - # via - # astroid - # pylint - # rich -urllib3==1.26.14 +typing-extensions==4.5.0 + # via astroid +urllib3==1.26.15 # via # requests # twine -virtualenv==20.19.0 +virtualenv==20.21.0 # via tox webencodings==0.5.1 # via bleach -wheel==0.38.4 +wheel==0.40.0 # via # -r requirements/dev.in # pip-tools -wrapt==1.14.1 +wrapt==1.15.0 # via astroid -zipp==3.13.0 - # via - # importlib-metadata - # importlib-resources +zipp==3.15.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/doc.in b/requirements/doc.in index 0641d918..e26b75f0 100644 --- a/requirements/doc.in +++ b/requirements/doc.in @@ -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 readme_renderer # Validates README.rst for usage on PyPI Sphinx # Documentation builder twine diff --git a/requirements/doc.txt b/requirements/doc.txt index d0a3c95e..ae6139ad 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,28 +1,34 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade # +accessible-pygments==0.0.4 + # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx asgiref==3.6.0 # via django attrs==22.2.0 # via -r requirements/base.in -babel==2.11.0 - # via sphinx +babel==2.12.1 + # via + # pydata-sphinx-theme + # sphinx +beautifulsoup4==4.12.0 + # via pydata-sphinx-theme bleach==6.0.0 # via readme-renderer certifi==2022.12.7 # via requests cffi==1.15.1 # via cryptography -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 # via requests -cryptography==39.0.1 +cryptography==40.0.0 # via secretstorage -django==3.2.17 +django==3.2.18 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -31,22 +37,18 @@ 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 # via sphinx -importlib-metadata==6.0.0 +importlib-metadata==6.1.0 # via # keyring - # sphinx # twine -importlib-resources==5.10.2 - # via keyring jaraco-classes==3.2.3 # via keyring jeepney==0.8.0 @@ -57,34 +59,38 @@ jinja2==3.1.2 # via sphinx keyring==23.13.1 # via twine -markdown-it-py==2.1.0 +markdown-it-py==2.2.0 # via rich markupsafe==2.1.2 # via jinja2 mdurl==0.1.2 # via markdown-it-py -more-itertools==9.0.0 +more-itertools==9.1.0 # via jaraco-classes packaging==23.0 - # via sphinx + # via + # pydata-sphinx-theme + # sphinx pbr==5.11.1 # via stevedore pkginfo==1.9.6 # via twine pycparser==2.21 # via cffi +pydata-sphinx-theme==0.13.1 + # via sphinx-book-theme pygments==2.14.0 # via + # accessible-pygments # doc8 + # pydata-sphinx-theme # readme-renderer # rich # sphinx python-dateutil==2.8.2 # via -r requirements/base.in pytz==2022.7.1 - # via - # babel - # django + # via django readme-renderer==37.3 # via # -r requirements/doc.in @@ -101,27 +107,31 @@ restructuredtext-lint==1.4.0 # via doc8 rfc3986==2.0.0 # via twine -rich==13.3.1 +rich==13.3.2 # via twine sailthru-client==2.2.3 # via -r requirements/base.in secretstorage==3.3.3 # via keyring -simplejson==3.18.3 +simplejson==3.18.4 # via sailthru-client six==1.16.0 # via # -r requirements/base.in # bleach - # edx-sphinx-theme # python-dateutil snowballstemmer==2.2.0 # via sphinx +soupsieve==2.4 + # via beautifulsoup4 sphinx==5.3.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/doc.in - # edx-sphinx-theme + # pydata-sphinx-theme + # sphinx-book-theme +sphinx-book-theme==1.0.0 + # via -r requirements/doc.in sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -144,15 +154,11 @@ tomli==2.0.1 # via doc8 twine==4.0.2 # via -r requirements/doc.in -typing-extensions==4.4.0 - # via rich -urllib3==1.26.14 +urllib3==1.26.15 # via # requests # twine webencodings==0.5.1 # via bleach -zipp==3.13.0 - # via - # importlib-metadata - # importlib-resources +zipp==3.15.0 + # via importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index f1cd5e95..64de59dc 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # make upgrade # @@ -10,13 +10,13 @@ click==8.1.3 # via pip-tools packaging==23.0 # via build -pip-tools==6.12.2 +pip-tools==6.12.3 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via build tomli==2.0.1 # via build -wheel==0.38.4 +wheel==0.40.0 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index c8ce6fd7..1690ea83 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # make upgrade # -wheel==0.38.4 +wheel==0.40.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.0 +pip==23.0.1 # via -r requirements/pip.in -setuptools==67.2.0 +setuptools==67.6.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 4d09598c..3315e89e 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade # -astroid==2.14.2 +astroid==2.15.0 # via # pylint # pylint-celery @@ -19,7 +19,7 @@ code-annotations==1.3.0 # via edx-lint dill==0.3.6 # via pylint -edx-lint==5.3.0 +edx-lint==5.3.4 # via -r requirements/quality.in isort==5.12.0 # via @@ -35,13 +35,13 @@ mccabe==0.7.0 # via pylint pbr==5.11.1 # via stevedore -platformdirs==3.0.0 +platformdirs==3.1.1 # via pylint pycodestyle==2.10.0 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==2.16.1 +pylint==2.17.1 # via # edx-lint # pylint-celery @@ -55,7 +55,7 @@ pylint-plugin-utils==0.7 # via # pylint-celery # pylint-django -python-slugify==8.0.0 +python-slugify==8.0.1 # via code-annotations pyyaml==6.0 # via code-annotations @@ -71,9 +71,7 @@ tomli==2.0.1 # via pylint tomlkit==0.11.6 # via pylint -typing-extensions==4.4.0 - # via - # astroid - # pylint -wrapt==1.14.1 +typing-extensions==4.5.0 + # via astroid +wrapt==1.15.0 # via astroid diff --git a/requirements/test.txt b/requirements/test.txt index fe94ba7f..42d5120e 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade @@ -13,20 +13,20 @@ attrs==22.2.0 # pytest certifi==2022.12.7 # via requests -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 # via requests -coverage[toml]==7.1.0 +coverage[toml]==7.2.2 # via pytest-cov ddt==1.6.0 # via -r requirements/test.in # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -exceptiongroup==1.1.0 +exceptiongroup==1.1.1 # via # hypothesis # pytest -hypothesis[pytz]==6.68.1 +hypothesis[pytz]==6.70.0 # via # -r requirements/test.in # hypothesis-pytest @@ -34,8 +34,6 @@ hypothesis-pytest==0.19.0 # via -r requirements/test.in idna==3.4 # via requests -importlib-metadata==6.0.0 - # via pytest-randomly iniconfig==2.0.0 # via pytest jedi==0.18.2 @@ -56,7 +54,7 @@ pudb==2022.1.3 # via -r requirements/test.in pygments==2.14.0 # via pudb -pytest==7.2.1 +pytest==7.2.2 # via # hypothesis-pytest # pytest-cov @@ -78,7 +76,7 @@ requests==2.28.2 # via sailthru-client sailthru-client==2.2.3 # via -r requirements/base.in -simplejson==3.18.3 +simplejson==3.18.4 # via sailthru-client six==1.16.0 # via @@ -94,7 +92,7 @@ tomli==2.0.1 # via # coverage # pytest -urllib3==1.26.14 +urllib3==1.26.15 # via requests urwid==2.1.2 # via @@ -102,5 +100,3 @@ urwid==2.1.2 # urwid-readline urwid-readline==0.13 # via pudb -zipp==3.13.0 - # via importlib-metadata