Fix sphinx doc generation + error in doi module

This commit is contained in:
Lucas Verney 2016-01-10 18:35:08 +01:00
parent 7a281528e3
commit c964dcb0c6
6 changed files with 73 additions and 21 deletions

View File

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
#
# LibBMC documentation build configuration file, created by
# sphinx-quickstart on Mon Dec 28 01:00:41 2015.
# sphinx-quickstart on Sun Jan 10 18:28:24 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
@ -20,8 +20,7 @@ import shlex
# 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('../../libbmc'))
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ------------------------------------------------
@ -56,29 +55,24 @@ master_doc = 'index'
# General information about the project.
project = 'LibBMC'
copyright = '2015, Phyks (Lucas Verney)'
copyright = '2016, Phyks (Lucas Verney)'
author = 'Phyks (Lucas Verney)'
# 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.
#
try:
import libbmc
# The short X.Y version.
version = libbmc.__version__
# The full version, including alpha/beta/rc tags.
release = libbmc.__version__
except ImportError:
version = 'latest'
release = 'latest'
# The short X.Y version.
version = 'v1'
# The full version, including alpha/beta/rc tags.
release = 'v1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
#language = None
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
@ -122,7 +116,7 @@ todo_include_todos = True
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@ -296,7 +290,3 @@ texinfo_documents = [
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}

View File

@ -1,5 +1,5 @@
.. LibBMC documentation master file, created by
sphinx-quickstart on Mon Dec 28 01:00:41 2015.
sphinx-quickstart on Sun Jan 10 18:28:24 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

54
docs/source/libbmc.rst Normal file
View File

@ -0,0 +1,54 @@
libbmc package
==============
Submodules
----------
libbmc.bibtex module
--------------------
.. automodule:: libbmc.bibtex
:members:
:undoc-members:
:show-inheritance:
libbmc.doi module
-----------------
.. automodule:: libbmc.doi
:members:
:undoc-members:
:show-inheritance:
libbmc.fetcher module
---------------------
.. automodule:: libbmc.fetcher
:members:
:undoc-members:
:show-inheritance:
libbmc.isbn module
------------------
.. automodule:: libbmc.isbn
:members:
:undoc-members:
:show-inheritance:
libbmc.tools module
-------------------
.. automodule:: libbmc.tools
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: libbmc
:members:
:undoc-members:
:show-inheritance:

7
docs/source/modules.rst Normal file
View File

@ -0,0 +1,7 @@
libbmc
======
.. toctree::
:maxdepth: 4
libbmc

View File

@ -4,7 +4,7 @@ This file contains all the DOI-related functions.
import re
import requests
from requests.exception import RequestException
from requests.exceptions import RequestException
from libbmc import tools

View File

@ -2,3 +2,4 @@ arxiv2bib>=1.0.7
bibtexparser>=0.6.2
isbnlib>=3.5.7
requests>=2.9.1
PySocks>=1.5.6