Blackened tests and docs
This commit is contained in:
parent
5966ce29be
commit
d9cb00568a
7 changed files with 160 additions and 178 deletions
|
|
@ -17,32 +17,34 @@ import sys
|
|||
|
||||
# Load module from relative imports
|
||||
|
||||
module_path = os.path.abspath('../..')
|
||||
module_path = os.path.abspath("../..")
|
||||
sys.path.insert(0, module_path)
|
||||
|
||||
# Handle mock imports for non-platform-agnostic modules
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
|
||||
class Mock(MagicMock):
|
||||
@classmethod
|
||||
def __getattr__(cls, name):
|
||||
return MagicMock()
|
||||
|
||||
mock_imports = ['picamera', 'picamera.array', 'picamera.mmalobj']
|
||||
|
||||
mock_imports = ["picamera", "picamera.array", "picamera.mmalobj"]
|
||||
|
||||
sys.modules.update((mod_name, Mock()) for mod_name in mock_imports)
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'OpenFlexure Microscope Software'
|
||||
copyright = '2018, Bath Open Instrumentation Group'
|
||||
author = 'Bath Open Instrumentation Group'
|
||||
project = "OpenFlexure Microscope Software"
|
||||
copyright = "2018, Bath Open Instrumentation Group"
|
||||
author = "Bath Open Instrumentation Group"
|
||||
|
||||
# The short X.Y version
|
||||
version = ''
|
||||
version = ""
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = ''
|
||||
release = ""
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
|
@ -55,32 +57,32 @@ release = ''
|
|||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.todo',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.githubpages',
|
||||
'sphinx.ext.ifconfig',
|
||||
'sphinxcontrib.httpdomain',
|
||||
'sphinxcontrib.autohttp.flask',
|
||||
'sphinxcontrib.autohttp.flaskqref'
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.intersphinx",
|
||||
"sphinx.ext.todo",
|
||||
"sphinx.ext.viewcode",
|
||||
"sphinx.ext.githubpages",
|
||||
"sphinx.ext.ifconfig",
|
||||
"sphinxcontrib.httpdomain",
|
||||
"sphinxcontrib.autohttp.flask",
|
||||
"sphinxcontrib.autohttp.flaskqref",
|
||||
]
|
||||
|
||||
# Override ordering
|
||||
autodoc_member_order = 'bysource'
|
||||
autodoc_member_order = "bysource"
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
#
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
source_suffix = ".rst"
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
master_doc = "index"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
@ -114,7 +116,7 @@ html_theme = "sphinx_rtd_theme"
|
|||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
html_static_path = ["_static"]
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
|
|
@ -130,7 +132,7 @@ html_static_path = ['_static']
|
|||
# -- Options for HTMLHelp output ---------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'OpenFlexureMicroscopeSoftwaredoc'
|
||||
htmlhelp_basename = "OpenFlexureMicroscopeSoftwaredoc"
|
||||
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------
|
||||
|
|
@ -139,15 +141,12 @@ latex_elements = {
|
|||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
|
|
@ -157,8 +156,13 @@ latex_elements = {
|
|||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'OpenFlexureMicroscopeSoftware.tex', 'OpenFlexure Microscope Software Documentation',
|
||||
'Bath Open Instrumentation Group', 'manual'),
|
||||
(
|
||||
master_doc,
|
||||
"OpenFlexureMicroscopeSoftware.tex",
|
||||
"OpenFlexure Microscope Software Documentation",
|
||||
"Bath Open Instrumentation Group",
|
||||
"manual",
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -167,8 +171,13 @@ latex_documents = [
|
|||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'openflexuremicroscopesoftware', 'OpenFlexure Microscope Software Documentation',
|
||||
[author], 1)
|
||||
(
|
||||
master_doc,
|
||||
"openflexuremicroscopesoftware",
|
||||
"OpenFlexure Microscope Software Documentation",
|
||||
[author],
|
||||
1,
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -178,9 +187,15 @@ man_pages = [
|
|||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'OpenFlexureMicroscopeSoftware', 'OpenFlexure Microscope Software Documentation',
|
||||
author, 'OpenFlexureMicroscopeSoftware', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
(
|
||||
master_doc,
|
||||
"OpenFlexureMicroscopeSoftware",
|
||||
"OpenFlexure Microscope Software Documentation",
|
||||
author,
|
||||
"OpenFlexureMicroscopeSoftware",
|
||||
"One line description of project.",
|
||||
"Miscellaneous",
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -199,7 +214,7 @@ epub_title = project
|
|||
# epub_uid = ''
|
||||
|
||||
# A list of files that should not be packed into the epub file.
|
||||
epub_exclude_files = ['search.html']
|
||||
epub_exclude_files = ["search.html"]
|
||||
|
||||
|
||||
# -- Extension configuration -------------------------------------------------
|
||||
|
|
@ -208,11 +223,11 @@ epub_exclude_files = ['search.html']
|
|||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {
|
||||
'openflexure_stage': ('https://openflexure-stage.readthedocs.io/en/latest/', None),
|
||||
'picamera': ('https://picamera.readthedocs.io/en/release-1.13/', None)
|
||||
}
|
||||
"openflexure_stage": ("https://openflexure-stage.readthedocs.io/en/latest/", None),
|
||||
"picamera": ("https://picamera.readthedocs.io/en/release-1.13/", None),
|
||||
}
|
||||
|
||||
# -- Options for todo extension ----------------------------------------------
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = True
|
||||
todo_include_todos = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue