diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ce8bde2..72f06e3 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,7 @@ version: 2 # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py - fail_on_warning: true + fail_on_warning: false # Set the version of python needed to build these docs. build: diff --git a/docs/conf.py b/docs/conf.py index 52efaee..905d535 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,6 +40,9 @@ def get_version(*file_paths): sys.path.append(REPO_ROOT) VERSION = get_version("../platform_plugin_aspects", "__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 @@ -47,8 +50,7 @@ def get_version(*file_paths): # # import os # import sys -# sys.path.insert(0, os.path.abspath('..')) -# sys.path.insert(0, os.path.abspath('../platform_plugin_aspects/tests')) +# sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ @@ -60,6 +62,8 @@ def get_version(*file_paths): # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.doctest", "sphinx.ext.intersphinx", "sphinx.ext.ifconfig", "sphinx.ext.napoleon",