Skip to content
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

[WIP] Enforce protocol settings at instantiation #461

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ianmkenney
Copy link
Member

Require Protocol authors to define the _settings_cls attribute for their class. init method checks that _settings_cls is define (if not raise NotImplementedError) and that the passed settings are an instance of the _settings_cls (if not raise ValueError).

Update existing Protocols in gufe to reflect this change. Closes #405.

Tips

  • Comment "pre-commit.ci autofix" to have pre-commit.ci atomically format your PR.
    Since this will create a commit, it is best to make this comment when you are finished with your work.

Checklist

  • Added a news entry

Developers certificate of origin

Require Protocol authors to define the _settings_cls attribute for
their class. __init__ method checks that _settings_cls is define (if
not raise NotImplementedError) and that the passed settings are an
instance of the _settings_cls (if not raise ValueError).

Update existing Protocols in gufe to reflect this change.
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.52%. Comparing base (f8baf7f) to head (af742cf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #461   +/-   ##
=======================================
  Coverage   98.52%   98.52%           
=======================================
  Files          39       39           
  Lines        2166     2170    +4     
=======================================
+ Hits         2134     2138    +4     
  Misses         32       32           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Enforce Protocol settings at instantiation
1 participant