Skip to content

Add gather and integration test - #46

Open
hannahbaumann wants to merge 8 commits into
mainfrom
add_tests
Open

Add gather and integration test#46
hannahbaumann wants to merge 8 commits into
mainfrom
add_tests

Conversation

@hannahbaumann

@hannahbaumann hannahbaumann commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

Description

This PR adds some tests.
It addresses following issues:

@pep8speaks

pep8speaks commented Sep 25, 2024

Copy link
Copy Markdown

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
@codecov

codecov Bot commented Sep 26, 2024

Copy link
Copy Markdown

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
Comment thread openfe_gromacs/tests/protocols/test_gromacs_md.py

res = prot.gather([dagres])

assert isinstance(res, GromacsMDProtocolResult)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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