Skip to content

Validity checks for WorkSpec updates are not applied consistently. #261

@eirrgang

Description

@eirrgang

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions