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

MAINT: Revise code style according to ruff #124

Merged
merged 4 commits into from
Mar 15, 2024
Merged
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
127 changes: 64 additions & 63 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from packaging.version import Version
from templateflow import __version__, __copyright__, __packagename__

from templateflow import __copyright__, __packagename__, __version__

# -- Project information -----------------------------------------------------
project = __packagename__
copyright = __copyright__
author = "The NiPreps Developers"
author = 'The NiPreps Developers'

# The full version, including alpha/beta/rc tags
release = __version__
Expand All @@ -29,31 +30,31 @@

# -- General configuration ---------------------------------------------------
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.githubpages",
"sphinx.ext.ifconfig",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinxcontrib.apidoc",
"nbsphinx",
"sphinx_click",
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.githubpages',
'sphinx.ext.ifconfig',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinxcontrib.apidoc',
'nbsphinx',
'sphinx_click',
]

autodoc_mock_imports = [
"matplotlib",
"nilearn",
"nipy",
"nitime",
"numpy",
"pandas",
"seaborn",
"skimage",
"svgutils",
"transforms3d",
'matplotlib',
'nilearn',
'nipy',
'nitime',
'numpy',
'pandas',
'seaborn',
'skimage',
'svgutils',
'transforms3d',
]
autodoc_autoreload = True

Expand All @@ -68,16 +69,16 @@
# ]

# 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'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -90,11 +91,11 @@
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"api/modules.rst",
"api/templateflow.rst",
'_build',
'Thumbs.db',
'.DS_Store',
'api/modules.rst',
'api/templateflow.rst',
]

# The name of the Pygments (syntax highlighting) style to use.
Expand All @@ -106,7 +107,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
# further. For a list of options available for each theme, see the
Expand All @@ -117,7 +118,7 @@
# 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']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -133,7 +134,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

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


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -159,10 +160,10 @@
latex_documents = [
(
master_doc,
"templateflow.tex",
"TemplateFlow Documentation",
"The TemplateFlow Developers",
"manual",
'templateflow.tex',
'TemplateFlow Documentation',
'The TemplateFlow Developers',
'manual',
),
]

Expand All @@ -171,7 +172,7 @@

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


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -182,12 +183,12 @@
texinfo_documents = [
(
master_doc,
"templateflow",
"TemplateFlow Documentation",
'templateflow',
'TemplateFlow Documentation',
author,
"TemplateFlow",
"One line description of project.",
"Miscellaneous",
'TemplateFlow',
'One line description of project.',
'Miscellaneous',
),
]

Expand All @@ -207,38 +208,38 @@
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------

apidoc_module_dir = "../templateflow"
apidoc_output_dir = "api"
apidoc_module_dir = '../templateflow'
apidoc_output_dir = 'api'
apidoc_excluded_paths = [
"conftest.py",
"*/tests/*",
"tests/*",
"data/*",
'conftest.py',
'*/tests/*',
'tests/*',
'data/*',
]
apidoc_separate_modules = True
apidoc_extra_args = ["--module-first", "-d 1", "-T"]
apidoc_extra_args = ['--module-first', '-d 1', '-T']

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"bids": ("https://bids-standard.github.io/pybids/", None),
"matplotlib": ("https://matplotlib.org/", None),
"nibabel": ("https://nipy.org/nibabel/", None),
"nipype": ("https://nipype.readthedocs.io/en/latest/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("http://pandas.pydata.org/pandas-docs/dev", None),
"python": ("https://docs.python.org/3/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
'bids': ('https://bids-standard.github.io/pybids/', None),
'matplotlib': ('https://matplotlib.org/', None),
'nibabel': ('https://nipy.org/nibabel/', None),
'nipype': ('https://nipype.readthedocs.io/en/latest/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pandas': ('http://pandas.pydata.org/pandas-docs/dev', None),
'python': ('https://docs.python.org/3/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
}

# -- Options for versioning extension ----------------------------------------
smv_branch_whitelist = r"^master$"
smv_tag_whitelist = r"^\d+\.\d+\.\d+(?!rc|dev).*$"
smv_branch_whitelist = r'^master$'
smv_tag_whitelist = r'^\d+\.\d+\.\d+(?!rc|dev).*$'
smv_released_pattern = r'^tags/.*$'
smv_rebuild_tags = False
7 changes: 0 additions & 7 deletions docs/tools/LICENSE.txt

This file was deleted.

Loading
Loading