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 -*- # -*- coding: utf-8 -*-
# #
# LibBMC documentation build configuration file, created by # 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 # This file is execfile()d with the current directory set to its
# containing dir. # containing dir.
@ -20,8 +20,7 @@ import shlex
# If extensions (or modules to document with autodoc) are in another directory, # 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 # 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. # 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('../..'))
sys.path.insert(0, os.path.abspath('../../libbmc'))
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
@ -56,29 +55,24 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = 'LibBMC' project = 'LibBMC'
copyright = '2015, Phyks (Lucas Verney)' copyright = '2016, Phyks (Lucas Verney)'
author = 'Phyks (Lucas Verney)' author = 'Phyks (Lucas Verney)'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
try: # The short X.Y version.
import libbmc version = 'v1'
# The short X.Y version. # The full version, including alpha/beta/rc tags.
version = libbmc.__version__ release = 'v1'
# The full version, including alpha/beta/rc tags.
release = libbmc.__version__
except ImportError:
version = 'latest'
release = 'latest'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
# #
# This is also used if you do content translation via gettext catalogs. # This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases. # 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 # There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: # 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 # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # 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 # 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 # 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. # If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False #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 .. 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 You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. 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 re
import requests import requests
from requests.exception import RequestException from requests.exceptions import RequestException
from libbmc import tools from libbmc import tools

View File

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