From 1ae7ca5cd9b9b47356f00a4d0ba0789566a4b342 Mon Sep 17 00:00:00 2001 From: Harri Hirvonsalo Date: Wed, 2 Aug 2017 17:27:26 +0200 Subject: [PATCH] docs: fix example app documentation rendering * fix example app rendering problems on readthedocs. (closes #107) * fix couple of isort-errors Signed-off-by: Harri Hirvonsalo --- docs/conf.py | 2 +- docs/examplesapp.rst | 4 +++- examples/app.py | 6 +++++- .../alembic/999c62899c20_create_pidstore_tables.py | 1 - .../alembic/f615cee99600_create_pidstore_branch.py | 1 - 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 90c7e4d..e438f1f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -69,7 +69,7 @@ # General information about the project. project = u'Invenio-PIDStore' -copyright = u'2015, CERN' +copyright = u'2017, CERN' author = u'CERN' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/examplesapp.rst b/docs/examplesapp.rst index 7a7645f..39c6d88 100644 --- a/docs/examplesapp.rst +++ b/docs/examplesapp.rst @@ -25,4 +25,6 @@ Example application =================== -.. automodule:: app +.. include:: ../examples/app.py + :start-after: SPHINX-START + :end-before: SPHINX-END diff --git a/examples/app.py b/examples/app.py index 6e4d861..4c17b4d 100644 --- a/examples/app.py +++ b/examples/app.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2015, 2016 CERN. +# Copyright (C) 2015, 2016, 2017 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as @@ -25,6 +25,8 @@ """Minimal Flask application example for development. +SPHINX-START + Start the Redis server. Install the requirements: @@ -60,6 +62,8 @@ $ ./app-teardown.sh +SPHINX-END + """ from __future__ import absolute_import, print_function diff --git a/invenio_pidstore/alembic/999c62899c20_create_pidstore_tables.py b/invenio_pidstore/alembic/999c62899c20_create_pidstore_tables.py index cbb8b57..512d709 100644 --- a/invenio_pidstore/alembic/999c62899c20_create_pidstore_tables.py +++ b/invenio_pidstore/alembic/999c62899c20_create_pidstore_tables.py @@ -27,7 +27,6 @@ import sqlalchemy_utils from alembic import op - # revision identifiers, used by Alembic. revision = '999c62899c20' down_revision = 'f615cee99600' diff --git a/invenio_pidstore/alembic/f615cee99600_create_pidstore_branch.py b/invenio_pidstore/alembic/f615cee99600_create_pidstore_branch.py index 4e27a09..69ac57b 100644 --- a/invenio_pidstore/alembic/f615cee99600_create_pidstore_branch.py +++ b/invenio_pidstore/alembic/f615cee99600_create_pidstore_branch.py @@ -26,7 +26,6 @@ import sqlalchemy as sa from alembic import op - # revision identifiers, used by Alembic. revision = 'f615cee99600' down_revision = None