|
1 | | -# -*- coding: utf-8 -*- |
2 | 1 | # |
3 | 2 | # Configuration file for the Sphinx documentation builder. |
4 | 3 | # |
|
10 | 9 | # -- Project information ----------------------------------------------------- |
11 | 10 |
|
12 | 11 | from sunkit_instruments import __version__ |
13 | | -project = 'sunkit_instruments' |
14 | | -copyright = '2020, The SunPy Developers' |
15 | | -author = 'The SunPy Developers' |
| 12 | + |
| 13 | +project = "sunkit_instruments" |
| 14 | +copyright = "2020, The SunPy Developers" |
| 15 | +author = "The SunPy Developers" |
16 | 16 |
|
17 | 17 | # The full version, including alpha/beta/rc tags |
18 | 18 | release = __version__ |
19 | | -is_development = '.dev' in __version__ |
| 19 | +is_development = ".dev" in __version__ |
20 | 20 |
|
21 | 21 | # -- General configuration --------------------------------------------------- |
22 | 22 |
|
23 | 23 | # Add any Sphinx extension module names here, as strings. They can be |
24 | 24 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
25 | 25 | # ones. |
26 | 26 | extensions = [ |
27 | | - 'sphinx.ext.autodoc', |
28 | | - 'sphinx.ext.intersphinx', |
29 | | - 'sphinx.ext.todo', |
30 | | - 'sphinx.ext.coverage', |
31 | | - 'sphinx.ext.inheritance_diagram', |
32 | | - 'sphinx.ext.viewcode', |
33 | | - 'sphinx.ext.napoleon', |
34 | | - 'sphinx.ext.doctest', |
35 | | - 'sphinx.ext.mathjax', |
36 | | - 'sphinx_automodapi.automodapi', |
37 | | - 'sphinx_automodapi.smart_resolver', |
| 27 | + "sphinx.ext.autodoc", |
| 28 | + "sphinx.ext.intersphinx", |
| 29 | + "sphinx.ext.todo", |
| 30 | + "sphinx.ext.coverage", |
| 31 | + "sphinx.ext.inheritance_diagram", |
| 32 | + "sphinx.ext.viewcode", |
| 33 | + "sphinx.ext.napoleon", |
| 34 | + "sphinx.ext.doctest", |
| 35 | + "sphinx.ext.mathjax", |
| 36 | + "sphinx_automodapi.automodapi", |
| 37 | + "sphinx_automodapi.smart_resolver", |
38 | 38 | ] |
39 | 39 |
|
40 | 40 | # Add any paths that contain templates here, relative to this directory. |
|
43 | 43 | # List of patterns, relative to source directory, that match files and |
44 | 44 | # directories to ignore when looking for source files. |
45 | 45 | # This pattern also affects html_static_path and html_extra_path. |
46 | | -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 46 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
47 | 47 |
|
48 | 48 | # The suffix(es) of source filenames. |
49 | 49 | # You can specify multiple suffix as a list of string: |
50 | | -source_suffix = '.rst' |
| 50 | +source_suffix = ".rst" |
51 | 51 |
|
52 | 52 | # The master toctree document. |
53 | | -master_doc = 'index' |
| 53 | +master_doc = "index" |
54 | 54 |
|
55 | 55 | # The reST default role (used for this markup: `text`) to use for all |
56 | 56 | # documents. Set to the "smart" one. |
57 | | -default_role = 'obj' |
| 57 | +default_role = "obj" |
58 | 58 |
|
59 | 59 | # -- Options for intersphinx extension --------------------------------------- |
60 | 60 |
|
61 | 61 | # Example configuration for intersphinx: refer to the Python standard library. |
62 | 62 | intersphinx_mapping = { |
63 | | - 'python': ('https://docs.python.org/3/', |
64 | | - (None, 'http://data.astropy.org/intersphinx/python3.inv')), |
65 | | - 'numpy': ('https://docs.scipy.org/doc/numpy/', |
66 | | - (None, 'http://data.astropy.org/intersphinx/numpy.inv')), |
67 | | - 'scipy': ('https://docs.scipy.org/doc/scipy/reference/', |
68 | | - (None, 'http://data.astropy.org/intersphinx/scipy.inv')), |
69 | | - 'matplotlib': ('https://matplotlib.org/', |
70 | | - (None, 'http://data.astropy.org/intersphinx/matplotlib.inv')), |
71 | | - 'astropy': ('http://docs.astropy.org/en/stable/', None), |
72 | | - 'sunpy': ('https://docs.sunpy.org/en/stable/', None)} |
| 63 | + "python": ( |
| 64 | + "https://docs.python.org/3/", |
| 65 | + (None, "http://data.astropy.org/intersphinx/python3.inv"), |
| 66 | + ), |
| 67 | + "numpy": ( |
| 68 | + "https://docs.scipy.org/doc/numpy/", |
| 69 | + (None, "http://data.astropy.org/intersphinx/numpy.inv"), |
| 70 | + ), |
| 71 | + "scipy": ( |
| 72 | + "https://docs.scipy.org/doc/scipy/reference/", |
| 73 | + (None, "http://data.astropy.org/intersphinx/scipy.inv"), |
| 74 | + ), |
| 75 | + "matplotlib": ( |
| 76 | + "https://matplotlib.org/", |
| 77 | + (None, "http://data.astropy.org/intersphinx/matplotlib.inv"), |
| 78 | + ), |
| 79 | + "astropy": ("http://docs.astropy.org/en/stable/", None), |
| 80 | + "sunpy": ("https://docs.sunpy.org/en/stable/", None), |
| 81 | +} |
73 | 82 |
|
74 | 83 | # -- Options for HTML output ------------------------------------------------- |
75 | 84 |
|
|
79 | 88 | try: |
80 | 89 | from sunpy_sphinx_theme.conf import * |
81 | 90 | except ImportError: |
82 | | - html_theme = 'default' |
| 91 | + html_theme = "default" |
83 | 92 |
|
84 | 93 |
|
85 | 94 | # Add any paths that contain custom static files (such as style sheets) here, |
|
91 | 100 | graphviz_output_format = "svg" |
92 | 101 |
|
93 | 102 | graphviz_dot_args = [ |
94 | | - '-Nfontsize=10', |
95 | | - '-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif', |
96 | | - '-Efontsize=10', |
97 | | - '-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif', |
98 | | - '-Gfontsize=10', |
99 | | - '-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif' |
| 103 | + "-Nfontsize=10", |
| 104 | + "-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif", |
| 105 | + "-Efontsize=10", |
| 106 | + "-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif", |
| 107 | + "-Gfontsize=10", |
| 108 | + "-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif", |
100 | 109 | ] |
101 | 110 |
|
102 | 111 |
|
|
106 | 115 | target_file = os.path.abspath("./whatsnew/latest_changelog.txt") |
107 | 116 | try: |
108 | 117 | from sunpy.util.towncrier import generate_changelog_for_docs |
| 118 | + |
109 | 119 | if is_development: |
110 | 120 | generate_changelog_for_docs("../", target_file) |
111 | 121 | except Exception as e: |
112 | 122 | print(f"Failed to add changelog to docs with error {e}.") |
113 | 123 | # Make sure the file exists or else sphinx will complain. |
114 | | -open(target_file, 'a').close() |
| 124 | +open(target_file, "a").close() |
0 commit comments