From 3e0ac90661537c3e2f28638e989fd1f286c9b1e8 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Mon, 29 Jul 2024 13:13:13 +0500 Subject: [PATCH 1/3] chore: deprecate edx-sphinx-theme --- docs/conf.py | 13 +++++-------- requirements/doc.in | 2 +- requirements/doc.txt | 43 ++++++++++++++++++++++++------------------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e9ec72fd..246d00bb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,7 +16,7 @@ import sys from subprocess import check_call -import edx_theme +import sphinx_book_theme def get_version(*file_paths): @@ -59,7 +59,7 @@ def get_version(*file_paths): # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'edx_theme', + 'sphinx_book_theme', 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', @@ -90,8 +90,8 @@ def get_version(*file_paths): # General information about the project. project = 'edx_exams' -copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin -author = edx_theme.AUTHOR +copyright = 'COPYRIGHT' # pylint: disable=redefined-builtin +author = 'AUTHOR' project_title = 'edx_exams' documentation_title = f"{project_title}" @@ -172,7 +172,7 @@ 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 @@ -180,9 +180,6 @@ def get_version(*file_paths): # # html_theme_options = {} -# Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [edx_theme.get_html_theme_path()] - # The name for this set of Sphinx documents. # " v documentation" by default. # diff --git a/requirements/doc.in b/requirements/doc.in index 68f4cb27..80155527 100644 --- a/requirements/doc.in +++ b/requirements/doc.in @@ -4,7 +4,7 @@ -r test.txt # Core and testing dependencies for this package doc8 # reStructuredText style checker -edx_sphinx_theme # edX theme for Sphinx output +sphinx_book_theme # sphinx book theme twine # Validates README.rst for usage on PyPI build # Needed to build the wheel for twine check Sphinx # Documentation builder diff --git a/requirements/doc.txt b/requirements/doc.txt index 866452a2..31d3bdd4 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,9 +1,11 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# make upgrade +# pip-compile --output-file=requirements/doc.txt requirements/doc.in # +accessible-pygments==0.0.5 + # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx appdirs==1.4.4 @@ -30,14 +32,15 @@ attrs==23.2.0 # lti-consumer-xblock # openedx-events babel==2.15.0 - # via sphinx + # via + # pydata-sphinx-theme + # sphinx backports-tarfile==1.2.0 # via jaraco-context backports-zoneinfo==0.2.1 - # via - # -r requirements/test.txt - # django - # djangorestframework + # via -r requirements/test.txt +beautifulsoup4==4.12.3 + # via pydata-sphinx-theme bleach==6.1.0 # via # -r requirements/test.txt @@ -130,7 +133,6 @@ distlib==0.3.8 django==4.2.14 # via # -c requirements/common_constraints.txt - # -r requirements/test.txt # django-appconf # django-config-models # django-cors-headers @@ -216,6 +218,7 @@ doc8==1.1.1 docutils==0.19 # via # doc8 + # pydata-sphinx-theme # readme-renderer # restructuredtext-lint # sphinx @@ -265,8 +268,6 @@ edx-opaque-keys[django]==2.10.0 # openedx-events edx-rest-api-client==5.7.1 # via -r requirements/test.txt -edx-sphinx-theme==3.1.0 - # via -r requirements/doc.in edx-toggles==5.2.0 # via # -r requirements/test.txt @@ -322,8 +323,6 @@ importlib-metadata==6.11.0 # keyring # sphinx # twine -importlib-resources==6.4.0 - # via keyring inflection==0.5.1 # via # -r requirements/test.txt @@ -435,6 +434,7 @@ packaging==24.1 # -r requirements/test.txt # build # drf-yasg + # pydata-sphinx-theme # pyproject-api # pytest # sphinx @@ -469,9 +469,13 @@ pycryptodomex==3.20.0 # -r requirements/test.txt # lti-consumer-xblock # pyjwkest +pydata-sphinx-theme==0.15.4 + # via sphinx-book-theme pygments==2.18.0 # via + # accessible-pygments # doc8 + # pydata-sphinx-theme # readme-renderer # rich # sphinx @@ -551,7 +555,6 @@ python3-openid==3.2.0 pytz==2024.1 # via # -r requirements/test.txt - # babel # drf-yasg # xblock pyyaml==6.0.1 @@ -617,7 +620,6 @@ six==1.16.0 # edx-ccx-keys # edx-django-release-util # edx-lint - # edx-sphinx-theme # fs # fs-s3fs # pyjwkest @@ -637,10 +639,15 @@ social-auth-core==4.5.4 # -r requirements/test.txt # edx-auth-backends # social-auth-app-django +soupsieve==2.5 + # via beautifulsoup4 sphinx==5.3.0 # via # -r requirements/doc.in - # edx-sphinx-theme + # pydata-sphinx-theme + # sphinx-book-theme +sphinx-book-theme==1.1.3 + # via -r requirements/doc.in sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -692,8 +699,8 @@ typing-extensions==4.12.2 # asgiref # astroid # edx-opaque-keys + # pydata-sphinx-theme # pylint - # rich uritemplate==4.1.1 # via # -r requirements/test.txt @@ -731,9 +738,7 @@ xblock==5.0.0 # -r requirements/test.txt # lti-consumer-xblock zipp==3.19.2 - # via - # importlib-metadata - # importlib-resources + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools From eddfbeda35272206e02425b493176cada0760a6f Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Mon, 29 Jul 2024 17:08:59 +0500 Subject: [PATCH 2/3] chore: revert changed code back to 3.8 --- requirements/doc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/doc.txt b/requirements/doc.txt index 31d3bdd4..a9011b3e 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --output-file=requirements/doc.txt requirements/doc.in +# make upgrade # accessible-pygments==0.0.5 # via pydata-sphinx-theme From fafcc6189881967c4baa9decbc4d8f673c141f64 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Mon, 29 Jul 2024 17:17:20 +0500 Subject: [PATCH 3/3] chore: revert changed code back to 3.8 --- docs/conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 246d00bb..d5bb3ea3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,7 @@ import re import sys from subprocess import check_call +import datetime import sphinx_book_theme @@ -90,8 +91,8 @@ def get_version(*file_paths): # General information about the project. project = 'edx_exams' -copyright = 'COPYRIGHT' # pylint: disable=redefined-builtin -author = 'AUTHOR' +copyright = '{year}, edX Inc.'.format(year=datetime.datetime.now().year) # pylint: disable=redefined-builtin +author = 'edx-org' project_title = 'edx_exams' documentation_title = f"{project_title}"