diff --git a/docs/source/_static/hippiepug.svg b/docs/source/_static/hippiepug.svg new file mode 120000 index 0000000..c0d0c72 --- /dev/null +++ b/docs/source/_static/hippiepug.svg @@ -0,0 +1 @@ +../../../hippiepug.svg \ No newline at end of file diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html new file mode 100644 index 0000000..77b00ab --- /dev/null +++ b/docs/source/_templates/layout.html @@ -0,0 +1,15 @@ +{% extends "!layout.html" %} + {% block footer %} {{ super() }} + + +{% endblock %} + diff --git a/docs/source/api.rst b/docs/source/api.rst index 137dd85..b8c98c4 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -1,35 +1,31 @@ +*** API *** -===== Chain ===== .. automodule:: hippiepug.chain :members: -==== Tree ==== .. automodule:: hippiepug.tree :members: -================ Basic containers ================ .. automodule:: hippiepug.struct :members: -===== Store ===== .. automodule:: hippiepug.store :members: -============= Serialization ============= diff --git a/docs/source/conf.py b/docs/source/conf.py index 751ff20..add7d9c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,6 +20,8 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('../../')) +from hippiepug.meta import __version__, __author__, description + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -50,16 +52,16 @@ # General information about the project. project = u'hippiepug' copyright = u'2018, Bogdan Kulynych, EPFL SPRING Lab' -author = u'Bogdan Kulynych' +author = __author__ # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = u'1.0' +version = __version__ # The full version, including alpha/beta/rc tags. -release = u'1.0' +release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -225,7 +227,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'hippiepug.tex', u'hippiepug Documentation', - u'Bogdan Kulynych', 'manual'), + author, 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -269,7 +271,7 @@ # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'hippiepug', u'hippiepug Documentation', - author, 'hippiepug', 'hippiepug library', + author, 'hippiepug', description, 'Miscellaneous'), ] @@ -284,3 +286,16 @@ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False + +# -- Readthedocs --------------------------------------------------------- + + +html_theme_options = { + # 'logo_only': False, + 'display_version': False, + 'collapse_navigation': False, + 'sticky_navigation': True, + 'navigation_depth': 2, +} + + diff --git a/docs/source/index.rst b/docs/source/index.rst index 32675aa..22bbf38 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,3 +1,7 @@ +.. image:: _static/hippiepug.svg + :width: 150px + :align: right + --------- hippiepug --------- diff --git a/hippiepug/meta.py b/hippiepug/meta.py new file mode 100644 index 0000000..5b8685f --- /dev/null +++ b/hippiepug/meta.py @@ -0,0 +1,5 @@ +__version__ = '0.1' +__author__ = 'Bogdan Kulynych' + +description = ('Sublinear-traversal blockchains and efficient key-value ' + 'Merkle trees with a flexible storage backend.') diff --git a/setup.py b/setup.py index 9229691..d8d6c0c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import os from setuptools import setup - +from hippiepug.meta import __author__, __version__, description install_requires = [ 'six>=1.11.0', @@ -25,22 +25,17 @@ ] -description = ('Sublinear-traversal blockchains and efficient key-value ' - 'Merkle trees with a flexible storage backend.') - - here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as f: long_description = f.read() - setup( name='hippiepug', - version=0.1, + version=__version__, description=description, long_description=long_description, - author='Bogdan Kulynych', + author=__author__, author_email='hello@bogdankulynych.me', packages=['hippiepug'], license="AGPL",