Skip to content

Commit e541af0

Browse files
Fix Codacy Warnings (#477)
--------- Co-authored-by: Dario Coscia <[email protected]>
1 parent 7da74dd commit e541af0

File tree

157 files changed

+3451
-3816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+3451
-3816
lines changed

docs/source/conf.py

Lines changed: 17 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,21 @@
1515
import sys
1616
import os
1717
import sphinx_rtd_theme
18-
import pina
18+
import importlib.metadata
1919

20-
# -- Project information -----------------------------------------------------
2120

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']
2627

2728

2829
sys.path.insert(0, os.path.abspath('../sphinx_extensions')) # extension to remove paramref link from lightinig
2930

3031
# -- General configuration ------------------------------------------------
3132

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.
4233
extensions = [
4334
'sphinx.ext.autodoc',
4435
'sphinx.ext.autosummary',
@@ -79,16 +70,16 @@
7970

8071
nitpicky = True
8172
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
9283

9384
]
9485

@@ -101,27 +92,15 @@
10192
# source_suffix = ['.rst', '.md']
10293
source_suffix = '.rst'
10394

104-
# The encoding of source files.
105-
# source_encoding = 'utf-8-sig'
106-
10795
# The master toctree document.
10896
master_doc = 'index'
10997

110-
# General information about the project.
111-
project = pina.__project__
112-
copyright = pina.__copyright__
113-
author = pina.__author__
114-
11598
# autoclass
11699
autoclass_content = 'both'
117100

118101
# The version info for the project you're documenting, acts as replacement for
119102
# |version| and |release|, also used in various other places throughout the
120103
# built documents.
121-
#
122-
# The short X.Y version.
123-
version = pina.__version__
124-
# The full version, including alpha/beta/rc tags.
125104
release = version
126105

127106
# The language for content autogenerated by Sphinx. Refer to documentation
@@ -131,31 +110,17 @@
131110
# Usually you set "language" from the command line for these cases.
132111
language = 'en'
133112

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-
140113
# List of patterns, relative to source directory, that match files and
141114
# directories to ignore when looking for source files.
142115
exclude_patterns = []
143116

144-
# The reST default role (used for this markup: `text`) to use for all
145-
# documents.
146-
# default_role = None
147-
148117
# If true, '()' will be appended to :func: etc. cross-reference text.
149118
add_function_parentheses = True
150119

151120
# If true, the current module name will be prepended to all description
152121
# unit titles (such as .. function::).
153122
add_module_names = False
154123

155-
# If true, sectionauthor and moduleauthor directives will be shown in the
156-
# output. They are ignored by default.
157-
# show_authors = False
158-
159124
# The name of the Pygments (syntax highlighting) style to use.
160125
pygments_style = 'sphinx'
161126

@@ -188,13 +153,6 @@
188153
# Add any paths that contain custom themes here, relative to this directory.
189154
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
190155

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-
198156
# The name of an image file (relative to this directory) to place at the top
199157
# of the sidebar.
200158
html_logo = "index_files/PINA_logo.png"
@@ -225,77 +183,19 @@
225183
"header_links_before_dropdown": 8,
226184
}
227185

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-
244186
# If not ''i, a 'Last updated on:' timestamp is inserted at every page bottom,
245187
# using the given strftime format.
246188
html_last_updated_fmt = '%b %d, %Y'
247189

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-
262190
# If false, no index is generated.
263191
html_use_index = True
264192

265-
# If true, the index is split into individual pages for each letter.
266-
# html_split_index = False
267-
268193
# If true, links to the reST sources are added to the pages.
269194
html_show_sourcelink = True
270195

271-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
272-
# html_show_sphinx = True
273-
274196
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
275197
html_show_copyright = True
276198

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-
299199
# Output file base name for HTML help builder.
300200
htmlhelp_basename = 'pinadoc'
301201

@@ -323,27 +223,6 @@
323223
u'PINA contributors', 'manual'),
324224
]
325225

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-
347226
# -- Options for manual page output ---------------------------------------
348227

349228
# One entry per manual page. List of tuples
@@ -353,10 +232,6 @@
353232
[author], 1)
354233
]
355234

356-
# If true, show URL addresses after external links.
357-
# man_show_urls = False
358-
359-
360235
# -- Options for Texinfo output -------------------------------------------
361236

362237
# Grouping the document tree into Texinfo files. List of tuples
@@ -368,15 +243,6 @@
368243
'Miscellaneous'),
369244
]
370245

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-
380246
# If true, do not generate a @detailmenu in the "Top" node's menu.
381247
# texinfo_no_detailmenu = False
382248
autodoc_member_order = 'bysource'

examples/problems/burgers.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

examples/problems/first_order_ode.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)