Skip to content

Commit

Permalink
Manually tailor the class documentation pages
Browse files Browse the repository at this point in the history
Notably, this:

* Puts all the member docs in a single page, since there aren't that many of them
* Fixes `Frame` to not show numpy documentation
* Add `MVArray` to the docs
* Makes the documentation for the operator overloads visible.
  • Loading branch information
eric-wieser committed Mar 30, 2020
1 parent 4f3ef08 commit 8ae7ec7
Show file tree
Hide file tree
Showing 22 changed files with 121 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ target/

.mypy_cache
.ipynb_checkpoints

/docs/api/generated/*
22 changes: 12 additions & 10 deletions clifford/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
Note that typically the :doc:`predefined-algebras` are sufficient, and there is no need to build an algebra from scratch.
.. autosummary::
:toctree: generated/
:toctree:
Cl
conformalize
Whether you construct your algebras from scratch, or use the predefined ones, you'll end up working with the following types:
.. autosummary::
:toctree: generated/
:toctree:
MultiVector
Layout
Expand All @@ -43,28 +43,30 @@
==============================
These functions are used to change the global behavior of ``clifford``.
.. autosummary::
:toctree: generated/
.. autofunction:: eps
.. autofunction:: pretty
.. autofunction:: ugly
.. autofunction:: print_precision
eps
pretty
ugly
print_precision
Miscellaneous classes
=======================
.. autosummary::
:toctree: generated/
:toctree:
MVArray
Frame
BladeMap
Miscellaneous functions
=======================
.. autosummary::
:toctree: generated/
:toctree:
grade_obj
randomMV
Expand Down
1 change: 1 addition & 0 deletions clifford/_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np

from ._mvarray import MVArray
from ._multivector import MultiVector
from .operator import op
from . import _settings

Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions docs/api/clifford.BasisBladeOrder.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
clifford.BasisBladeOrder
========================

.. currentmodule:: clifford

.. autoclass:: BasisBladeOrder
:members:
:undoc-members:
:member-order: bysource
9 changes: 9 additions & 0 deletions docs/api/clifford.BasisVectorIds.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
clifford.BasisVectorIds
========================

.. currentmodule:: clifford

.. autoclass:: BasisVectorIds
:members:
:undoc-members:
:member-order: bysource
9 changes: 9 additions & 0 deletions docs/api/clifford.BladeMap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
clifford.BladeMap
=================

.. currentmodule:: clifford

.. autoclass:: BladeMap
:members:
:undoc-members:
:member-order: bysource
6 changes: 6 additions & 0 deletions docs/api/clifford.Cl.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
clifford.Cl
===========

.. currentmodule:: clifford

.. autofunction:: Cl
10 changes: 10 additions & 0 deletions docs/api/clifford.ConformalLayout.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clifford.ConformalLayout
========================

.. currentmodule:: clifford

.. autoclass:: ConformalLayout
:members:
:undoc-members:
:show-inheritance:
:member-order: bysource
11 changes: 11 additions & 0 deletions docs/api/clifford.Frame.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
clifford.Frame
==============

.. currentmodule:: clifford

.. autoclass:: Frame
:members:
:undoc-members:
:no-inherited-members:
:show-inheritance:
:member-order: bysource
9 changes: 9 additions & 0 deletions docs/api/clifford.Layout.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
clifford.Layout
===============

.. currentmodule:: clifford

.. autoclass:: Layout
:members:
:member-order: bysource
:undoc-members:
11 changes: 11 additions & 0 deletions docs/api/clifford.MVarray.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
clifford.MVArray
================

.. currentmodule:: clifford

.. autoclass:: MVArray
:members:
:undoc-members:
:special-members: __call__
:no-inherited-members:
:show-inheritance:
11 changes: 11 additions & 0 deletions docs/api/clifford.MultiVector.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
clifford.MultiVector
====================

.. currentmodule:: clifford

.. autoclass:: MultiVector
:no-inherited-members:
:members:
:undoc-members:
:special-members: __add__, __sub__, __mul__, __xor__, __or__, __invert__, __and__, __getitem__, __call__
:member-order: bysource
6 changes: 6 additions & 0 deletions docs/api/clifford.conformalize.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
clifford.conformalize
=====================

.. currentmodule:: clifford

.. autofunction:: conformalize
6 changes: 6 additions & 0 deletions docs/api/clifford.grade_obj.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
clifford.grade\_obj
===================

.. currentmodule:: clifford

.. autofunction:: grade_obj
6 changes: 6 additions & 0 deletions docs/api/clifford.randomMV.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
clifford.randomMV
=================

.. currentmodule:: clifford

.. autofunction:: randomMV
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
#autodoc_default_flags='members'
# you have to list all files with automodule here due to bug in sphinx and nbsphinx
# https://github.com/spatialaudio/nbsphinx/issues/14
autosummary_generate=['clifford','tools','cga']
autosummary_generate=['api/tools', 'api/cga']
autodoc_member_order = 'bysource'
numpydoc_show_class_members = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Scalars, vectors, and higher-grade entities can be mixed freely and consistently
:hidden:

Installation
api
api/index
predefined-algebras
changelog
issues
Expand Down

0 comments on commit 8ae7ec7

Please sign in to comment.