-
Notifications
You must be signed in to change notification settings - Fork 13
Description
In context.py, validity checks are applied before the assignment at the end of the work property setter for Context, but these checks are not applied to subsequent modifications to the property. In particular, this means that new operations may not be registered with Context.__operations depending on the client call sequence.
The best workaround is to configure the WorkSpec entirely before calling get_context(), but this is a fairly ugly design oversight.
The issue should be prevented in the new style (gmxapi >= 0.1) operation registration. Whether or not a separate fix is applied to the older Context implementation may depend on demonstrated need, and on Python version support requirements. (A 2.7-compatible solution may look substantially different from a 3.6+ compatible solution.)