Skip to content

Commit caa460b

Browse files
committed
doc
1 parent c2ec034 commit caa460b

15 files changed

Lines changed: 259 additions & 67 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
pip install --upgrade pip
2929
pip install .[docs]
3030
export PATH=$HOME/.local/bin:$PATH
31-
sphinx-apidoc -f -o docs/_modules/ ./detkit
3231
make html --directory=docs
3332
touch docs/_build/html/.nojekyll
3433
echo 'Visit [Documentation](https://ameli.github.io/detkit/index.html).' > docs/_build/html/README.md

detkit/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.5"
1+
__version__ = "0.0.6"

detkit/_benchmark/get_instructions_per_task.pyx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ cpdef get_instructions_per_task(task='matmat', dtype='float64'):
4747
Assuming the matrix size is :math:`n`, the complexity of either of the
4848
tasks provided in are as follows
4949
50-
* ``'matmat'``: matrix-matrix multiplication, :math:`n^3` operations
51-
* ``'gramian'``: Gramian matrix multiplication, :math:`\\frac{1}{2}n^3`
52-
operations.
53-
* ``'cholesky'``: Cholesky decomposition, :math:`\\frac{1}{3}n^3`
54-
operations.
55-
* ``'lup'``: LUP decomposition, :math:`\\frac{2}{3}n^3` operations.
56-
* ``'lu'``: LU decomposition, :math:`\\frac{2}{3}n^3` operations.
50+
============== ============================= =======================
51+
Code name Task name Complexity
52+
============== ============================= =======================
53+
``'matmat'`` matrix-matrix multiplication :math:`n^3`
54+
``'gramian'`` Gramian matrix multiplication :math:`\\frac{1}{2}n^3`
55+
``'cholesky'`` Cholesky decomposition :math:`\\frac{1}{3}n^3`
56+
``'lup'`` LUP decomposition :math:`\\frac{2}{3}n^3`
57+
``'lu'`` LU decomposition :math:`\\frac{2}{3}n^3`
58+
============== ============================= =======================
5759
5860
This function measures the instructions of a benchmark task as :math:`n`
5961
tends to infinity.

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=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
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
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:orphan:
2+
3+
{{ fullname }}
4+
{{ underline }}
5+
6+
.. currentmodule:: {{ module }}
7+
8+
.. autoattribute:: {{ objname }}
Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
1-
{{ objname | escape | underline}}
1+
{{ fullname }}
2+
{{ underline }}
23

34
.. currentmodule:: {{ module }}
45

56
.. autoclass:: {{ objname }}
7+
:no-members:
8+
:no-inherited-members:
9+
:no-special-members:
610

7-
{% block attributes %}
8-
{% if attributes %}
9-
.. rubric:: Attributes
10-
.. autosummary::
11-
:toctree:
12-
{% for item in attributes %}
13-
{{ name }}.{{ item }}
14-
{% endfor %}
15-
{% endif %}
16-
{% endblock %}
11+
{% block methods %}
12+
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
13+
.. autosummary::
14+
:toctree:
15+
{% for item in all_methods %}
16+
{%- if not item.startswith('_') or item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
17+
{{ name }}.{{ item }}
18+
{%- endif -%}
19+
{%- endfor %}
20+
{% for item in inherited_members %}
21+
{%- if item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
22+
{{ name }}.{{ item }}
23+
{%- endif -%}
24+
{%- endfor %}
25+
{% endblock %}
1726

18-
{% block methods %}
19-
{% if methods %}
20-
.. rubric:: Methods
21-
.. autosummary::
22-
:toctree:
23-
{% for item in methods %}
24-
{{ name }}.{{ item }}
25-
{% endfor %}
26-
{% endif %}
27-
{% endblock %}
27+
{% block attributes %}
28+
{% if attributes %}
29+
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
30+
.. autosummary::
31+
:toctree:
32+
{% for item in all_attributes %}
33+
{%- if not item.startswith('_') %}
34+
{{ name }}.{{ item }}
35+
{%- endif -%}
36+
{%- endfor %}
37+
{% endif %}
38+
{% endblock %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:orphan:
2+
3+
{{ fullname }}
4+
{{ underline }}
5+
6+
.. currentmodule:: {{ module }}
7+
8+
.. automethod:: {{ objname }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{ fullname }}
2+
{{ underline }}
3+
4+
.. currentmodule:: {{ module }}
5+
6+
.. class:: {{ objname }}
7+
8+
This is an ndarray wrapper for a native MATLAB object. This class is not meant
9+
to be instantiated directly, but can be used for type checking
10+
:func:`scipy.io.loadmat` outputs.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:orphan:
2+
3+
{{ fullname }}
4+
{{ underline }}
5+
6+
.. currentmodule:: {{ module }}
7+
8+
.. autoproperty:: {{ objname }}

docs/source/_templates/layout.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{# Base layout for all pages
2+
3+
## Analytics
4+
5+
The service https://plausible.io is used to gather simple
6+
and privacy-friendly analytics for the site. The dashboard can be accessed
7+
at https://analytics.scientific-python.org/docs.scipy.org
8+
The Scientific-Python community is managing the account.
9+
10+
#}
11+
12+
{% extends "!layout.html" %}
13+
14+
{% block extrahead %}
15+
<script defer data-domain="docs.scipy.org" src="https://views.scientific-python.org/js/script.js"></script>
16+
{{ super() }}
17+
{% endblock %}

0 commit comments

Comments
 (0)