-
Notifications
You must be signed in to change notification settings - Fork 51
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
AtomsBase testing #131
AtomsBase testing #131
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #131 +/- ##
==========================================
+ Coverage 72.83% 73.38% +0.55%
==========================================
Files 34 34
Lines 4804 5024 +220
==========================================
+ Hits 3499 3687 +188
- Misses 1305 1337 +32
☔ View full report in Codecov by Sentry. |
I think this is pretty much done from code that needs to be added to Molly. I made some PRs in AtomsBase to add features that Molly requires and to make the testing framework more flexible. |
Asssuming the tests pass this is probably good enough to cover what @mfherbst was asking for in #128 Based on how this PR ion AtomsBase turns out I might have to make modifications later. For now I think it is good enough but welcome suggestions/edits. Edit: Need to fix issue with Atom being exported in AtomsBase and Molly & breaking the other tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments from my end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving compatibility here. Some of the stuff with keys and fields seems a little strange, that may be the price of supporting AtomsBase though. The ability to convert from an AtomsBase system is useful.
@jgreener64 all good! |
system = make_test_system().system; | ||
#Update values to be something that works with Molly | ||
system = AbstractSystem(system; | ||
boundary_conditions = [Periodic(), Periodic(), Periodic()], | ||
bounding_box = [[1.54732, 0.0, 0.0], | ||
[0.0, 1.4654985, 0.0], | ||
[0.0, 0.0, 1.7928950]]u"Å"); | ||
molly_sys = System(system) | ||
test_approx_eq(system, molly_sys; common_only = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, only got round to look at this now. This is not the best way to do this as with common_only=true
you make the tests less rigorous. You can directly overwrite things (or drop keys) from make_test_system
and then one should be able to use test_approx_eq
directly without using the common_only=true
flag.
This PR will add better support of AtomsBase types and implement AtomsBaseTesting into the CI.
From #128