Skip to content

Commit

Permalink
chore: Attempting to fix Sphinx autodoc
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtcril committed Apr 10, 2024
1 parent 8bb7b69 commit 564e4c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# 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 ------------------------------------------------

Expand All @@ -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",
Expand Down

0 comments on commit 564e4c6

Please sign in to comment.