Skip to content

Commit

Permalink
Code formatting (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
volkm authored Nov 25, 2024
2 parents 22f94d2 + 8e6c421 commit b71e71d
Show file tree
Hide file tree
Showing 102 changed files with 1,213 additions and 1,139 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
534f29c9e329007d67428da3ef7be84141140fe2
99 changes: 36 additions & 63 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import sphinx_bootstrap_theme



# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -36,33 +35,33 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
#'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.githubpages',
'sphinx.ext.autosectionlabel',
'nbsphinx'
"sphinx.ext.coverage",
"sphinx.ext.githubpages",
"sphinx.ext.autosectionlabel",
"nbsphinx",
]
autosectionlabel_prefix_document = True
#autosectionlabel_maxdepth = 10
# autosectionlabel_maxdepth = 10

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'stormpy'
copyright = '2016-2022 Moves RWTH Aachen'
author = 'Sebastian Junges, Matthias Volk'
project = "stormpy"
copyright = "2016-2022 Moves RWTH Aachen"
author = "Sebastian Junges, Matthias Volk"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -78,15 +77,15 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -100,7 +99,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'fixedbootstrap'
html_theme = "fixedbootstrap"

html_theme_path = ["themes"] + sphinx_bootstrap_theme.get_html_theme_path()

Expand All @@ -111,80 +110,65 @@

html_theme_options = {
# Navigation bar title. (Default: ``project`` value)
'navbar_title': "Stormpy",

"navbar_title": "Stormpy",
# Tab name for entire site. (Default: "Site")
'navbar_site_name': "Stormpy",

"navbar_site_name": "Stormpy",
# A list of tuples containing pages or urls to link to.
# Valid tuples should be in the following forms:
# (name, page) # a link to a page
# (name, "/aa/bb", 1) # a link to an arbitrary relative url
# (name, "http://example.com", True) # arbitrary absolute url
# Note the "1" or "True" value above as the third argument to indicate
# an arbitrary url.
'navbar_links': [
("Storm", "https://www.stormchecker.org", True),
("Github", "https://github.com/moves-rwth/stormpy", True)
],

"navbar_links": [("Storm", "https://www.stormchecker.org", True), ("Github", "https://github.com/moves-rwth/stormpy", True)],
# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': True,

"navbar_sidebarrel": True,
# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': True,

"navbar_pagenav": True,
# Tab name for the current pages TOC. (Default: "Page")
'navbar_pagenav_name': "Page",

"navbar_pagenav_name": "Page",
# Global TOC depth for "site" navbar tab. (Default: 1)
# Switching to -1 shows all levels.
'globaltoc_depth': 2,

"globaltoc_depth": 2,
# Include hidden TOCs in Site navbar?
#
# Note: If this is "false", you cannot have mixed ``:hidden:`` and
# non-hidden ``toctree`` directives in the same page, or else the build
# will break.
#
# Values: "true" (default) or "false"
'globaltoc_includehidden': "true",

"globaltoc_includehidden": "true",
# HTML navbar class (Default: "navbar") to attach to <div> element.
# For black navbar, do "navbar navbar-inverse"
'navbar_class': "navbar navbar-inverse",

"navbar_class": "navbar navbar-inverse",
# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "true",

"navbar_fixed_top": "true",
# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
'source_link_position': "footer",

"source_link_position": "footer",
# Bootswatch (http://bootswatch.com/) theme.
#
# Options are nothing (default) or the name of a valid theme
# such as "cosmo" or "sandstone".
'bootswatch_theme': "united",

"bootswatch_theme": "united",
# Choose Bootstrap version.
# Values: "3" (default) or "2" (in quotes)
'bootstrap_version': "3",
"bootstrap_version": "3",
}

html_sidebars = {'**': ['localtoc.html']}
html_sidebars = {"**": ["localtoc.html"]}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'stormpydoc'
htmlhelp_basename = "stormpydoc"


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -193,15 +177,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -211,19 +192,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'stormpy.tex', 'stormpy Documentation',
'Sebastian Junges, Matthias Volk', 'manual'),
(master_doc, "stormpy.tex", "stormpy Documentation", "Sebastian Junges, Matthias Volk", "manual"),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'stormpy', 'stormpy Documentation',
[author], 1)
]
man_pages = [(master_doc, "stormpy", "stormpy Documentation", [author], 1)]


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -232,16 +209,12 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'stormpy', 'stormpy Documentation',
author, 'stormpy', 'Python bindings for Storm.',
'Miscellaneous'),
(master_doc, "stormpy", "stormpy Documentation", author, "stormpy", "Python bindings for Storm.", "Miscellaneous"),
]




# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {"https://docs.python.org/": None}

