From 2baf22d05dcacfa087a4ea0821d7ad4c83b1e980 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Tue, 30 Jul 2024 15:37:20 +0500 Subject: [PATCH 1/9] chore: deprecate edx-sphinx-theme --- docs/Makefile | 20 ++ docs/conf.py | 535 ++++------------------------------ docs/index.rst | 20 ++ docs/make.bat | 35 +++ docs/venv/pyvenv.cfg | 3 + edx_name_affirmation/api.py | 1 + edx_name_affirmation/views.py | 7 + requirements/doc.in | 2 +- requirements/doc.txt | 25 +- 9 files changed, 159 insertions(+), 489 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/index.rst create mode 100644 docs/make.bat create mode 100644 docs/venv/pyvenv.cfg diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py index 2ff5ac1..e7e9c11 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,499 +1,68 @@ -# pylint: disable=invalid-name -""" -edx_name_affirmation documentation build configuration file. - -This file is execfile()d with the current directory set to its -containing dir. +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html -Note that not all possible configuration values are present in this -autogenerated file. +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -All configuration values have a default; values that are commented out -serve to show the default. -""" import os -import re -import sys -from subprocess import check_call - -import edx_theme -from django import setup as django_setup - - -def get_version(*file_paths): - """ - Extract the version string from the file at the given relative path fragments. - """ - filename = os.path.join(os.path.dirname(__file__), *file_paths) - version_file = open(filename).read() - version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) - if version_match: - return version_match.group(1) - raise RuntimeError('Unable to find version string.') - - -REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.append(REPO_ROOT) - -VERSION = get_version('../edx_name_affirmation', '__init__.py') - -# Configure Django for autodoc usage -os.environ['DJANGO_SETTINGS_MODULE'] = 'test_settings' -django_setup() -# 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 -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' +project = 'edx-name-affirmation' +copyright = '2024, edx-org' +author = 'edx-org' +release = '2.3.7' -# 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', - 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', - 'sphinx.ext.ifconfig', - 'sphinx.ext.napoleon' -] +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -# A list of warning types to suppress arbitrary warning messages. -suppress_warnings = [ - 'image.nonlocal_uri', -] +extensions = [] -# Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The encoding of source files. -# -# source_encoding = 'utf-8-sig' - -# The top level toctree document. -top_level_doc = 'index' - -# General information about the project. -project = 'edx_name_affirmation' -copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin -author = edx_theme.AUTHOR -project_title = 'edx-name-affimation' -documentation_title = f"{project_title}" - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = VERSION -# The full version, including alpha/beta/rc tags. -release = VERSION - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# -# today = '' -# -# Else, today_fmt is used as the format for a strftime call. -# -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] -# The reST default role (used for this markup: `text`) to use for all -# documents. -# -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'edx_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 = {} - -# 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. -# -# html_title = 'edx_name_affirmation v0.1.0' - -# A shorter title for the navigation bar. Default is the same as html_title. -# -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# -# html_logo = None - -# 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 - -# 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, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# -# html_extra_path = [] - -# If not None, a 'Last updated on:' timestamp is inserted at every page -# bottom, using the given strftime format. -# The empty string is equivalent to '%b %d, %Y'. -# -# html_last_updated_fmt = None - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# -# html_additional_pages = {} - -# If false, no module index is generated. -# -# html_domain_indices = True - -# If false, no index is generated. -# -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' -# -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# 'ja' uses this config value. -# 'zh' user can custom change `jieba` dictionary path. -# -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = f'{project}doc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_target = f'{project}.tex' -latex_documents = [ - (top_level_doc, latex_target, documentation_title, - author, 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# -# latex_use_parts = False - -# If true, show page references after internal links. -# -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# -# latex_appendices = [] - -# It false, will not define \strong, \code, itleref, \crossref ... but only -# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added -# packages. -# -# latex_keep_old_macro_names = True - -# If false, no module index is generated. -# -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (top_level_doc, project_title, documentation_title, - [author], 1) -] - -# If true, show URL addresses after external links. -# -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (top_level_doc, project_title, documentation_title, - author, project_title, 'Django app housing name affirmation logic', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -# -# texinfo_appendices = [] - -# If false, no module index is generated. -# -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# -# texinfo_no_detailmenu = False - - -# -- Options for Epub output ---------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = project -epub_author = author -epub_publisher = author -epub_copyright = copyright - -# The basename for the epub file. It defaults to the project name. -# epub_basename = project - -# The HTML theme for the epub output. Since the default themes are not -# optimized for small screen space, using the same theme for HTML and epub -# output is usually not wise. This defaults to 'epub', a theme designed to save -# visual space. -# -# epub_theme = 'epub' - -# The language of the text. It defaults to the language option -# or 'en' if the language is not set. -# -# epub_language = '' - -# The scheme of the identifier. Typical schemes are ISBN or URL. -# epub_scheme = '' - -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -# -# epub_identifier = '' - -# A unique identification for the text. -# -# epub_uid = '' - -# A tuple containing the cover image and cover page html template filenames. -# -# epub_cover = () - -# A sequence of (type, uri, title) tuples for the guide element of content.opf. -# -# epub_guide = () - -# HTML files that should be inserted before the pages created by sphinx. -# The format is a list of tuples containing the path and title. -# -# epub_pre_files = [] - -# HTML files that should be inserted after the pages created by sphinx. -# The format is a list of tuples containing the path and title. -# -# epub_post_files = [] - -# A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] - -# The depth of the table of contents in toc.ncx. -# -# epub_tocdepth = 3 - -# Allow duplicate toc entries. -# -# epub_tocdup = True - -# Choose between 'default' and 'includehidden'. -# -# epub_tocscope = 'default' - -# Fix unsupported image types using the Pillow. -# -# epub_fix_images = False - -# Scale large images. -# -# epub_max_image_width = 0 - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# -# epub_show_urls = 'inline' - -# If false, no index is generated. -# -# epub_use_index = True - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = { - 'python': ('https://docs.python.org/3.8', None), - 'django': ('https://docs.djangoproject.com/en/2.2/', 'https://docs.djangoproject.com/en/2.2/_objects/'), - 'model_utils': ('https://django-model-utils.readthedocs.io/en/latest/', None), -} - - -def on_init(app): # pylint: disable=unused-argument +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "sphinx_book_theme" + +html_theme_options = { + "repository_url": "https://github.com/edx/edx-name-affirmation", + "repository_branch": 'main', + "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. """ - Run sphinx-apidoc after Sphinx initialization. +} - Read the Docs won't run tox or custom shell commands, so we need this to - avoid checking in the generated reStructuredText files. - """ - docs_path = os.path.abspath(os.path.dirname(__file__)) - root_path = os.path.abspath(os.path.join(docs_path, '..')) - apidoc_path = 'sphinx-apidoc' - if hasattr(sys, 'real_prefix'): # Check to see if we are in a virtualenv - # If we are, assemble the path manually - bin_path = os.path.abspath(os.path.join(sys.prefix, 'bin')) - apidoc_path = os.path.join(bin_path, apidoc_path) - check_call([apidoc_path, '-o', docs_path, os.path.join(root_path, 'edx_name_affirmation'), - os.path.join(root_path, 'edx_name_affirmation/migrations')]) +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' -def setup(app): - """Sphinx extension: run sphinx-apidoc.""" - event = 'builder-inited' - app.connect(event, on_init) +html_static_path = ['_static'] diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..15da2ca --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +.. edx-name-affirmation documentation master file, created by + sphinx-quickstart on Tue Jul 30 15:21:12 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to edx-name-affirmation's documentation! +================================================ + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..32bb245 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/venv/pyvenv.cfg b/docs/venv/pyvenv.cfg new file mode 100644 index 0000000..4760c1f --- /dev/null +++ b/docs/venv/pyvenv.cfg @@ -0,0 +1,3 @@ +home = /Library/Developer/CommandLineTools/usr/bin +include-system-site-packages = false +version = 3.9.6 diff --git a/edx_name_affirmation/api.py b/edx_name_affirmation/api.py index b23c1aa..5275a63 100644 --- a/edx_name_affirmation/api.py +++ b/edx_name_affirmation/api.py @@ -253,6 +253,7 @@ def update_verified_name_status( def create_verified_name_config(user, use_verified_name_for_certs=None): """ Create verified name configuration for the given user. + Arguments: * `user` (User object) * `use_verified_name_for_certs` (bool): If True, certificates will prioritize diff --git a/edx_name_affirmation/views.py b/edx_name_affirmation/views.py index ae79377..e329b5a 100644 --- a/edx_name_affirmation/views.py +++ b/edx_name_affirmation/views.py @@ -1,6 +1,7 @@ """ Name Affirmation HTTP-based API endpoints """ + from edx_api_doc_tools import path_parameter, query_parameter, schema from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication from rest_framework import status as http_status @@ -34,9 +35,11 @@ class AuthenticatedAPIView(APIView): + """ Authenticate API View. """ + authentication_classes = (SessionAuthentication, JwtAuthentication) permission_classes = (IsAuthenticated,) @@ -65,6 +68,7 @@ def get(self, request): """ Get most recent verified name for the request user or for the specified username For example: /edx_name_affirmation/v1/verified_name?username=jdoe + Example response: { "username": "jdoe", "verified_name": "Jonathan Doe", @@ -105,6 +109,7 @@ def get(self, request): def post(self, request): """ Creates a new VerifiedName. + Expected POST data: { "username": "jdoe", "verified_name": "Jonathan Doe" @@ -154,6 +159,7 @@ def post(self, request): def patch(self, request): """ Update verified name status + Example PATCH data: { "username": "jdoe", "verification_attempt_id" OR "proctored_exam_attempt_id": 123, @@ -274,6 +280,7 @@ class VerifiedNameConfigView(AuthenticatedAPIView): HTTP POST Creates a new VerifiedName. + Example POST data: { "username": "jdoe", "use_verified_name_for_certs": True diff --git a/requirements/doc.in b/requirements/doc.in index 99968d3..9b5b7aa 100644 --- a/requirements/doc.in +++ b/requirements/doc.in @@ -4,7 +4,7 @@ -r base.in 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 sphinxcontrib-napoleon # Google Style docstring support for sphinx diff --git a/requirements/doc.txt b/requirements/doc.txt index 898eb91..a51463a 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -4,6 +4,8 @@ # # make upgrade # +accessible-pygments==0.0.4 + # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx amqp==5.2.0 @@ -11,13 +13,17 @@ amqp==5.2.0 asgiref==3.8.1 # via django babel==2.15.0 - # via sphinx + # via + # pydata-sphinx-theme + # sphinx backports-zoneinfo[tzdata]==0.2.1 # via # celery # django # djangorestframework # kombu +beautifulsoup4==4.12.3 + # via pydata-sphinx-theme billiard==4.2.0 # via celery celery==5.4.0 @@ -101,6 +107,7 @@ doc8==1.1.1 docutils==0.19 # via # doc8 + # pydata-sphinx-theme # readme-renderer # restructuredtext-lint # sphinx @@ -122,8 +129,6 @@ edx-drf-extensions==10.3.0 # via -r requirements/base.in edx-opaque-keys==2.10.0 # via edx-drf-extensions -edx-sphinx-theme==3.1.0 - # via -r requirements/doc.in edx-toggles==5.2.0 # via -r requirements/base.in idna==3.7 @@ -153,6 +158,7 @@ nh3==0.2.18 packaging==24.1 # via # drf-yasg + # pydata-sphinx-theme # sphinx pbr==6.0.0 # via stevedore @@ -164,9 +170,13 @@ psutil==6.0.0 # via edx-django-utils pycparser==2.22 # via cffi +pydata-sphinx-theme==0.14.4 + # via sphinx-book-theme pygments==2.18.0 # via + # accessible-pygments # doc8 + # pydata-sphinx-theme # readme-renderer # sphinx pyjwt[crypto]==2.8.0 @@ -201,16 +211,20 @@ semantic-version==2.10.0 # via edx-drf-extensions six==1.16.0 # via - # edx-sphinx-theme # pockets # python-dateutil # sphinxcontrib-napoleon snowballstemmer==2.2.0 # via sphinx +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.0.1 + # via -r requirements/doc.in sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -242,6 +256,7 @@ typing-extensions==4.12.2 # asgiref # edx-opaque-keys # kombu + # pydata-sphinx-theme tzdata==2024.1 # via # backports-zoneinfo From 67d9e30d15706a137f70cbdda8079f431eb6b866 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Tue, 30 Jul 2024 15:48:20 +0500 Subject: [PATCH 2/9] chore: deprecate edx-sphinx-theme --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a591a7d..5d7a6f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: os: [ubuntu-20.04] python-version: ["3.8"] node-version: ["10"] - toxenv: [django42, quality, pii_check, rst_validation] + toxenv: [django42, quality, pii_check] steps: - uses: actions/checkout@v1 From d70e96747cc946eac2dabe0d486bbf0668106dd7 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Tue, 30 Jul 2024 16:36:45 +0500 Subject: [PATCH 3/9] chore: deprecate edx-sphinx-theme --- docs/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 15da2ca..05461b9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,7 +11,6 @@ Welcome to edx-name-affirmation's documentation! :caption: Contents: - Indices and tables ================== From d1a050738e2660b500f4ddb7420a7d7bd0594b8e Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Tue, 30 Jul 2024 16:44:28 +0500 Subject: [PATCH 4/9] chore: deprecate edx-sphinx-theme --- tox.ini | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tox.ini b/tox.ini index 4783b49..01e304b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{42}-celery{53}, quality, rst_validation, docs, pii_check +envlist = py38-django{42}-celery{53}, quality, docs, pii_check [doc8] ignore = D001 @@ -43,14 +43,6 @@ commands = python manage.py check pytest {posargs} -[testenv:rst_validation] -allowlist_externals = - make -deps = - -r{toxinidir}/requirements/quality.txt -commands = - make quality-rst - [testenv:docs] setenv = DJANGO_SETTINGS_MODULE = test_settings From 62fe5105ac069e08ee839cb55819af25b2d9b69f Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Mon, 2 Sep 2024 13:24:34 +0500 Subject: [PATCH 5/9] perf: enable rst validation --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d7a6f6..a591a7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: os: [ubuntu-20.04] python-version: ["3.8"] node-version: ["10"] - toxenv: [django42, quality, pii_check] + toxenv: [django42, quality, pii_check, rst_validation] steps: - uses: actions/checkout@v1 From fbaebb949580b9b00209cc6c4d57d29489859487 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Mon, 2 Sep 2024 15:35:32 +0500 Subject: [PATCH 6/9] fix: add tox env for rst validation --- tox.ini | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 01e304b..80f9fba 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{42}-celery{53}, quality, docs, pii_check +envlist = py38-django{42}-celery{53}, quality, docs, pii_check, rst_validation [doc8] ignore = D001 @@ -43,6 +43,14 @@ commands = python manage.py check pytest {posargs} +[testenv:rst_validation] +allowlist_externals = + make +deps = + -r{toxinidir}/requirements/quality.txt +commands = + make quality-rst + [testenv:docs] setenv = DJANGO_SETTINGS_MODULE = test_settings From bc6b641dbab323078144465f6d2aaeb3ef4fdc5c Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Mon, 2 Sep 2024 15:46:35 +0500 Subject: [PATCH 7/9] fix: ignore sphinx directives and roles in rst validation --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3c68c78..f4d79cb 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ quality-python: ## Run python linters tox -e quality quality-rst: ## validate rst files - rstcheck -r --report-level warning . + rstcheck -r --report-level warning --ignore-directives=toctree --ignore-roles=ref . quality: quality-python quality-rst ## Run linters From 7eddd9cfedf9ab66d110e0cc147ea3ab0471971f Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Wed, 30 Oct 2024 14:36:02 +0500 Subject: [PATCH 8/9] chore: update license, author and org information --- docs/conf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 40a9db3..f28efab 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,10 +7,11 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os +from datetime import datetime project = 'edx-name-affirmation' -copyright = '2024, edx-org' -author = 'edx-org' +copyright = f'{datetime.now().year}, edX LLC.' # pylint: disable=redefined-builtin +author = 'edX LLC' release = '2.3.7' # -- General configuration --------------------------------------------------- @@ -45,10 +46,10 @@ These works by Axim Collaborative + >edX LLC are licensed under a Date: Wed, 30 Oct 2024 16:28:41 +0500 Subject: [PATCH 9/9] fix: removed venv --- docs/venv/pyvenv.cfg | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 docs/venv/pyvenv.cfg diff --git a/docs/venv/pyvenv.cfg b/docs/venv/pyvenv.cfg deleted file mode 100644 index 4760c1f..0000000 --- a/docs/venv/pyvenv.cfg +++ /dev/null @@ -1,3 +0,0 @@ -home = /Library/Developer/CommandLineTools/usr/bin -include-system-site-packages = false -version = 3.9.6