Skip to content

Commit

Permalink
Merge pull request #214 from akatsoulas/fix-warnings-doc
Browse files Browse the repository at this point in the history
Add test settings in Sphinx conf.
  • Loading branch information
akatsoulas committed Apr 13, 2018
2 parents 6f93620 + f24a4db commit 367831a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ output/*/index.html

# Sphinx
docs/_build
docs/source
1 change: 1 addition & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Pull Request Guidelines
-----------------------

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ coverage: ## check code coverage quickly with the default Python
open htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/mozilla-django-oidc.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ mozilla_django_oidc
rm -rf docs/source
sphinx-apidoc -o docs/source/ mozilla_django_oidc
$(MAKE) -C docs clean
$(MAKE) -C docs html

Expand Down
10 changes: 8 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,20 @@
# 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.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../'))

cwd = os.getcwd()
parent = os.path.dirname(cwd)
sys.path.append(parent)

os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'

import django
import mozilla_django_oidc


django.setup()

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -129,7 +135,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ Contents:
contributing
authors
history
source/modules.rst
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Django templates example:

Jinja2 templates example:

.. code-block:: html+jinja2
.. code-block:: html+jinja

<html>
<body>
Expand Down

0 comments on commit 367831a

Please sign in to comment.