Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 22 additions & 26 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
#!/usr/bin/env python3
#

# Parselmouth documentation build configuration file, created by
# sphinx-quickstart on Tue Sep 12 00:08:01 2017.
#

# This file is execfile()d with the current directory set to its
# containing dir.
#

# Note that not all possible configuration values are present in this
# autogenerated file.
#

# All configuration values have a default; values that are commented out
# serve to show the default.

# 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.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import git
import github
Expand All @@ -34,15 +30,15 @@

on_rtd = os.environ.get('READTHEDOCS') == 'True'

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

# If your documentation needs a minimal Sphinx version, state it here.
#
# If your documentation needs a minimal Sphinx version, state it here:
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.

extensions = ['sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
Expand All @@ -60,7 +56,6 @@

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

Expand Down Expand Up @@ -91,27 +86,30 @@
if i == 4:
raise
time.sleep(15)

artifact_bin = io.BytesIO(requests.get(archive_download_url, headers={'Authorization': f'token {github_token}'}, stream=True).content)

with zipfile.ZipFile(artifact_bin) as zf, tempfile.TemporaryDirectory() as tmpdir:
assert len(zf.namelist()) == 1
zf.extractall(tmpdir)
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--force-reinstall', tmpdir + '/' + zf.namelist()[0]])



import parselmouth

# 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 = '.'.join(parselmouth.__version__.split('.')[:2])

# The full version, including alpha/beta/rc tags.
release = parselmouth.__version__

# 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 = 'en'
Expand Down Expand Up @@ -180,17 +178,16 @@ def setup(app):
app.add_css_file('css/custom.css')


# -- Options for HTML output ----------------------------------------------
# ------------------- Options for HTML output --------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_book_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
# documentation.
#

# html_theme_options = {}

html_logo = "images/logo.png"
Expand All @@ -214,7 +211,7 @@ def setup(app):

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#

# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
# html_sidebars = {
Expand All @@ -228,13 +225,13 @@ def setup(app):
# }


# -- Options for HTMLHelp output ------------------------------------------
# ------------------- Options for HTMLHelp output --------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'Parselmouthdoc'


# -- Options for LaTeX output ---------------------------------------------
# ------------------- Options for LaTeX output -----------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
Expand Down Expand Up @@ -263,7 +260,7 @@ def setup(app):
]


# -- Options for manual page output ---------------------------------------
# ------------------- Options for manual page output --------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
Expand All @@ -273,7 +270,7 @@ def setup(app):
]


# -- Options for Texinfo output -------------------------------------------
# ------------------- Options for Texinfo output ------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
Expand All @@ -288,8 +285,7 @@ def setup(app):
latex_logo = "images/logo-full.pdf"



# -- Options for Epub output ----------------------------------------------
# ------------------- Options for Epub output ---------------------------------

# Bibliographic Dublin Core info.
epub_title = project
Expand All @@ -299,11 +295,11 @@ def setup(app):

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#

# epub_identifier = ''

# A unique identification for the text.
#

# epub_uid = ''

# A list of files that should not be packed into the epub file.
Expand Down