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

Add Protocol Errors #441

Merged
merged 19 commits into from
Jan 9, 2025
Merged

Add Protocol Errors #441

merged 19 commits into from
Jan 9, 2025

Conversation

jthorton
Copy link
Contributor

@jthorton jthorton commented Dec 10, 2024

Fixes #385 by adding specific protocol execution and results errors.

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

@jthorton jthorton marked this pull request as draft December 10, 2024 13:36
@jthorton
Copy link
Contributor Author

pre-commit.ci autofix

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.52%. Comparing base (71a9c66) to head (b8b4b2e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   98.51%   98.52%           
=======================================
  Files          38       39    +1     
  Lines        2158     2166    +8     
=======================================
+ Hits         2126     2134    +8     
  Misses         32       32           

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

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments, otherwise it looks good to me!

gufe/protocols/errors.py Outdated Show resolved Hide resolved


# Protocol Results Errors
class MissingProtocolUnitError(Exception):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean a missing UnitResult?



# Protocol Errors
class ProtocolValidationError(Exception):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be subclassing out of a "BaseGufeException" type? I'm thinking it might be useful to have a catch-all that isn't a Exception in some cases.

For example - it might be good for execute_DAG to capture all of these and prevent trying to restart the DAG (i.e. if these are known deterministic failures, then we should assume they will happen over and over again).

@jthorton jthorton marked this pull request as ready for review December 12, 2024 14:52
@jthorton
Copy link
Contributor Author

pre-commit.ci autofix

@ijpulidos ijpulidos self-requested a review December 16, 2024 19:18
Copy link
Member

@dotsdl dotsdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start @jthorton! Thank you for getting us going on more specific error modes for protocols!

gufe/protocols/errors.py Outdated Show resolved Hide resolved
gufe/protocols/errors.py Outdated Show resolved Hide resolved
gufe/protocols/protocoldag.py Outdated Show resolved Hide resolved
gufe/protocols/errors.py Outdated Show resolved Hide resolved
gufe/protocols/errors.py Outdated Show resolved Hide resolved
gufe/protocols/errors.py Show resolved Hide resolved
@dotsdl
Copy link
Member

dotsdl commented Dec 19, 2024

@ijpulidos since this PR addresses #385, would you be willing to offer your feedback on this one?

@dotsdl
Copy link
Member

dotsdl commented Dec 19, 2024

@hannahbaumann since you're working in detail on protocols, would you be willing to offer feedback on our choices here?

@jthorton
Copy link
Contributor Author

jthorton commented Jan 7, 2025

pre-commit.ci autofix

1 similar comment
@jthorton
Copy link
Contributor Author

jthorton commented Jan 7, 2025

pre-commit.ci autofix

@jthorton jthorton requested review from dotsdl and IAlibay January 7, 2025 16:40
@dotsdl dotsdl enabled auto-merge (squash) January 9, 2025 00:04
Copy link
Member

@dotsdl dotsdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @jthorton! Thanks for putting this together!

@dotsdl dotsdl merged commit d077d7a into main Jan 9, 2025
13 checks passed
@dotsdl dotsdl deleted the protocol_error branch January 9, 2025 00:08
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.

Have custom errors specific for protocols
3 participants