Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add formatter #426

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# PR 426: Run "ruff format ."
710da08e36961b80cd368662b5af7a6757fcaedf
9 changes: 9 additions & 0 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1

ruff-format:
name: Ruff Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
args: 'format --check'

nompi4py:
name: no mpi4py
runs-on: ubuntu-latest
Expand Down
86 changes: 43 additions & 43 deletions doc/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../../examples/distr'))
sys.path.insert(0, os.path.abspath('../../examples/stoch_distr'))
sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("../../examples/distr"))
sys.path.insert(0, os.path.abspath("../../examples/stoch_distr"))


# -- General configuration ------------------------------------------------
Expand All @@ -42,45 +42,47 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx.ext.ifconfig',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.autosummary',
'sphinx.ext.doctest']
#'sphinx.ext.githubpages']
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.ifconfig",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
]
#'sphinx.ext.githubpages']

viewcode_import = True
#napoleon_include_private_with_doc = True
# napoleon_include_private_with_doc = True

# 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 root toctree document.
root_doc = 'index'
root_doc = "index"

# General information about the project.
project = u'mpi-sppy'
copyright = u'2020-2024'
author = u'mpi-sppy Developers'
project = "mpi-sppy"
copyright = "2020-2024"
author = "mpi-sppy Developers"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.12.2'
version = "0.12.2"
# The full version, including alpha/beta/rc tags.
release = '0.12.2.dev0'
release = "0.12.2.dev0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -92,10 +94,10 @@
# 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 = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# 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 @@ -107,8 +109,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"


# Theme options are theme-specific and customize the look and feel of a theme
Expand All @@ -120,15 +121,15 @@
# 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']

#html_favicon = "../logos/pyomo/favicon.ico"
# html_favicon = "../logos/pyomo/favicon.ico"


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

# Output file base name for HTML help builder.
htmlhelp_basename = 'mpi-sppy'
htmlhelp_basename = "mpi-sppy"


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -137,15 +138,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 @@ -155,19 +153,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(root_doc, 'mpisppy.tex', 'mpisppy Documentation',
'mpisppy', 'manual'),
(root_doc, "mpisppy.tex", "mpisppy Documentation", "mpisppy", "manual"),
]


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

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


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -176,10 +170,16 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(root_doc, 'mpisppy', 'mpisppy Documentation',
author, 'mpisppy', 'One line description of project.',
'Miscellaneous'),
(
root_doc,
"mpisppy",
"mpisppy Documentation",
author,
"mpisppy",
"One line description of project.",
"Miscellaneous",
),
]

#autodoc_member_order = 'bysource'
#autodoc_member_order = 'groupwise'
# autodoc_member_order = 'bysource'
# autodoc_member_order = 'groupwise'
Loading
Loading