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

Make `Mv._make_x` functions static #57

Merged
merged 2 commits into from Nov 21, 2019

Conversation

@eric-wieser
Copy link
Contributor

eric-wieser commented Nov 20, 2019

Depends on gh-58 in order to have a readable diff


These don't need to mutate any state, and they way they did before made the iterative approach in make_multivector quite confusing.

The functions now return a raw sympy expression, which is assigned to self.obj in a single place.

This also adds errors to the paths that didn't set anything at all.

The one assignment to self.grade_i was pointless, as it was overwritten later anyway

@eric-wieser eric-wieser force-pushed the eric-wieser:mv-static-methods branch from ba285ab to bb72206 Nov 20, 2019
These are not documented or used anywhere outside of __init__.
Nor are they useful, since the caller can just construct themselves a new `Mv` instead of reusing the old one.

Now that they are private, we can convert these comments into docstrings without them appearing on readthedocs.
@eric-wieser eric-wieser force-pushed the eric-wieser:mv-static-methods branch 2 times, most recently from 8d12e40 to fa694c2 Nov 20, 2019
These don't need to mutate any state, and they way they did before made the iterative approach in make_multivector quite confusing.

The functions now return a raw sympy expression, which is assigned to `self.obj` in a single place.

This also adds errors to the paths that didn't set anything at all.

Since these are now static methods, it is easier to remove the dictionary so that they can be called the usual way.

The one assignment to `self.grade_i` was pointless, as it was overwritten later anyway.
@eric-wieser eric-wieser force-pushed the eric-wieser:mv-static-methods branch from fa694c2 to 9b42246 Nov 20, 2019
@codecov

This comment has been minimized.

Copy link

codecov bot commented Nov 20, 2019

Codecov Report

Merging #57 into master will decrease coverage by 0.04%.
The diff coverage is 79.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   66.54%   66.49%   -0.05%     
==========================================
  Files           8        8              
  Lines        4899     4895       -4     
==========================================
- Hits         3260     3255       -5     
- Misses       1639     1640       +1
Impacted Files Coverage Δ
galgebra/mv.py 61.37% <79.16%> (-0.15%) ⬇️

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 552600e...9b42246. Read the comment docs.

@utensil

This comment has been minimized.

Copy link
Member

utensil commented Nov 21, 2019

Looks nice to me.

@utensil utensil merged commit de866d4 into pygae:master Nov 21, 2019
5 checks passed
5 checks passed
Travis CI - Pull Request Build Passed
Details
codebeat 5 issues resolved and 5 introduced
Details
codecov/patch 79.16% of diff hit (target 66.54%)
Details
codecov/project Absolute coverage decreased by -0.04% but relative coverage increased by +12.62% compared to 552600e
Details
continuous-documentation/read-the-docs Read the Docs build succeeded!
Details
@eric-wieser eric-wieser changed the title Make `Mv._make_x` functions private and static Make `Mv._make_x` functions static Nov 27, 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.