nbsphinx_prolog = """
{% set docname = env.doc2path(env.docname, base=False) %}
Expand Down
41 changes: 21 additions & 20 deletions doc/source/doc/analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
},
"outputs": [],
"source": [
">>> import stormpy\n",
">>> import stormpy.examples\n",
">>> import stormpy.examples.files\n",
">>> path = stormpy.examples.files.prism_dtmc_die\n",
">>> prism_program = stormpy.parse_prism_program(path)\n",
">>> formula_str = \"P=? [F s=7 & d=2]\"\n",
">>> properties = stormpy.parse_properties(formula_str, prism_program)"
"import stormpy\n",
"import stormpy.examples\n",
"import stormpy.examples.files\n",
"\n",
"path = stormpy.examples.files.prism_dtmc_die\n",
"prism_program = stormpy.parse_prism_program(path)\n",
"formula_str = \"P=? [F s=7 & d=2]\"\n",
"properties = stormpy.parse_properties(formula_str, prism_program)"
]
},
{
Expand Down Expand Up @@ -61,8 +62,8 @@
},
"outputs": [],
"source": [
">>> model = stormpy.build_symbolic_model(prism_program, properties)\n",
">>> result = stormpy.model_checking(model, properties[0])"
"model = stormpy.build_symbolic_model(prism_program, properties)\n",
"result = stormpy.model_checking(model, properties[0])"
]
},
{
Expand All @@ -80,9 +81,9 @@
},
"outputs": [],
"source": [
">>> filter = stormpy.create_filter_initial_states_symbolic(model)\n",
">>> result.filter(filter)\n",
">>> assert result.min == result.max"
"filter = stormpy.create_filter_initial_states_symbolic(model)\n",
"result.filter(filter)\n",
"assert result.min == result.max"
]
},
{
Expand Down Expand Up @@ -114,8 +115,8 @@
},
"outputs": [],
"source": [
">>> model = stormpy.build_model(prism_program, properties)\n",
">>> result = stormpy.model_checking(model, properties[0])"
"model = stormpy.build_model(prism_program, properties)\n",
"result = stormpy.model_checking(model, properties[0])"
]
},
{
Expand All @@ -133,10 +134,10 @@
},
"outputs": [],
"source": [
">>> env = stormpy.Environment()\n",
">>> env.solver_environment.set_linear_equation_solver_type(stormpy.EquationSolverType.native)\n",
">>> env.solver_environment.native_solver_environment.method = stormpy.NativeLinearEquationSolverMethod.power_iteration\n",
">>> result = stormpy.model_checking(model, properties[0], environment=env)"
"env = stormpy.Environment()\n",
"env.solver_environment.set_linear_equation_solver_type(stormpy.EquationSolverType.native)\n",
"env.solver_environment.native_solver_environment.method = stormpy.NativeLinearEquationSolverMethod.power_iteration\n",
"result = stormpy.model_checking(model, properties[0], environment=env)"
]
},
{
Expand All @@ -155,8 +156,8 @@
},
"outputs": [],
"source": [
">>> env.solver_environment.native_solver_environment.maximum_iterations = 3\n",
">>> result = stormpy.model_checking(model, properties[0])"
"env.solver_environment.native_solver_environment.maximum_iterations = 3\n",
"result = stormpy.model_checking(model, properties[0])"
]
},
{
Expand Down
24 changes: 12 additions & 12 deletions doc/source/doc/building_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"outputs": [],
"source": [
">>> import stormpy.examples\n",
">>> import stormpy.examples.files"
"import stormpy.examples\n",
"import stormpy.examples.files"
]
},
{
Expand All @@ -54,9 +54,9 @@
},
"outputs": [],
"source": [
">>> path = stormpy.examples.files.drn_ctmc_dft\n",
">>> model = stormpy.build_model_from_drn(path)\n",
">>> print(model.model_type)"
"path = stormpy.examples.files.drn_ctmc_dft\n",
"model = stormpy.build_model_from_drn(path)\n",
"print(model.model_type)"
]
},
{
Expand All @@ -74,9 +74,9 @@
},
"outputs": [],
"source": [
">>> path = stormpy.examples.files.drn_pdtmc_die\n",
">>> model = stormpy.build_parametric_model_from_drn(path)\n",
">>> print(model.model_type)"
"path = stormpy.examples.files.drn_pdtmc_die\n",
"model = stormpy.build_parametric_model_from_drn(path)\n",
"print(model.model_type)"
]
},
{
Expand All @@ -95,10 +95,10 @@
},
"outputs": [],
"source": [
">>> path = stormpy.examples.files.jani_dtmc_die\n",
">>> jani_program, properties = stormpy.parse_jani_model(path)\n",
">>> model = stormpy.build_model(jani_program)\n",
">>> print(model.model_type)"
"path = stormpy.examples.files.jani_dtmc_die\n",
"jani_program, properties = stormpy.parse_jani_model(path)\n",
"model = stormpy.build_model(jani_program)\n",
"print(model.model_type)"
]
},
{
Expand Down
Loading

0 comments on commit b71e71d

Please sign in to comment.