Protocols test migration & MD Protocol simulation tests#1294
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1294 +/- ##
==========================================
- Coverage 94.34% 92.63% -1.71%
==========================================
Files 141 143 +2
Lines 10868 10957 +89
==========================================
- Hits 10253 10150 -103
- Misses 615 807 +192
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
hannahbaumann
left a comment
There was a problem hiding this comment.
Thanks @IAlibay , this looks good to me, maybe we can add a test for the number of frames once that mystery is solved... =)
mikemhenry
left a comment
There was a problem hiding this comment.
LGTM! +1 to @atravitz file layout suggestions
| available_platforms, | ||
| tmpdir | ||
| ): | ||
| if platform not in available_platforms: |
There was a problem hiding this comment.
This is nice, eventually we will want to set things up so we can "force" the GPU tests so we can catch issues like the GPU drivers not working BUT for fast tests, I think this is a great idea
There was a problem hiding this comment.
Not me unfortunately, there's a good chance this was you from a previous test :P
| class TestPlainMDProtocol(GufeTokenizableTestsMixin): | ||
| cls = openmm_md.PlainMDProtocol | ||
| key = None | ||
| repr = "PlainMDProtocol-" | ||
|
|
||
| @pytest.fixture() | ||
| def instance(self, protocol): | ||
| return protocol | ||
|
|
||
| def test_repr(self, instance): | ||
| """ | ||
| Overwrites the base `test_repr` call to do a bit more. | ||
| """ | ||
| assert isinstance(repr(instance), str) | ||
| assert self.repr in repr(instance) | ||
|
|
||
|
|
||
| class TestPlainMDProtocolUnit(GufeTokenizableTestsMixin): | ||
| cls = openmm_md.PlainMDProtocolUnit | ||
| repr = "PlainMDProtocolUnit(" | ||
| key = None | ||
|
|
||
| @pytest.fixture | ||
| def instance(self, protocol_unit): | ||
| return protocol_unit | ||
|
|
||
| def test_repr(self, instance): | ||
| """ | ||
| Overwrites the base `test_repr` call to do a bit more. | ||
| """ | ||
| assert isinstance(repr(instance), str) | ||
| assert self.repr in repr(instance) | ||
|
|
||
|
|
||
| class TestPlainMDProtocolResult(GufeTokenizableTestsMixin): | ||
| cls = openmm_md.PlainMDProtocolResult | ||
| key = None | ||
| repr = "PlainMDProtocolResult-" | ||
|
|
||
| @pytest.fixture() | ||
| def instance(self, protocol_result): | ||
| return protocol_result | ||
|
|
||
| def test_repr(self, instance): | ||
| """ | ||
| Overwrites the base `test_repr` call to do a bit more. | ||
| """ | ||
| assert isinstance(repr(instance), str) | ||
| assert self.repr in repr(instance) No newline at end of file |
There was a problem hiding this comment.
Maybe take all the duplicated bits and toss it into a class?
There was a problem hiding this comment.
I'm going to raise an issue for this. It feels like we should just upstream the check to gufe if we're overriding the same method everywhere.
So I started with that file structure, but the only "issue" I found was that when you do abfes & ahfes you want to have them as separate folders but code-wise they exist within the one protocols folder. So that structure starts failing really quickly. |
Just to follow-up here, assuming we don't really mind being loose with that structure (e.g. for abfes), I'm perfectly happy with that structure @atravitz |
I'm not sure I understand the issue - I'm fine with us adding |
To avoid confusion, I would like to have |
|
ah okay, i'm fine with that! it still keeps things clear imo. i'll make those changes shortly. |
Thanks! |
|
No API break detected ✅ |

Fixes #1298
Fixes #1295
Fixes #1299
It started as just the AHFE protocol, but I thought it'd be better to just move everything.
TODO:
Checklist
newsentry - internal API only, no news neededDevelopers certificate of origin