From c061d3cbb263b71941ea1ab99c6137b6b7ca071d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauricio=20V=C3=A1squez?= Date: Fri, 8 May 2020 11:38:37 -0500 Subject: [PATCH] docs: Add missing dependencies and fix django (#657) - Add missing sqlalchemy and django dependencies - Configure django in docs/conf.py to avoid non configured exeception --- docs-requirements.txt | 2 ++ docs/conf.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/docs-requirements.txt b/docs-requirements.txt index ca3db13e0a5..26b74cccc29 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -5,6 +5,7 @@ sphinx-autodoc-typehints~=1.10.2 # Required by ext packages aiohttp ~= 3.0 Deprecated>=1.2.6 +django>=2.2 PyMySQL~=0.9.3 flask~=1.0 mysql-connector-python~=8.0 @@ -13,5 +14,6 @@ prometheus_client>=0.5.0,<1.0.0 psycopg2-binary>=2.7.3.1 pymongo~=3.1 redis>=2.6 +sqlalchemy>=1.0 thrift>=0.10.0 wrapt >=1.0.0,<2.0.0 diff --git a/docs/conf.py b/docs/conf.py index c71995dfb4f..3ea491b4fc8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,15 @@ from os import listdir from os.path import isdir, join +# configure django to avoid the following exception: +# django.core.exceptions.ImproperlyConfigured: Requested settings, but settings +# are not configured. You must either define the environment variable +# DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. +from django.conf import settings + +settings.configure() + + source_dirs = [ os.path.abspath("../opentelemetry-api/src/"), os.path.abspath("../opentelemetry-sdk/src/"),