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
Integration tests #281
Integration tests #281
Conversation
two small comments I noticed when doing the EN, which might be relevant here as well:
|
Update integration test reference files
With the same py interpreter used to run the tests, and find Martinize2 in PATH, to make sure it's installed.
Update tier-1 tests Update tier-1/bpti files
3582f25
to
0775af6
Compare
I rebased it to clean up the history a bit. It still requires 1 file (tier-1/bpti/martinize2/molecule_0.itp) to be checked by paulo |
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.
Here is a first round with the datafiles. I do not want to take the risk of loosing these comments is github fucks up.
vermouth/tests/data/integration_tests/tier-0/mini-protein1_betasheet/martinize1/command
Outdated
Show resolved
Hide resolved
vermouth/tests/data/integration_tests/tier-0/mini-protein2_helix/README
Outdated
Show resolved
Hide resolved
vermouth/tests/data/integration_tests/tier-0/mini-protein1_betasheet/README
Outdated
Show resolved
Hide resolved
vermouth/tests/data/integration_tests/tier-0/mini-protein2_helix/martinize2/command
Outdated
Show resolved
Hide resolved
vermouth/tests/data/integration_tests/tier-1/bpti/martinize2/command
Outdated
Show resolved
Hide resolved
vermouth/tests/data/integration_tests/tier-1/lysozyme/martinize2/command
Outdated
Show resolved
Hide resolved
vermouth/tests/data/integration_tests/tier-1/lysozyme/test/CG.top
Outdated
Show resolved
Hide resolved
Turns out the cg.pdb does not get written to the current working dir, but somewhere else. Investigating... |
MARTINIZE2 = find_in_path() | ||
|
||
|
||
def assert_equal_blocks(block1, block2): |
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.
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.
I just tried, and it became a mess: (pytest_assertion plugin: representation of details failed: .../lib/python3.6/site-packages/_pytest/assertion/util.py:377: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all().
. The only way to make it work would be to basically reimplement the pytest reporting machinery, which seems rather out-of-scope.
Similarly for the 'distance' attribute on edges, and interactions, these seem plagued by rounding issues, and I can't figure out a way to make the output remotely useful.
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.
Oh, adding a custom reporter for np.ndarray does not work. You'd need to get into the assertion rewriting, which is not possible pytest-dev/pytest#5347
I do not find what you do with the files in the "martinize1" directories. Are you using them or did I miss something? Also, I think it would be good to separate what is expected to be the same between martinize 1 and 2 , and what is expected to be different. This way, you can make sure martinize 2 produces the same output as martinize 1 when it should. |
This way the output pdb file ends up at the correct place: the temporary directory. To enable rewriting to the data file path (e.g. for reading), prepend a '.'
I removed the M1 directories. They were not used in the tests, and only in the hand crafting of the files in the M2 directories. Those files have been carefully vetted. |
- the first colinear dummy was always placed on the anchor - Fix approx testing of coordinates in integration tests - Fix approx testing of distances of edges in integration tests - Remove positions from charge dummy nodes in integration tests, since those are (partially) random. The relative positions are tests by edge distances.
The removed rubber band got a distance of 0.92, which is more than the maximum (0.9)
1e-3 is the precision of PDB files
The low patch coverage is kind of expected, since the integration tests run in a separate interpreter, and the coverage they generate is not recorded. |
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.
Overall looks good to me. Few small comments double checking some things. Also before minting the new release we should include all interactions in the ff-parser and itp parser.
Disagree. A release is long overdue, and using not-yet-implemented interactions causes an understandable error message. |
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.
Breaking out comments to issues this is good to go.
Sets up integration tests based on files provided by @paulocts
Fixes #183
Will need cleanup and rebasing before it's ready for review.