|
15 | 15 | import sys |
16 | 16 | import os |
17 | 17 | import sphinx_rtd_theme |
18 | | -import pina |
| 18 | +import importlib.metadata |
19 | 19 |
|
20 | | -# -- Project information ----------------------------------------------------- |
21 | 20 |
|
22 | | -project = pina.__project__ |
23 | | -copyright = pina.__copyright__ |
24 | | -author = pina.__author__ |
25 | | -version = pina.__version__ |
| 21 | +# -- Project information ----------------------------------------------------- |
| 22 | +_DISTRIBUTION_METADATA = importlib.metadata.metadata('pina-mathlab') |
| 23 | +project = _DISTRIBUTION_METADATA['Name'] |
| 24 | +copyright = _DISTRIBUTION_METADATA['License-File'] |
| 25 | +author = "PINA contributors" |
| 26 | +version = _DISTRIBUTION_METADATA['Version'] |
26 | 27 |
|
27 | 28 |
|
28 | 29 | sys.path.insert(0, os.path.abspath('../sphinx_extensions')) # extension to remove paramref link from lightinig |
29 | 30 |
|
30 | 31 | # -- General configuration ------------------------------------------------ |
31 | 32 |
|
32 | | -# If your documentation needs a minimal Sphinx version, state it here. |
33 | | -# needs_sphinx = '1.4' |
34 | | -# if needs_sphinx > sphinx.__display_version__: |
35 | | -# message = 'This project needs at least Sphinx |
36 | | -# v{0!s}'.format(needs_sphinx) |
37 | | -# raise VersionRequirementError(message) |
38 | | - |
39 | | -# Add any Sphinx extension module names here, as strings. They can be |
40 | | -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
41 | | -# ones. |
42 | 33 | extensions = [ |
43 | 34 | 'sphinx.ext.autodoc', |
44 | 35 | 'sphinx.ext.autosummary', |
|
79 | 70 |
|
80 | 71 | nitpicky = True |
81 | 72 | nitpick_ignore = [ |
82 | | - ('py:meth', 'lightning.pytorch.core.module.LightningModule.log'), |
83 | | - ('py:meth', 'lightning.pytorch.core.module.LightningModule.log_dict'), |
84 | | - ('py:exc', 'MisconfigurationException'), |
85 | | - ('py:func', 'torch.inference_mode'), |
86 | | - ('py:func', 'torch.no_grad'), |
87 | | - ('py:class', 'torch.utils.data.DistributedSampler'), |
88 | | - ('py:class', 'pina.model.layers.convolution.BaseContinuousConv'), |
89 | | - ('py:class', 'Module'), |
90 | | - ('py:class', 'torch.nn.modules.loss._Loss'), # TO FIX |
91 | | - ('py:class', 'torch.optim.LRScheduler'), # TO FIX |
| 73 | + # ('py:meth', 'lightning.pytorch.core.module.LightningModule.log'), |
| 74 | + # ('py:meth', 'lightning.pytorch.core.module.LightningModule.log_dict'), |
| 75 | + # ('py:exc', 'MisconfigurationException'), |
| 76 | + # ('py:func', 'torch.inference_mode'), |
| 77 | + # ('py:func', 'torch.no_grad'), |
| 78 | + # ('py:class', 'torch.utils.data.DistributedSampler'), |
| 79 | + # ('py:class', 'pina.model.layers.convolution.BaseContinuousConv'), |
| 80 | + # ('py:class', 'Module'), |
| 81 | + # ('py:class', 'torch.nn.modules.loss._Loss'), # TO FIX |
| 82 | + # ('py:class', 'torch.optim.LRScheduler'), # TO FIX |
92 | 83 |
|
93 | 84 | ] |
94 | 85 |
|
|
101 | 92 | # source_suffix = ['.rst', '.md'] |
102 | 93 | source_suffix = '.rst' |
103 | 94 |
|
104 | | -# The encoding of source files. |
105 | | -# source_encoding = 'utf-8-sig' |
106 | | - |
107 | 95 | # The master toctree document. |
108 | 96 | master_doc = 'index' |
109 | 97 |
|
110 | | -# General information about the project. |
111 | | -project = pina.__project__ |
112 | | -copyright = pina.__copyright__ |
113 | | -author = pina.__author__ |
114 | | - |
115 | 98 | # autoclass |
116 | 99 | autoclass_content = 'both' |
117 | 100 |
|
118 | 101 | # The version info for the project you're documenting, acts as replacement for |
119 | 102 | # |version| and |release|, also used in various other places throughout the |
120 | 103 | # built documents. |
121 | | -# |
122 | | -# The short X.Y version. |
123 | | -version = pina.__version__ |
124 | | -# The full version, including alpha/beta/rc tags. |
125 | 104 | release = version |
126 | 105 |
|
127 | 106 | # The language for content autogenerated by Sphinx. Refer to documentation |
|
131 | 110 | # Usually you set "language" from the command line for these cases. |
132 | 111 | language = 'en' |
133 | 112 |
|
134 | | -# There are two options for replacing |today|: either, you set today to some |
135 | | -# non-false value, then it is used: |
136 | | -# today = '' |
137 | | -# Else, today_fmt is used as the format for a strftime call. |
138 | | -# today_fmt = '%B %d, %Y' |
139 | | - |
140 | 113 | # List of patterns, relative to source directory, that match files and |
141 | 114 | # directories to ignore when looking for source files. |
142 | 115 | exclude_patterns = [] |
143 | 116 |
|
144 | | -# The reST default role (used for this markup: `text`) to use for all |
145 | | -# documents. |
146 | | -# default_role = None |
147 | | - |
148 | 117 | # If true, '()' will be appended to :func: etc. cross-reference text. |
149 | 118 | add_function_parentheses = True |
150 | 119 |
|
151 | 120 | # If true, the current module name will be prepended to all description |
152 | 121 | # unit titles (such as .. function::). |
153 | 122 | add_module_names = False |
154 | 123 |
|
155 | | -# If true, sectionauthor and moduleauthor directives will be shown in the |
156 | | -# output. They are ignored by default. |
157 | | -# show_authors = False |
158 | | - |
159 | 124 | # The name of the Pygments (syntax highlighting) style to use. |
160 | 125 | pygments_style = 'sphinx' |
161 | 126 |
|
|
188 | 153 | # Add any paths that contain custom themes here, relative to this directory. |
189 | 154 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
190 | 155 |
|
191 | | -# The name for this set of Sphinx documents. If None, it defaults to |
192 | | -# "<project> v<release> documentation". |
193 | | -# html_title = None |
194 | | - |
195 | | -# A shorter title for the navigation bar. Default is the same as html_title. |
196 | | -# html_short_title = None |
197 | | - |
198 | 156 | # The name of an image file (relative to this directory) to place at the top |
199 | 157 | # of the sidebar. |
200 | 158 | html_logo = "index_files/PINA_logo.png" |
|
225 | 183 | "header_links_before_dropdown": 8, |
226 | 184 | } |
227 | 185 |
|
228 | | -# The name of an image file (within the static path) to use as favicon of the |
229 | | -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
230 | | -# pixels large. |
231 | | -# html_favicon = None |
232 | | - |
233 | | -# Add any paths that contain custom static files (such as style sheets) here, |
234 | | -# relative to this directory. They are copied after the builtin static files,# so a file named "default.css" will overwrite the builtin "default.css". |
235 | | -html_static_path = ['_static'] |
236 | | -html_css_files = [ |
237 | | - '/css/custom.css', |
238 | | -] |
239 | | -# Add any extra paths that contain custom files (such as robots.txt or |
240 | | -# .htaccess) here, relative to this directory. These files are copied |
241 | | -# directly to the root of the documentation. |
242 | | -# html_extra_path = ['_tutorial'] |
243 | | - |
244 | 186 | # If not ''i, a 'Last updated on:' timestamp is inserted at every page bottom, |
245 | 187 | # using the given strftime format. |
246 | 188 | html_last_updated_fmt = '%b %d, %Y' |
247 | 189 |
|
248 | | -# If true, SmartyPants will be used to convert quotes and dashes to |
249 | | -# typographically correct entities. |
250 | | -# html_use_smartypants = True |
251 | | - |
252 | | -# Custom sidebar templates, maps document names to template names. |
253 | | -# html_sidebars = {} |
254 | | - |
255 | | -# Additional templates that should be rendered to pages, maps page names to |
256 | | -# template names. |
257 | | -# html_additional_pages = {} |
258 | | - |
259 | | -# If false, no module index is generated. |
260 | | -# html_domain_indices = True |
261 | | - |
262 | 190 | # If false, no index is generated. |
263 | 191 | html_use_index = True |
264 | 192 |
|
265 | | -# If true, the index is split into individual pages for each letter. |
266 | | -# html_split_index = False |
267 | | - |
268 | 193 | # If true, links to the reST sources are added to the pages. |
269 | 194 | html_show_sourcelink = True |
270 | 195 |
|
271 | | -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
272 | | -# html_show_sphinx = True |
273 | | - |
274 | 196 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
275 | 197 | html_show_copyright = True |
276 | 198 |
|
277 | | -# If true, an OpenSearch description file will be output, and all pages will |
278 | | -# contain a <link> tag referring to it. The value of this option must be the |
279 | | -# base URL from which the finished HTML is served. |
280 | | -# html_use_opensearch = '' |
281 | | - |
282 | | -# This is the file name suffix for HTML files (e.g. ".xhtml"). |
283 | | -# html_file_suffix = None |
284 | | - |
285 | | -# Language to be used for generating the HTML full-text search index. |
286 | | -# Sphinx supports the following languages: |
287 | | -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' |
288 | | -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' |
289 | | -# html_search_language = 'en' |
290 | | - |
291 | | -# A dictionary with options for the search language support, empty by default. |
292 | | -# Now only 'ja' uses this config value |
293 | | -# html_search_options = {'type': 'default'} |
294 | | - |
295 | | -# The name of a javascript file (relative to the configuration directory) that |
296 | | -# implements a search results scorer. If empty, the default will be used. |
297 | | -# html_search_scorer = 'scorer.js' |
298 | | - |
299 | 199 | # Output file base name for HTML help builder. |
300 | 200 | htmlhelp_basename = 'pinadoc' |
301 | 201 |
|
|
323 | 223 | u'PINA contributors', 'manual'), |
324 | 224 | ] |
325 | 225 |
|
326 | | -# The name of an image file (relative to this directory) to place at the top of |
327 | | -# the title page. |
328 | | -# latex_logo = None |
329 | | - |
330 | | -# For "manual" documents, if this is true, then toplevel headings are parts, |
331 | | -# not chapters. |
332 | | -# latex_use_parts = False |
333 | | - |
334 | | -# If true, show page references after internal links. |
335 | | -# latex_show_pagerefs = False |
336 | | - |
337 | | -# If true, show URL addresses after external links. |
338 | | -# latex_show_urls = False |
339 | | - |
340 | | -# Documents to append as an appendix to all manuals. |
341 | | -# latex_appendices = [] |
342 | | - |
343 | | -# If false, no module index is generated. |
344 | | -# latex_domain_indices = True |
345 | | - |
346 | | - |
347 | 226 | # -- Options for manual page output --------------------------------------- |
348 | 227 |
|
349 | 228 | # One entry per manual page. List of tuples |
|
353 | 232 | [author], 1) |
354 | 233 | ] |
355 | 234 |
|
356 | | -# If true, show URL addresses after external links. |
357 | | -# man_show_urls = False |
358 | | - |
359 | | - |
360 | 235 | # -- Options for Texinfo output ------------------------------------------- |
361 | 236 |
|
362 | 237 | # Grouping the document tree into Texinfo files. List of tuples |
|
368 | 243 | 'Miscellaneous'), |
369 | 244 | ] |
370 | 245 |
|
371 | | -# Documents to append as an appendix to all manuals. |
372 | | -# texinfo_appendices = [] |
373 | | - |
374 | | -# If false, no module index is generated. |
375 | | -# texinfo_domain_indices = True |
376 | | - |
377 | | -# How to display URL addresses: 'footnote', 'no', or 'inline'. |
378 | | -# texinfo_show_urls = 'footnote' |
379 | | - |
380 | 246 | # If true, do not generate a @detailmenu in the "Top" node's menu. |
381 | 247 | # texinfo_no_detailmenu = False |
382 | 248 | autodoc_member_order = 'bysource' |
0 commit comments