|
17 | 17 | import re |
18 | 18 |
|
19 | 19 | # defined relative to configuration directory which is where this file conf.py lives |
20 | | -sys.path.append(os.path.abspath('exts')) |
| 20 | +sys.path.append(os.path.abspath("exts")) |
21 | 21 |
|
22 | 22 | # -- Project information ----------------------------------------------------- |
23 | 23 |
|
24 | | -project = 'Robotics Toolbox for Python' |
25 | | -copyright = '2020, Jesse Haviland and Peter Corke' |
26 | | -author = 'Jesse Haviland and Peter Corke' |
| 24 | +project = "Robotics Toolbox for Python" |
| 25 | +copyright = "2020, Jesse Haviland and Peter Corke" |
| 26 | +author = "Jesse Haviland and Peter Corke" |
27 | 27 |
|
28 | 28 | # print(__file__) |
29 | 29 |
|
30 | 30 | # parse version number out of setup.py |
31 | | -with open('../../setup.py', encoding='utf-8') as f: |
| 31 | +with open("../../setup.py", encoding="utf-8") as f: |
32 | 32 | setup_py = f.read() |
33 | 33 | m = re.search("version='([0-9\.]*)',", setup_py, re.MULTILINE) |
34 | 34 |
|
|
37 | 37 | # Add any Sphinx extension module names here, as strings. They can be |
38 | 38 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
39 | 39 | # ones. |
40 | | -extensions = [ |
41 | | - 'sphinx.ext.autodoc', |
42 | | - 'sphinx.ext.todo', |
43 | | - 'sphinx.ext.viewcode', |
44 | | - 'sphinx.ext.mathjax', |
45 | | - 'sphinx.ext.coverage', |
46 | | - 'sphinx.ext.doctest', |
47 | | - 'sphinx.ext.inheritance_diagram', |
48 | | - 'sphinx_autorun', |
49 | | - 'blockname', |
50 | | - ] |
| 40 | +extensions = [ |
| 41 | + "sphinx.ext.autodoc", |
| 42 | + "sphinx.ext.todo", |
| 43 | + "sphinx.ext.viewcode", |
| 44 | + "sphinx.ext.mathjax", |
| 45 | + "sphinx.ext.coverage", |
| 46 | + "sphinx.ext.doctest", |
| 47 | + "sphinx.ext.inheritance_diagram", |
| 48 | + "sphinx_autorun", |
| 49 | + "blockname", |
| 50 | + "sphinx.ext.intersphinx", |
| 51 | +] |
51 | 52 |
|
52 | 53 | autosummary_generate = True |
53 | | -autodoc_member_order = 'bysource' |
| 54 | +autodoc_member_order = "bysource" |
54 | 55 |
|
55 | 56 | # Add any paths that contain templates here, relative to this directory. |
56 | | -templates_path = ['_templates'] |
| 57 | +templates_path = ["_templates"] |
57 | 58 |
|
58 | | -exclude_patterns = ['test_*'] |
| 59 | +exclude_patterns = ["test_*"] |
59 | 60 |
|
60 | 61 | # options for spinx_autorun, used for inline examples |
61 | 62 | # choose UTF-8 encoding to allow for Unicode characters, eg. ansitable |
62 | 63 | # Python session setup, turn off color printing for SE3, set NumPy precision |
63 | 64 | autorun_languages = {} |
64 | | -autorun_languages['pycon_output_encoding'] = 'UTF-8' |
65 | | -autorun_languages['pycon_input_encoding'] = 'UTF-8' |
66 | | -autorun_languages['pycon_runfirst'] = """ |
| 65 | +autorun_languages["pycon_output_encoding"] = "UTF-8" |
| 66 | +autorun_languages["pycon_input_encoding"] = "UTF-8" |
| 67 | +autorun_languages[ |
| 68 | + "pycon_runfirst" |
| 69 | +] = """ |
67 | 70 | from spatialmath import SE3 |
68 | 71 | SE3._color = False |
69 | 72 | import numpy as np |
|
74 | 77 |
|
75 | 78 | # -- Options for HTML output ------------------------------------------------- |
76 | 79 |
|
77 | | -html_theme = 'sphinx_rtd_theme' |
| 80 | +html_theme = "sphinx_rtd_theme" |
78 | 81 |
|
79 | 82 | html_theme_options = { |
80 | 83 | #'github_user': 'petercorke', |
81 | 84 | #'github_repo': 'spatialmath-python', |
82 | 85 | #'logo_name': False, |
83 | | - 'logo_only': False, |
84 | | - 'display_version': True, |
85 | | - 'prev_next_buttons_location': 'both', |
86 | | - 'analytics_id': 'G-11Q6WJM565', |
87 | | - 'style_external_links': True, |
88 | | - } |
89 | | -html_logo = '../figs/RobToolBox_RoundLogoB.png' |
90 | | -html_last_updated_fmt = '%d-%b-%Y' |
| 86 | + "logo_only": False, |
| 87 | + "display_version": True, |
| 88 | + "prev_next_buttons_location": "both", |
| 89 | + "analytics_id": "G-11Q6WJM565", |
| 90 | + "style_external_links": True, |
| 91 | +} |
| 92 | +html_logo = "../figs/RobToolBox_RoundLogoB.png" |
| 93 | +html_last_updated_fmt = "%d-%b-%Y" |
91 | 94 | show_authors = True |
92 | 95 |
|
93 | 96 | # mathjax_config = { |
|
98 | 101 | # Add any paths that contain custom static files (such as style sheets) here, |
99 | 102 | # relative to this directory. They are copied after the builtin static files, |
100 | 103 | # so a file named "default.css" will overwrite the builtin "default.css". |
101 | | -html_static_path = ['_static'] |
| 104 | +html_static_path = ["_static"] |
102 | 105 | html_css_files = [ |
103 | | - 'css/custom.css', |
| 106 | + "css/custom.css", |
104 | 107 | ] |
105 | | -# autodoc_mock_imports = ["numpy", "scipy"] |
| 108 | +# autodoc_mock_imports = ["numpy", "scipy"] |
106 | 109 |
|
107 | 110 |
|
108 | 111 | # -- Options for LaTeX/PDF output -------------------------------------------- |
109 | | -latex_engine = 'xelatex' |
| 112 | +latex_engine = "xelatex" |
110 | 113 | # maybe need to set graphics path in here somewhere |
111 | 114 | # \graphicspath{{figures/}{../figures/}{C:/Users/me/Documents/project/figures/}} |
112 | 115 | # https://stackoverflow.com/questions/63452024/how-to-include-image-files-in-sphinx-latex-pdf-files |
113 | 116 | latex_elements = { |
114 | 117 | # The paper size ('letterpaper' or 'a4paper'). |
115 | | - 'papersize': 'a4paper', |
| 118 | + "papersize": "a4paper", |
116 | 119 | #'releasename':" ", |
117 | 120 | # Sonny, Lenny, Glenn, Conny, Rejne, Bjarne and Bjornstrup |
118 | 121 | # 'fncychap': '\\usepackage[Lenny]{fncychap}', |
119 | | - 'fncychap': '\\usepackage{fncychap}', |
120 | | - 'maketitle': "blah blah blah" |
| 122 | + "fncychap": "\\usepackage{fncychap}", |
| 123 | + "maketitle": "blah blah blah", |
121 | 124 | } |
122 | 125 |
|
123 | 126 | # Use RVC book notation for maths |
124 | 127 | # see https://stackoverflow.com/questions/9728292/creating-latex-math-macros-within-sphinx |
125 | 128 | mathjax_config = { |
126 | | - 'TeX': { |
127 | | - 'Macros': { |
| 129 | + "TeX": { |
| 130 | + "Macros": { |
128 | 131 | # RVC Math notation |
129 | 132 | # - not possible to do the if/then/else approach |
130 | 133 | # - subset only |
|
154 | 157 | # quaternions |
155 | 158 | "q": r"\mathring{q}", |
156 | 159 | "fq": [r"\presup{#1}\mathring{q}", 1], |
157 | | - |
158 | 160 | } |
159 | | - } |
| 161 | + } |
| 162 | +} |
| 163 | +intersphinx_mapping = { |
| 164 | + "numpy": ("http://docs.scipy.org/doc/numpy/", None), |
| 165 | + "scipy": ("http://docs.scipy.org/doc/scipy/reference/", None), |
| 166 | + "matplotlib": ("http://matplotlib.sourceforge.net/", None), |
160 | 167 | } |
| 168 | + |
| 169 | +# 'python': ('http://docs.python.org/2', None), |
0 commit comments