From 08625c20910a62dfc53d95ff09bcaf1190342de7 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 5 Dec 2023 11:23:42 -0500 Subject: [PATCH 1/3] docs: Need django configured to properly build docs now. --- docs/conf.py | 13 ++++++++++++- docs/docs_settings.py | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 docs/docs_settings.py diff --git a/docs/conf.py b/docs/conf.py index b386bb2e6..db3f46c03 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,9 +13,9 @@ import datetime import os import sys - from unittest import mock +import django MOCK_MODULES = [ 'webob', @@ -32,8 +32,19 @@ sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('..xblock',)) from xblock import __version__ + # -- General configuration ----------------------------------------------------- +# Use a settings module that allows all LMS and Studio code to be imported +# without errors. If running sphinx-apidoc, we already set a different +# settings module to use in the on_init() hook of the parent process +if 'DJANGO_SETTINGS_MODULE' not in os.environ: + os.environ['DJANGO_SETTINGS_MODULE'] = 'docs.docs_settings' + +django.setup() + + + # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' diff --git a/docs/docs_settings.py b/docs/docs_settings.py new file mode 100644 index 000000000..0cec4b57f --- /dev/null +++ b/docs/docs_settings.py @@ -0,0 +1 @@ +SECRET_KEY = "NOT_SECRET_KEy" From 9bf2e8b8ff06078219684d36631696053f9c3a7d Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 5 Dec 2023 12:26:12 -0500 Subject: [PATCH 2/3] docs: Fail the docs build on warnings. --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 0e058e314..b409afa6b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,7 +2,7 @@ # # You can set these variables from the command line. -SPHINXOPTS = -a -E +SPHINXOPTS = -W -a -E SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build From 2e33df8a6c1639707f62eb170fda6966abf66dba Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 5 Dec 2023 12:29:36 -0500 Subject: [PATCH 3/3] docs: Update an intersphinx link after an upstream update. --- docs/xblock-tutorial/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/xblock-tutorial/glossary.rst b/docs/xblock-tutorial/glossary.rst index d1e39a5fe..ed497b813 100644 --- a/docs/xblock-tutorial/glossary.rst +++ b/docs/xblock-tutorial/glossary.rst @@ -2,4 +2,4 @@ Open edX Glossary ################# -:doc:`docs-openedx-org:developers/references/developer_guide/glossary` +:doc:`docs-openedx-org:developers/references/glossary`