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

Add gather and integration test #46

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add gather and integration test #46

wants to merge 8 commits into from

Conversation

hannahbaumann
Copy link
Contributor

@hannahbaumann hannahbaumann commented Sep 25, 2024

Description

This PR adds some tests.
It addresses following issues:

@pep8speaks
Copy link

pep8speaks commented Sep 25, 2024

Hello @hannahbaumann! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 166:80: E501 line too long (80 > 79 characters)

Comment last updated at 2024-09-26 12:32:01 UTC

@hannahbaumann hannahbaumann linked an issue Sep 25, 2024 that may be closed by this pull request
Base automatically changed from protocol_updates to main September 25, 2024 12:11
@hannahbaumann hannahbaumann linked an issue Sep 26, 2024 that may be closed by this pull request
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.00%. Comparing base (33a5cfa) to head (15923e3).

Additional details and impacted files

@hannahbaumann hannahbaumann changed the title [WIP] Add more tests Add gather and integration test Sep 27, 2024

res = prot.gather([dagres])

assert isinstance(res, GromacsMDProtocolResult)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe check the other attributes of the results object? I.e. what else do you expect to be getting out of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean testing the get_x functions here?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it's a bit tedious but you can probably program/template a lot of it using something like getattr and a loop.

scratch_basedir=scratch_temp,
keep_shared=False,
n_retries=3,
)
Copy link
Member

Choose a reason for hiding this comment

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

For a full integration test, you really want to run "this thing under normal circumstances".

What you're testing is "is this thing yielding the results I would expect".

To do that you could test:

  1. Am I getting the right temperature?
  2. Am I getting the right pressure?
  3. Is my box volume equilibrating during the NPT phase?
  4. Is my ligand sticking around the binding site as I would expect it to?
  5. Is my energy reasonably well maintained?

Because you're marking it with the "this is really expensive" flag, it's perfectly ok to make this a much longer test (many more steps, etc...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add MD protocol integration test Add gather tests
3 participants