-
Notifications
You must be signed in to change notification settings - Fork 46
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 warning when mod not found #556
Conversation
Thanks! I appreciate how subtle and small your solution is :) |
Thank you Peter! And thanks to @jan-stevens for help with fixing the tests :) |
if mod_found == False: | ||
LOGGER.warning('{} with resid {} not found. ' | ||
'No modification made.' | ||
''.format(resspec['resname'], resspec['resid'])) |
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.
Small problem actually. Not all resspecs need to have a resname or resid attribute. Might be better to format the respec like the CLI accepts it. You should be able to use _format_resname
for that. Also that function has a bad bad name. Pretty sure that's my fault though.
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.
Thanks for the heads up on _format_resname
, will update using that.
modification = [({'resname': 'cter', 'resid': 3}, 'C-ter'), | ||
({'resname': 'nter', 'resid': 1}, 'N-ter')] |
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.
Right, as in the comment before, not all resspecs need a resid or resname. These for example don't need a resid; the 'nter' and 'cter' already have enough information to not need the resid or sane resname.
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.
weirdly, adding those resids seemed to be what fixed the tests before, but I just tried again with them removed and it looks like it works without? I think we thought it was overwriting the whole dictionary now, and that's why they were needed. Not sure what's happened there.
This looks good to me! |
Addresses #553