Skip to content

Commit 2834a04

Browse files
committed
fix error in favicon package name, black formatting
1 parent 3a6fa86 commit 2834a04

1 file changed

Lines changed: 48 additions & 45 deletions

File tree

docs/source/conf.py

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,23 @@
1313
#
1414
import os
1515
import sys
16+
1617
# sys.path.insert(0, os.path.abspath('.'))
1718
# sys.path.insert(0, os.path.abspath('..'))
1819

1920

2021
# -- Project information -----------------------------------------------------
2122

22-
project = 'Spatial Maths package'
23-
copyright = '2020-, Peter Corke.'
24-
author = 'Peter Corke'
23+
project = "Spatial Maths package"
24+
copyright = "2020-, Peter Corke."
25+
author = "Peter Corke"
2526
try:
2627
import spatialmath
28+
2729
version = spatialmath.__version__
2830
except AttributeError:
2931
import re
32+
3033
with open("../../pyproject.toml", "r") as f:
3134
m = re.compile(r'version\s*=\s*"([0-9\.]+)"').search(f.read())
3235
version = m[1]
@@ -36,90 +39,89 @@
3639
# Add any Sphinx extension module names here, as strings. They can be
3740
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3841
# ones.
39-
extensions = [
40-
'sphinx.ext.autodoc',
41-
'sphinx.ext.todo',
42-
'sphinx.ext.viewcode',
43-
'sphinx.ext.mathjax',
44-
'sphinx.ext.coverage',
45-
'sphinx.ext.doctest',
46-
'sphinx.ext.inheritance_diagram',
47-
'matplotlib.sphinxext.plot_directive',
42+
extensions = [
43+
"sphinx.ext.autodoc",
44+
"sphinx.ext.todo",
45+
"sphinx.ext.viewcode",
46+
"sphinx.ext.mathjax",
47+
"sphinx.ext.coverage",
48+
"sphinx.ext.doctest",
49+
"sphinx.ext.inheritance_diagram",
50+
"matplotlib.sphinxext.plot_directive",
4851
"sphinx_autodoc_typehints",
49-
'sphinx_autorun',
52+
"sphinx_autorun",
5053
"sphinx.ext.intersphinx",
51-
"sphinx-favicon",
52-
]
53-
#'sphinx.ext.autosummary',
54+
"sphinx_favicon",
55+
]
56+
#'sphinx.ext.autosummary',
5457
# typehints_use_signature_return = True
5558

5659
# inheritance_node_attrs = dict(style='rounded,filled', fillcolor='lightblue')
57-
inheritance_node_attrs = dict(style='rounded')
60+
inheritance_node_attrs = dict(style="rounded")
5861

5962
autosummary_generate = True
60-
autodoc_member_order = 'groupwise'
63+
autodoc_member_order = "groupwise"
6164
# bysource
6265

6366
# Add any paths that contain templates here, relative to this directory.
64-
templates_path = ['_templates']
67+
templates_path = ["_templates"]
6568

6669
# List of patterns, relative to source directory, that match files and
6770
# directories to ignore when looking for source files.
6871
# This pattern also affects html_static_path and html_extra_path.
69-
exclude_patterns = ['test_*']
72+
exclude_patterns = ["test_*"]
7073

71-
add_module_names = False
74+
add_module_names = False
7275
# -- Options for HTML output -------------------------------------------------
7376

7477
# The theme to use for HTML and HTML Help pages. See the documentation for
7578
# a list of builtin themes.
7679
#
77-
html_theme = 'sphinx_rtd_theme'
78-
#html_theme = 'alabaster'
79-
#html_theme = 'pyramid'
80-
#html_theme = 'sphinxdoc'
80+
html_theme = "sphinx_rtd_theme"
81+
# html_theme = 'alabaster'
82+
# html_theme = 'pyramid'
83+
# html_theme = 'sphinxdoc'
8184

8285
html_theme_options = {
8386
#'github_user': 'petercorke',
8487
#'github_repo': 'spatialmath-python',
8588
#'logo_name': False,
86-
'logo_only': False,
89+
"logo_only": False,
8790
#'description': 'Spatial maths and geometry for Python',
88-
'display_version': True,
89-
'prev_next_buttons_location': 'both',
90-
'analytics_id': 'G-11Q6WJM565',
91-
92-
}
93-
html_logo = '../figs/CartesianSnakes_LogoW.png'
91+
"display_version": True,
92+
"prev_next_buttons_location": "both",
93+
"analytics_id": "G-11Q6WJM565",
94+
}
95+
html_logo = "../figs/CartesianSnakes_LogoW.png"
9496

9597
# Add any paths that contain custom static files (such as style sheets) here,
9698
# relative to this directory. They are copied after the builtin static files,
9799
# so a file named "default.css" will overwrite the builtin "default.css".
98100
# html_static_path = ['_static']
99101

100-
# autodoc_mock_imports = ["numpy", "scipy"]
101-
html_last_updated_fmt = '%d-%b-%Y'
102+
# autodoc_mock_imports = ["numpy", "scipy"]
103+
html_last_updated_fmt = "%d-%b-%Y"
102104
# extensions = ['rst2pdf.pdfbuilder']
103105
# pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Your Name'),]
104-
latex_engine = 'xelatex'
106+
latex_engine = "xelatex"
105107
# maybe need to set graphics path in here somewhere
106108
# \graphicspath{{figures/}{../figures/}{C:/Users/me/Documents/project/figures/}}
107109
# https://stackoverflow.com/questions/63452024/how-to-include-image-files-in-sphinx-latex-pdf-files
108110
latex_elements = {
109111
# The paper size ('letterpaper' or 'a4paper').
110-
'papersize': 'a4paper',
112+
"papersize": "a4paper",
111113
#'releasename':" ",
112114
# Sonny, Lenny, Glenn, Conny, Rejne, Bjarne and Bjornstrup
113115
# 'fncychap': '\\usepackage[Lenny]{fncychap}',
114-
'fncychap': '\\usepackage{fncychap}',
116+
"fncychap": "\\usepackage{fncychap}",
115117
}
116118

117119
# -------- RVC maths notation -------------------------------------------------------#
118120

119121
# see https://stackoverflow.com/questions/9728292/creating-latex-math-macros-within-sphinx
120122
mathjax3_config = {
121-
'tex': {
122-
'macros': {
123+
"tex": {
124+
"macros": {
123125
# RVC Math notation
124126
# - not possible to do the if/then/else approach
125127
# - subset only
@@ -149,16 +151,17 @@
149151
# quaternions
150152
"q": r"\mathring{q}",
151153
"fq": [r"\presup{#1}\mathring{q}", 1],
152-
153154
}
154-
}
155+
}
155156
}
156157

157158

158159
autorun_languages = {}
159-
autorun_languages['pycon_output_encoding'] = 'UTF-8'
160-
autorun_languages['pycon_input_encoding'] = 'UTF-8'
161-
autorun_languages['pycon_runfirst'] = """
160+
autorun_languages["pycon_output_encoding"] = "UTF-8"
161+
autorun_languages["pycon_input_encoding"] = "UTF-8"
162+
autorun_languages[
163+
"pycon_runfirst"
164+
] = """
162165
from spatialmath import SE3
163166
SE3._color = False
164167
import numpy as np
@@ -208,4 +211,4 @@
208211
},
209212
]
210213

211-
autodoc_type_aliases = {'SO3Array': 'SO3Array'}
214+
autodoc_type_aliases = {"SO3Array": "SO3Array"}

0 commit comments

Comments
 (0)