From e81564750c45beee9a2f6f5abc1c1bfc6d2d1c7f Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Fri, 2 Aug 2024 14:43:25 +0500 Subject: [PATCH 1/3] chore: deprecate edx-sphinx-theme --- docs/conf.py | 48 +++++++++++++++++++++++++++++++++++-------- requirements/doc.in | 2 +- requirements/doc.txt | 49 ++++++++++++++++++++++++-------------------- 3 files changed, 67 insertions(+), 32 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 10d0b21a..e37f463a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,14 +11,44 @@ # serve to show the default. import os -import edx_theme +import sphinx_book_theme # If you wish to publish docs to readthedocs.org you'll need to make sure to # follow the steps here: # https://edx-sphinx-theme.readthedocs.io/en/latest/readme.html#read-the-docs-configuration -html_theme = 'edx_theme' -html_theme_path = [edx_theme.get_html_theme_path()] +html_theme = 'sphinx_book_theme' +html_theme_options = { + + "repository_url": 'https://github.com/edx/portal-designer', + "repository_branch": 'master', + "path_to_docs": "docs/", + "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 + Axim Collaborative + are licensed under a + Creative Commons Attribution-ShareAlike 4.0 International License. + """ +} # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -30,10 +60,6 @@ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['edx_theme'] - # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -48,7 +74,7 @@ # General information about the project. project = 'designer' -copyright = edx_theme.COPYRIGHT +copyright = 'edX 2024' author = 'edX' # The version info for the project you're documenting, acts as replacement for @@ -123,7 +149,11 @@ # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -html_favicon = os.path.join(html_theme_path[0], 'edx_theme', 'static', 'css', 'favicon.ico') +html_logo = "https://logos.openedx.org/open-edx-logo-color.png" +html_favicon = "https://logos.openedx.org/open-edx-favicon.ico" + +if not os.environ.get('DJANGO_SETTINGS_MODULE'): + os.environ['DJANGO_SETTINGS_MODULE'] = 'test_utils.test_settings' # 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/doc.in b/requirements/doc.in index b33df915..24445e0b 100644 --- a/requirements/doc.in +++ b/requirements/doc.in @@ -3,6 +3,6 @@ -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 # edX theme for Sphinx output readme_renderer # Validates README.rst for usage on PyPI Sphinx # Documentation builder diff --git a/requirements/doc.txt b/requirements/doc.txt index a2070173..a38f4391 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,10 +1,12 @@ # -# 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 # -alabaster==0.7.13 +accessible-pygments==0.0.5 + # via pydata-sphinx-theme +alabaster==0.7.16 # via sphinx anyascii==0.3.2 # via @@ -21,15 +23,13 @@ astroid==3.2.4 # pylint # pylint-celery babel==2.15.0 - # via sphinx -backports-zoneinfo==0.2.1 ; python_version < "3.9" # via - # -r requirements/test.txt - # django - # djangorestframework + # pydata-sphinx-theme + # sphinx beautifulsoup4==4.12.3 # via # -r requirements/test.txt + # pydata-sphinx-theme # wagtail boto3==1.34.151 # via -r requirements/test.txt @@ -103,7 +103,6 @@ distlib==0.3.8 # virtualenv django==4.2.14 # via - # -r requirements/test.txt # django-cors-headers # django-crum # django-extensions @@ -176,9 +175,10 @@ dnspython==2.6.1 # pymongo doc8==1.1.1 # via -r requirements/doc.in -docutils==0.19 +docutils==0.20.1 # via # doc8 + # pydata-sphinx-theme # readme-renderer # restructuredtext-lint # sphinx @@ -215,8 +215,6 @@ edx-opaque-keys==2.10.0 # edx-drf-extensions edx-rest-api-client==4.0.1 # via -r requirements/test.txt -edx-sphinx-theme==3.1.0 - # via -r requirements/doc.in et-xmlfile==1.1.0 # via # -r requirements/test.txt @@ -318,6 +316,7 @@ packaging==24.1 # via # -r requirements/test.txt # drf-yasg + # pydata-sphinx-theme # pyproject-api # pytest # sphinx @@ -354,9 +353,13 @@ pycparser==2.22 # via # -r requirements/test.txt # cffi +pydata-sphinx-theme==0.15.4 + # via sphinx-book-theme pygments==2.18.0 # via + # accessible-pygments # doc8 + # pydata-sphinx-theme # readme-renderer # sphinx pyjwt[crypto]==2.8.0 @@ -424,7 +427,6 @@ python3-openid==3.2.0 pytz==2024.1 # via # -r requirements/test.txt - # babel # django-modelcluster # drf-yasg # l18n @@ -466,7 +468,6 @@ six==1.16.0 # edx-auth-backends # edx-django-release-util # edx-lint - # edx-sphinx-theme # l18n # python-dateutil slumber==0.7.1 @@ -488,21 +489,24 @@ soupsieve==2.5 # via # -r requirements/test.txt # beautifulsoup4 -sphinx==5.3.0 +sphinx==7.4.7 # via # -r requirements/doc.in - # edx-sphinx-theme -sphinxcontrib-applehelp==1.0.4 + # pydata-sphinx-theme + # sphinx-book-theme +sphinx-book-theme==1.1.3 + # via -r requirements/doc.in +sphinxcontrib-applehelp==2.0.0 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==2.0.0 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==2.0.0 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==2.0.0 # via sphinx sqlparse==0.5.1 # via @@ -531,6 +535,7 @@ tomli==2.0.1 # pylint # pyproject-api # pytest + # sphinx # tox tomlkit==0.13.0 # via @@ -548,7 +553,7 @@ typing-extensions==4.12.2 # asgiref # astroid # edx-opaque-keys - # inflect + # pydata-sphinx-theme # pylint # typeguard uritemplate==4.1.1 From 5f6d984313c0b44c40908bd243f63cbc8d90d81e Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Mon, 2 Sep 2024 16:57:53 +0500 Subject: [PATCH 2/3] perf: PR review feedback resolved --- docs/conf.py | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e37f463a..d2b0293e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,43 +12,13 @@ import os import sphinx_book_theme +from datetime import datetime # If you wish to publish docs to readthedocs.org you'll need to make sure to # follow the steps here: # https://edx-sphinx-theme.readthedocs.io/en/latest/readme.html#read-the-docs-configuration html_theme = 'sphinx_book_theme' -html_theme_options = { - - "repository_url": 'https://github.com/edx/portal-designer', - "repository_branch": 'master', - "path_to_docs": "docs/", - "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 - Axim Collaborative - are licensed under a - Creative Commons Attribution-ShareAlike 4.0 International License. - """ -} # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -74,7 +44,7 @@ # General information about the project. project = 'designer' -copyright = 'edX 2024' +copyright = f'{datetime.now().year}, edX Inc' author = 'edX' # The version info for the project you're documenting, acts as replacement for From aa1ac13144ee6c0c101eec81e8860c776139dac2 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Wed, 30 Oct 2024 14:32:17 +0500 Subject: [PATCH 3/3] chore: update license and author information --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d2b0293e..f01fe632 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,8 +44,8 @@ # General information about the project. project = 'designer' -copyright = f'{datetime.now().year}, edX Inc' -author = 'edX' +copyright = f'{datetime.now().year}, edX LLC' +author = 'edX LLC' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the