From c964dcb0c630b37484fbd458ce855f378fcc830f Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sun, 10 Jan 2016 18:35:08 +0100 Subject: [PATCH] Fix sphinx doc generation + error in doi module --- docs/source/conf.py | 28 +++++++-------------- docs/source/index.rst | 2 +- docs/source/libbmc.rst | 54 +++++++++++++++++++++++++++++++++++++++++ docs/source/modules.rst | 7 ++++++ libbmc/doi.py | 2 +- requirements.txt | 1 + 6 files changed, 73 insertions(+), 21 deletions(-) create mode 100644 docs/source/libbmc.rst create mode 100644 docs/source/modules.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 42931c6..f2db36a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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} diff --git a/docs/source/index.rst b/docs/source/index.rst index b459122..69de99a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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. diff --git a/docs/source/libbmc.rst b/docs/source/libbmc.rst new file mode 100644 index 0000000..738a43e --- /dev/null +++ b/docs/source/libbmc.rst @@ -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: diff --git a/docs/source/modules.rst b/docs/source/modules.rst new file mode 100644 index 0000000..7dfeec5 --- /dev/null +++ b/docs/source/modules.rst @@ -0,0 +1,7 @@ +libbmc +====== + +.. toctree:: + :maxdepth: 4 + + libbmc diff --git a/libbmc/doi.py b/libbmc/doi.py index 45b46ea..f976489 100644 --- a/libbmc/doi.py +++ b/libbmc/doi.py @@ -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 diff --git a/requirements.txt b/requirements.txt index 91bb5ed..6faab09 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ arxiv2bib>=1.0.7 bibtexparser>=0.6.2 isbnlib>=3.5.7 requests>=2.9.1 +PySocks>=1.5.6