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 for SimStore StorableFunctions #985
Integration tests for SimStore StorableFunctions #985
Conversation
Parts of ensuring these can be used independently for testing.
Codecov Report
@@ Coverage Diff @@
## master #985 +/- ##
==========================================
+ Coverage 80.26% 80.28% +0.01%
==========================================
Files 136 136
Lines 14455 14468 +13
==========================================
+ Hits 11603 11616 +13
Misses 2852 2852
Continue to review full report at Codecov.
|
This is ready for review and comment. I will leave it open for at least 24 hours, merging no earlier than Mon 01 Mar 18:00 GMT (19:00 local). |
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.
This LGTM, 1 leftover TODO, but please don't hang on that.
One question for my own understanding of the new behavior:
If a cv is connected to two storages and a new result is calculated, is it stored to the last, the first, or both connected handlers (or is this dependend on the storage.save
being called)?
openpathsampling/experimental/simstore/test_storable_function_integration.py
Outdated
Show resolved
Hide resolved
…integration.py Co-authored-by: Sander Roet <sanderroet@hotmail.com>
This depends on the
|
This PR adds some detailed integration tests for storable functions in SimStore. These tests are considerably more complicated than the existing unit tests, and are designed to ensure that storage, backend, and storable functions play together as desired. This also fixes some problems that have previously slipped through the cracks.
A few effects of this:
StorableFunction
s didn't show up instorage.cvs
MemoryStorageBackend
andGeneralStorage
that are required to use them (instead of using the SQL backend and the OPS storage)EDIT: This also now adds support for a single storable function (CV) to connect to multiple storage backends (e.g., if it was loaded from one file, but it being used to save data into a second file -- want to be able to find disk-cached results in either). If a file is
close
d, then it deregisters itself from all storable functions. If something goes wrong when trying to load from a registered file (e.g., if the user deleted the file in the meantime) a warning will be issued, but we'll fall back to re-evaluating the function if needed. Tests for these behaviors are included in the new test file.