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

Cleanup many docstrings in ga.py #51

Merged
merged 3 commits into from Nov 19, 2019

Conversation

@eric-wieser
Copy link
Contributor

eric-wieser commented Nov 14, 2019

Unfortunately napoleon doesn't allow us to group our members together as was intended here - so we have to abandon numpydoc in this class and use .. attribute directly, which is quite verbose. Also frustratingly, we cannot use headings inside Ga.__doc__, so have to make do with ..rubric::.

This also adds backticks and latex rendering in many places where it aids readability.

Rendered output: before, after

Unfortunately napoleon doesn't allow us to group our members together as was intended here - so we have to abandon numpydoc in this class and use `.. attribute` directly, which is quite verbose. Also frustratingly, we cannot use headings inside `Ga.__doc__`, so have to make do with `..rubric::`.

This also adds backticks and latex rendering in many places where it aids readability.
@eric-wieser eric-wieser requested review from utensil and Nov 14, 2019
.. attribute:: indexes_to_blades_dict
Map index tuples to basis blades (dictionary).
.. attribute:: bases_to_indexes_dict
Map basis bases to index tuples (dictionary).
.. attribute:: indexes_to_bases_dict
Map index tuples to basis bases (dictionary).
.. attribute:: pseudoI
Symbol for pseudo scalar (non-commutative sympy symbol).
.. rubric:: Multiplication tables data structures
Keys in all multiplication tables (``*``, ``^``, ``|``, ``<``, ``>``) are always ``symbol1*symbol2``.
The correct operation is known by the context (name) of the relevant list or dictionary)
.. attribute:: mul_table
Geometric products of basis blades as list of ``[(base1*base2, Expansion of base1*base2),...]``
.. attribute:: mul_table_dict
Geometric products of basis blades as dicitionary ``{base1*base2: Expansion of base1*base2,...}``
.. attribute:: wedge_table
Outer products of basis blades as list of ``[(base1*base2, Expansion of base1^base2),...]``
.. attribute:: wedge_table_dict
Outer products of basis blades as dicitionary ``{base1*base2: Expansion of base1^base2,...}``
.. rubric:: Reciprocal basis data structures
.. attribute:: r_symbols
Reciprocal basis vector symbols (list of non-commutative sympy variables)
.. attribute:: r_basis
List of reciprocal basis vectors expanded as linear combination of basis vector symbols.
.. attribute:: r_basis_dict
Dictionary to map reciprocal basis symbols to reciprocal basis expanded in terms of basis symbols
{reciprocal basis symbol: linear combination of basis symbols,...}
.. attribute:: r_basis_mv
List of reciprocal basis vectors in terms of basis multivectors (elements of list can be used in
multivector expressions.)
.. rubric:: Derivative data structures
.. attribute:: de
Derivatives of basis functions. Two dimensional list. First entry is differentiating coordinate index.
Second entry is basis vector index. Quantities are linear combinations of basis vector symbols.
.. attribute:: dbases
Dictionary of derivatives of basis blades with respect to coordinate {(coordinate index, basis blade):
derivative of basis blade with respect to coordinate,...} (Note that values in dictionary are not
multivectors, but linear combinations of basis blade symbols).
.. attribute:: Pdop_identity
Partial differential operator identity (operates on multivector function to return function).
.. attribute:: Pdiffs
Dictionary of partial differential operators (operates on multivector functions) for each coordinate
:math:`{x: \partial_{x}, ...}`
.. attribute:: sPds
Dictionary of scalar partial differential operators (operates on scalar functions) for each coordinate
:math:`{x: \partial_{x}, ...}`
.. attribute:: grad
Geometric derivative operator from left. grad*F returns multivector derivative, F*grad returns differential
operator.
.. attribute:: rgrad
Geometric derivative operator from right. grad*F returns differential operator, F*grad returns multivector
derivative.
.. Sphinx adds all the other members below this docstring
.. rubric:: Other members
Comment on lines 161 to 306 (Truncated to 100 lines)

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Nov 14, 2019

Author Contributor

It's unfortunate how much more verbose this becomes...

@codecov

This comment has been minimized.

Copy link

codecov bot commented Nov 14, 2019

Codecov Report

Merging #51 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #51   +/-   ##
=======================================
  Coverage   66.57%   66.57%           
=======================================
  Files           8        8           
  Lines        4906     4906           
=======================================
  Hits         3266     3266           
  Misses       1640     1640
Impacted Files Coverage Δ
galgebra/ga.py 74.32% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1ad518...58178a8. Read the comment docs.

@utensil

This comment has been minimized.

Copy link
Member

utensil commented Nov 15, 2019

image

image

image

@utensil

This comment has been minimized.

Copy link
Member

utensil commented Nov 15, 2019

Great work! Found a few places which might need to change as well.

@eric-wieser

This comment has been minimized.

Copy link
Contributor Author

eric-wieser commented Nov 18, 2019

Fixed the locations you highlighted

galgebra/ga.py Outdated Show resolved Hide resolved
galgebra/ga.py Outdated Show resolved Hide resolved
galgebra/ga.py Outdated Show resolved Hide resolved
galgebra/ga.py Outdated Show resolved Hide resolved
galgebra/ga.py Outdated Show resolved Hide resolved
galgebra/ga.py Show resolved Hide resolved
galgebra/ga.py Show resolved Hide resolved
@eric-wieser eric-wieser force-pushed the eric-wieser:fix-docstrings branch 3 times, most recently from 1223aa7 to 95195c8 Nov 19, 2019
@eric-wieser eric-wieser force-pushed the eric-wieser:fix-docstrings branch from 95195c8 to 58178a8 Nov 19, 2019
@utensil utensil merged commit 4f0210d into pygae:master Nov 19, 2019
5 checks passed
5 checks passed
Travis CI - Pull Request Build Passed
Details
codebeat no reportable quality changes
Details
codecov/patch 100% of diff hit (target 66.57%)
Details
codecov/project 66.57% (+0%) compared to a1ad518
Details
continuous-documentation/read-the-docs Read the Docs build succeeded!
Details
@eric-wieser eric-wieser deleted the eric-wieser:fix-docstrings branch Nov 29, 2019
@utensil utensil added this to the 0.4.5 milestone Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.