From c4e182f2c5a23677caee6f9536ecd9667c602659 Mon Sep 17 00:00:00 2001 From: Valerij Maljulin Date: Aug 09 2021 13:19:16 +0000 Subject: Documentation config for the readthedocs.io JIRA: RHELWF-3453 --- diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..37b074e --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,16 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.8 + install: + - requirements: docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..09d386c --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,12 @@ +fedora_messaging +Flask +flask-cors +Flask-Migrate +Flask-RESTful!=0.3.6 +flask-oidc +stomp.py +sphinx < 4 +sphinxcontrib-httpdomain +prometheus_client +dogpile.cache +PyYAML diff --git a/waiverdb/app.py b/waiverdb/app.py index 664988c..a9e3055 100644 --- a/waiverdb/app.py +++ b/waiverdb/app.py @@ -46,6 +46,10 @@ def load_config(app): default_config_obj = 'waiverdb.config.TestingConfig' default_config_file = os.getcwd() + '/conf/settings.py' silent = True + elif os.getenv('DOCS') == 'true': + default_config_obj = 'waiverdb.config.DevelopmentConfig' + default_config_file = os.getcwd() + '/conf/settings.py' + silent = True else: default_config_obj = 'waiverdb.config.ProductionConfig' default_config_file = '/etc/waiverdb/settings.py' diff --git a/waiverdb/auth.py b/waiverdb/auth.py index cba892d..f4881c9 100644 --- a/waiverdb/auth.py +++ b/waiverdb/auth.py @@ -2,7 +2,9 @@ import base64 -import gssapi +import os +if not os.getenv('DOCS'): # installing gssapi causing a problem for documentation building + import gssapi from flask import current_app, Response, g from werkzeug.exceptions import Unauthorized, Forbidden