Skip to content

Commit

Permalink
Minor doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpitkin committed Nov 27, 2017
1 parent 3fee4f3 commit 15e4f60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
28 changes: 6 additions & 22 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import sys
import os
import re
import psrqpy

# 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
Expand All @@ -23,6 +23,7 @@

# Insert Requests' path into the system.
sys.path.insert(0, os.path.abspath('../../psrqpy'))
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -64,20 +65,10 @@
# built documents.
#

def readfile(filename):
with open(filename, 'r') as fp:
filecontents = fp.read()
return filecontents

VERSION_REGEX = re.compile("__version__ = \"(.*?)\"")
CONTENTS = readfile(os.path.join("../../psrqpy", "__init__.py"))

VERSION = VERSION_REGEX.findall(CONTENTS)[0]

# The short X.Y version.
version = VERSION
version = psrqpy.__version__
# The full version, including alpha/beta/rc tags.
release = VERSION
release = psrqpy.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -105,7 +96,7 @@ def readfile(filename):

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
add_module_names = False

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
Expand All @@ -129,14 +120,7 @@ def readfile(filename):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#html_theme = 'alabaster'

# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = 'sphinx_rtd_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
Expand Down
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ API interface
config
utils


Copyright and referencing for the catalogue
-------------------------------------------

Expand Down

0 comments on commit 15e4f60

Please sign in to comment.