|
13 | 13 | import sys |
14 | 14 | from pathlib import Path |
15 | 15 |
|
16 | | -sys.path.insert(0, str(Path('../../..').resolve())) |
17 | | -sys.path.insert(0, str(Path('../../../src').resolve())) |
| 16 | +sys.path.insert(0, str(Path("../../..").resolve())) |
| 17 | +sys.path.insert(0, str(Path("../../../src").resolve())) |
18 | 18 |
|
19 | 19 |
|
20 | 20 | # -- Project information ----------------------------------------------------- |
21 | 21 |
|
22 | | -project = 'PDFmorph' |
23 | | -project_full = 'diffpy.pdfmorph' |
24 | | -copyright = '2009-2019, Trustees of Columbia University in the City of New York, all rights reserved.' |
25 | | -author = 'Chris Farrow, Christopher J. Wright, Pavol Juhás, Chia-Hao (Timothy) Liu, S. Matthew Román, Simon J.L. Billinge' |
| 22 | +project = "PDFmorph" |
| 23 | +project_full = "diffpy.pdfmorph" |
| 24 | +copyright = "2009-2019, Trustees of Columbia University in the City of New York, all rights reserved." |
| 25 | +author = "Chris Farrow, Christopher J. Wright, Pavol Juhás, Chia-Hao (Timothy) Liu, S. Matthew Román, Simon J.L. Billinge" |
26 | 26 |
|
27 | 27 | # The full version, including alpha/beta/rc tags |
28 | 28 | from importlib.metadata import version |
| 29 | + |
29 | 30 | fullversion = version(project_full) |
30 | 31 | # The short X.Y version. |
31 | | -version = ''.join(fullversion.split('.post')[:1]) |
| 32 | +version = "".join(fullversion.split(".post")[:1]) |
32 | 33 | # The full version, including alpha/beta/rc tags. |
33 | 34 | release = fullversion |
34 | 35 |
|
35 | 36 | # Get current date for copyright |
36 | 37 | import time |
37 | | -today = time.strftime('%B %d, %Y', time.localtime()) |
| 38 | + |
| 39 | +today = time.strftime("%B %d, %Y", time.localtime()) |
38 | 40 | year = today.split()[-1] |
39 | | -copyright = copyright.replace('%Y', year) |
| 41 | +copyright = copyright.replace("%Y", year) |
40 | 42 |
|
41 | 43 |
|
42 | 44 | # -- General configuration --------------------------------------------------- |
43 | 45 |
|
44 | 46 | # Add any Sphinx extension module names here, as strings. They can be |
45 | 47 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
46 | 48 | # ones. |
47 | | -extensions = ['sphinx.ext.autodoc', |
48 | | - 'sphinx.ext.napoleon', |
49 | | - 'sphinx.ext.todo', |
50 | | - 'sphinx.ext.viewcode', |
51 | | - 'sphinx.ext.intersphinx', |
52 | | - 'sphinx_rtd_theme', |
53 | | - 'm2r', |
| 49 | +extensions = [ |
| 50 | + "sphinx.ext.autodoc", |
| 51 | + "sphinx.ext.napoleon", |
| 52 | + "sphinx.ext.todo", |
| 53 | + "sphinx.ext.viewcode", |
| 54 | + "sphinx.ext.intersphinx", |
| 55 | + "sphinx_rtd_theme", |
| 56 | + "m2r", |
54 | 57 | ] |
55 | 58 | napoleon_google_docstring = False |
56 | 59 | napoleon_use_param = False |
57 | 60 | napoleon_use_ivar = False |
58 | 61 |
|
59 | 62 | # Add any paths that contain templates here, relative to this directory. |
60 | | -templates_path = ['_templates'] |
| 63 | +templates_path = ["_templates"] |
61 | 64 |
|
62 | | -from jinja2 import Template, Environment, FileSystemLoader |
| 65 | +from jinja2 import Environment, FileSystemLoader, Template |
63 | 66 |
|
64 | | -source_suffix = '.rst' |
| 67 | +source_suffix = ".rst" |
65 | 68 |
|
66 | | -master_doc = 'index' |
| 69 | +master_doc = "index" |
67 | 70 |
|
68 | | -language = 'en' |
| 71 | +language = "en" |
69 | 72 | # List of patterns, relative to source directory, that match files and |
70 | 73 | # directories to ignore when looking for source files. |
71 | 74 | # This pattern also affects html_static_path and html_extra_path. |
72 | | -exclude_patterns = ['Thumbs.db', '.DS_Store'] |
| 75 | +exclude_patterns = ["Thumbs.db", ".DS_Store"] |
73 | 76 |
|
74 | | -pygments_style = 'sphinx' |
| 77 | +pygments_style = "sphinx" |
75 | 78 |
|
76 | 79 | todo_include_todos = True |
77 | 80 |
|
|
80 | 83 | # The theme to use for HTML and HTML Help pages. See the documentation for |
81 | 84 | # a list of builtin themes. |
82 | 85 | import sphinx_rtd_theme |
83 | | -html_theme = 'sphinx_rtd_theme' |
| 86 | + |
| 87 | +html_theme = "sphinx_rtd_theme" |
84 | 88 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
85 | 89 |
|
86 | 90 | html_theme_options = {} |
|
90 | 94 | # so a file named "default.css" will overwrite the builtin "default.css". |
91 | 95 | html_static_path = [] |
92 | 96 |
|
93 | | -htmlhelp_basename = 'PDFmorphdoc' |
| 97 | +htmlhelp_basename = "PDFmorphdoc" |
94 | 98 |
|
95 | 99 | latex_documents = [ |
96 | | - (master_doc, 'pdfmorph.tex', 'PDFmorph Documentation', |
97 | | - 'author', 'manual'), |
| 100 | + (master_doc, "pdfmorph.tex", "PDFmorph Documentation", "author", "manual"), |
98 | 101 | ] |
99 | 102 |
|
100 | | -man_pages = [ |
101 | | - (master_doc, 'pdfmorph', 'PDFmorph Documentation', [author], 1) |
102 | | -] |
| 103 | +man_pages = [(master_doc, "pdfmorph", "PDFmorph Documentation", [author], 1)] |
103 | 104 |
|
104 | 105 | texinfo_documents = [ |
105 | | - (master_doc, 'PDFmorph', 'PDFmorph Documentation', author, |
106 | | - 'PDFmorph', 'One line description of project.', 'Miscellaneous'), |
| 106 | + ( |
| 107 | + master_doc, |
| 108 | + "PDFmorph", |
| 109 | + "PDFmorph Documentation", |
| 110 | + author, |
| 111 | + "PDFmorph", |
| 112 | + "One line description of project.", |
| 113 | + "Miscellaneous", |
| 114 | + ), |
107 | 115 | ] |
108 | 116 |
|
109 | 117 | epub_title = project |
110 | 118 | epub_author = author |
111 | 119 | epub_publisher = author |
112 | 120 | epub_copyright = copyright |
113 | 121 |
|
114 | | -epub_exclude_files = ['search.html'] |
| 122 | +epub_exclude_files = ["search.html"] |
0 commit comments