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

added tests for issues and some generic algebra tests #23

Merged
merged 6 commits into from Jun 11, 2019

Conversation

karlwessel
Copy link

I added two files with more tests.

issuestests.jl contains tests cases that cover any issues reported on github (including currently open ones). These should assure that they are not reintroduced in a later commit. A good practice probably would be to add a tests case for any issue to that file before fixing that issue.

generictests.jl contains a collection of tests that check mathematical properties which should hold for any geometric algebra. The collection can be executed on different signatures over different fields.

Although those test improve the coverage somewhat they are not especially written to do that. For that I would rather write another file with tests which only make sure that as much lines as possible are covered, without caring to much about the output or the sensibility of the test. These would at least assure that there are no syntax errors.

@codecov-io
Copy link

codecov-io commented Jun 10, 2019

Codecov Report

Merging #23 into master will increase coverage by 15.51%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #23       +/-   ##
===========================================
+ Coverage   41.94%   57.45%   +15.51%     
===========================================
  Files           7        7               
  Lines         968     1154      +186     
===========================================
+ Hits          406      663      +257     
+ Misses        562      491       -71
Impacted Files Coverage Δ
src/multivectors.jl 31.08% <100%> (+15.8%) ⬆️
src/Grassmann.jl 71.09% <0%> (+2.34%) ⬆️
src/utilities.jl 61.11% <0%> (+4.62%) ⬆️
src/parity.jl 59.34% <0%> (+7.06%) ⬆️
src/algebra.jl 79.54% <0%> (+24.88%) ⬆️

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 0c68892...092b42d. Read the comment docs.

@utensil
Copy link

utensil commented Jun 10, 2019

@karlwessel Just commented on the code a little bit. Your tests look well organized and you are very observant to raise the issues. 👍

I was also thinking about porting the tests in https://github.com/pygae/GAlgebra.jl/blob/master/test/runtests.jl to Grassmann, including sanity checks and many Geometric Algebra identities. More tests are planned, like Geometric Calculus and check the properties of other algebra structures (groups, ideals etc. ) that GA can generate.

P.S. GAlgebra.jl is a symbolic GA library in Julia (aimed to be more than just a wrapper for GAlgebra), it would be nice that it also comes in handy for you. 😄

@chakravala chakravala added this to In progress in Differential Geometric Algebra via automation Jun 10, 2019
@chakravala chakravala self-requested a review June 10, 2019 16:35
test/issuestests.jl Outdated Show resolved Hide resolved
Copy link
Owner

@chakravala chakravala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, please move the isapprox and scalar methods to src/multivectors.jl into the section labeled ## Generic around lines 300 and export scalar

The problem for #22 has been resolved in 0c68892 so it is no longer a broken test

test/generictests.jl Outdated Show resolved Hide resolved
Differential Geometric Algebra automation moved this from In progress to Review Jun 10, 2019
@chakravala
Copy link
Owner

@karlwessel are there any additional tests planned, or not? p.s. @utensil

@karlwessel
Copy link
Author

@karlwessel are there any additional tests planned, or not? p.s. @utensil

Not at the moment. I write the tests whenever something in my own code doesn't work as expected. Implementing tests for the properties of GA helps me by telling me that I didn't understand some property correctly yet or by telling me that it isn't implemented correctly yet.

There are also the pure coverage related tests that one should implement. Like my tests for the isapprox and scalar method, which one probably should move to a multivectorstest.jl. But that is a rather boring work :-). And since you said that the API isn't stable yet it probably makes more sense the write those for the final API.

So there might be more tests coming but not for this PR I would say.

@chakravala chakravala merged commit 959957d into chakravala:master Jun 11, 2019
Differential Geometric Algebra automation moved this from Review to Done Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants