Skip to content

Commit 731a067

Browse files
authored
Merge branch 'master' into feature-call
2 parents a13da44 + 011bab6 commit 731a067

24 files changed

Lines changed: 1108 additions & 597 deletions

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd
12 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% set class_toc = get_class_toc() %}
2+
3+
<nav id="bd-toc-nav", style="padding-top: 1rem;">
4+
<ul class="visible nav section-nav flex-column">
5+
{% for item in class_toc %}
6+
<li class="toc-h1 nav-item toc-entry">
7+
<a class="reference internal nav-link" href="{{ item.link }}">{{ item.title }}</a>
8+
</li>
9+
<ul class="visible nav section-nav flex-column">
10+
{% for attr in item.attributes_and_methods %}
11+
<li class="toc-h2 nav-item toc-entry">
12+
<a class="reference internal nav-link" href="{{ attr.link }}">{{ attr.title }}</a>
13+
</li>
14+
{% endfor %}
15+
</ul>
16+
{% endfor %}
17+
</ul>
18+
</nav>

docs/source/api/layouts.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.. _api_layouts:
2+
3+
Layouts
4+
*******
5+
6+
Plot
7+
####
8+
9+
.. autoclass:: fastplotlib.Plot
10+
:members:
11+
:inherited-members:
12+
13+
GridPlot
14+
########
15+
16+
.. autoclass:: fastplotlib.GridPlot
17+
:members:
18+
:inherited-members:
19+
20+
Subplot
21+
#######
22+
23+
.. note:: ``Subplot`` is NOT meant to be instantiated directly, it only exists as part of a GridPlot.
24+
25+
.. autoclass:: fastplotlib.layouts._subplot.Subplot
26+
:members:
27+
:inherited-members:

docs/source/conf.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
from bs4 import BeautifulSoup
6+
from typing import *
7+
8+
# -- Project information -----------------------------------------------------
9+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
10+
11+
project = 'fastplotlib'
12+
copyright = '2022, Kushal Kolar, Caitlin Lewis'
13+
author = 'Kushal Kolar, Caitlin Lewis'
14+
release = 'v0.1.0.a6'
15+
16+
# -- General configuration ---------------------------------------------------
17+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
18+
19+
extensions = ["sphinx.ext.napoleon", "sphinx.ext.autodoc"]
20+
autodoc_typehints = "description"
21+
22+
templates_path = ['_templates']
23+
exclude_patterns = []
24+
25+
26+
27+
# -- Options for HTML output -------------------------------------------------
28+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
29+
30+
html_theme = 'pydata_sphinx_theme'
31+
html_theme_options = {"page_sidebar_items": ["class_page_toc"]}
32+
33+
html_static_path = ['_static']
34+
35+
autodoc_member_order = 'bysource'
36+
autoclass_content = "both"
37+
38+
def _setup_navbar_side_toctree(app: Any):
39+
40+
def add_class_toctree_function(app: Any, pagename: Any, templatename: Any, context: Any, doctree: Any):
41+
def get_class_toc() -> Any:
42+
soup = BeautifulSoup(context["body"], "html.parser")
43+
44+
matches = soup.find_all('dl')
45+
if matches is None or len(matches) == 0:
46+
return ""
47+
items = []
48+
deeper_depth = matches[0].find('dt').get('id').count(".")
49+
for match in matches:
50+
match_dt = match.find('dt')
51+
if match_dt is not None and match_dt.get('id') is not None:
52+
current_title = match_dt.get('id')
53+
current_depth = match_dt.get('id').count(".")
54+
current_link = match.find(class_="headerlink")
55+
if current_link is not None:
56+
if deeper_depth > current_depth:
57+
deeper_depth = current_depth
58+
if deeper_depth == current_depth:
59+
items.append({
60+
"title": current_title.split('.')[-1],
61+
"link": current_link["href"],
62+
"attributes_and_methods": []
63+
})
64+
if deeper_depth < current_depth:
65+
items[-1]["attributes_and_methods"].append(
66+
{
67+
"title": current_title.split('.')[-1],
68+
"link": current_link["href"],
69+
}
70+
)
71+
return items
72+
context["get_class_toc"] = get_class_toc
73+
74+
app.connect("html-page-context", add_class_toctree_function)
75+
76+
77+
def setup(app: Any):
78+
for setup_function in [
79+
_setup_navbar_side_toctree,
80+
]:
81+
setup_function(app)

docs/source/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. fastplotlib documentation master file, created by
2+
sphinx-quickstart on Wed Dec 28 12:46:56 2022.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to fastplotlib's documentation!
7+
=======================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
Layouts <api/layouts>
14+
15+
16+
17+
Indices and tables
18+
==================
19+
20+
* :ref:`genindex`
21+
* :ref:`modindex`
22+
* :ref:`search`

examples/collection.ipynb

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

0 commit comments

Comments
 (0)