Skip to content

A bit of black #433

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

Merged
merged 2 commits into from
Mar 14, 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
20 changes: 10 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'fastplotlib'
copyright = '2023, Kushal Kolar, Caitlin Lewis'
author = 'Kushal Kolar, Caitlin Lewis'
project = "fastplotlib"
copyright = "2023, Kushal Kolar, Caitlin Lewis"
author = "Kushal Kolar, Caitlin Lewis"
release = fastplotlib.__version__

# -- General configuration ---------------------------------------------------
Expand All @@ -28,31 +28,31 @@

autosummary_generate = True

templates_path = ['_templates']
templates_path = ["_templates"]
exclude_patterns = []

napoleon_custom_sections = ['Features']
napoleon_custom_sections = ["Features"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "furo"

html_static_path = ['_static']
html_static_path = ["_static"]
html_logo = "_static/logo.png"
html_title = f"v{release}"

autodoc_member_order = 'groupwise'
autodoc_member_order = "groupwise"
autoclass_content = "both"
add_module_names = False

autodoc_typehints = "description"
autodoc_typehints_description_target = "documented_params"

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pygfx': ('https://pygfx.readthedocs.io/en/latest', None)
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pygfx": ("https://pygfx.readthedocs.io/en/latest", None),
}

html_theme_options = {
Expand Down
56 changes: 18 additions & 38 deletions docs/source/generate_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
GRAPHICS_DIR,
GRAPHIC_FEATURES_DIR,
SELECTORS_DIR,
WIDGETS_DIR
WIDGETS_DIR,
]

for source_dir in doc_sources:
Expand Down Expand Up @@ -66,13 +66,9 @@ def generate_class(
):
name = cls.__name__
methods, properties = get_public_members(cls)
methods = [
f"{name}.{m}" for m in methods
]
methods = [f"{name}.{m}" for m in methods]

properties = [
f"{name}.{p}" for p in properties
]
properties = [f"{name}.{p}" for p in properties]

underline = "=" * len(name)

Expand Down Expand Up @@ -149,32 +145,28 @@ def main():
page_name="Plot",
classes=[fastplotlib.Plot],
modules=["fastplotlib"],
source_path=LAYOUTS_DIR.joinpath("plot.rst")
source_path=LAYOUTS_DIR.joinpath("plot.rst"),
)

generate_page(
page_name="GridPlot",
classes=[fastplotlib.GridPlot],
modules=["fastplotlib"],
source_path=LAYOUTS_DIR.joinpath("gridplot.rst")
source_path=LAYOUTS_DIR.joinpath("gridplot.rst"),
)

generate_page(
page_name="Subplot",
classes=[Subplot],
modules=["fastplotlib.layouts._subplot"],
source_path=LAYOUTS_DIR.joinpath("subplot.rst")
source_path=LAYOUTS_DIR.joinpath("subplot.rst"),
)

# the rest of this is a mess and can be refactored later

graphic_classes = [
getattr(graphics, g) for g in graphics.__all__
]
graphic_classes = [getattr(graphics, g) for g in graphics.__all__]

graphic_class_names = [
g.__name__ for g in graphic_classes
]
graphic_class_names = [g.__name__ for g in graphic_classes]

graphic_class_names_str = "\n ".join([""] + graphic_class_names)

Expand All @@ -194,17 +186,13 @@ def main():
page_name=graphic_cls.__name__,
classes=[graphic_cls],
modules=["fastplotlib"],
source_path=GRAPHICS_DIR.joinpath(f"{graphic_cls.__name__}.rst")
source_path=GRAPHICS_DIR.joinpath(f"{graphic_cls.__name__}.rst"),
)
##############################################################################

feature_classes = [
getattr(_features, f) for f in _features.__all__
]
feature_classes = [getattr(_features, f) for f in _features.__all__]

feature_class_names = [
f.__name__ for f in feature_classes
]
feature_class_names = [f.__name__ for f in feature_classes]

feature_class_names_str = "\n ".join([""] + feature_class_names)

Expand All @@ -223,17 +211,13 @@ def main():
page_name=feature_cls.__name__,
classes=[feature_cls],
modules=["fastplotlib.graphics._features"],
source_path=GRAPHIC_FEATURES_DIR.joinpath(f"{feature_cls.__name__}.rst")
source_path=GRAPHIC_FEATURES_DIR.joinpath(f"{feature_cls.__name__}.rst"),
)
##############################################################################

selector_classes = [
getattr(selectors, s) for s in selectors.__all__
]
selector_classes = [getattr(selectors, s) for s in selectors.__all__]

selector_class_names = [
s.__name__ for s in selector_classes
]
selector_class_names = [s.__name__ for s in selector_classes]

selector_class_names_str = "\n ".join([""] + selector_class_names)

Expand All @@ -252,17 +236,13 @@ def main():
page_name=selector_cls.__name__,
classes=[selector_cls],
modules=["fastplotlib"],
source_path=SELECTORS_DIR.joinpath(f"{selector_cls.__name__}.rst")
source_path=SELECTORS_DIR.joinpath(f"{selector_cls.__name__}.rst"),
)
##############################################################################

widget_classes = [
getattr(widgets, w) for w in widgets.__all__
]
widget_classes = [getattr(widgets, w) for w in widgets.__all__]

widget_class_names = [
w.__name__ for w in widget_classes
]
widget_class_names = [w.__name__ for w in widget_classes]

widget_class_names_str = "\n ".join([""] + widget_class_names)

Expand All @@ -281,7 +261,7 @@ def main():
page_name=widget_cls.__name__,
classes=[widget_cls],
modules=["fastplotlib"],
source_path=WIDGETS_DIR.joinpath(f"{widget_cls.__name__}.rst")
source_path=WIDGETS_DIR.joinpath(f"{widget_cls.__name__}.rst"),
)
##############################################################################

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy