-
Notifications
You must be signed in to change notification settings - Fork 66
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 option to skip binding a field #257
Conversation
This commit is based on a larger commit by @charbeljc in #160 but manually cherry-picking just the "-field" feature.
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.
Thank you for implementing this @jlblancoc , - looks very useful! I adding minor comment on current code but otherwise it looks good and i will be happy to merge it. However, it would be great if we can also add minimal test for this functionality. Would you be interested in doing it? If yes please see https://github.com/RosettaCommons/binder/tree/master/test and particularly check tests with custom config files like https://github.com/RosettaCommons/binder/blob/master/test/T80.custom_trampoline.config. If that is too much then we can merge this as-is (after addressing comment below). Thanks,
source/config.cpp
Outdated
bool Config::is_field_skipping_requested(string const &field_) const | ||
{ | ||
string field {field_}; | ||
field.erase(std::remove(field.begin(), field.end(), ' '), field.end()); |
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.
Are you sure this is needed? At line 214 https://github.com/RosettaCommons/binder/pull/257/files#diff-72f8d59ab463236c54ef8c3a2c8fb31c72efad5003751b3e342c868079de19baR214 we added fields name without namespaces so it looks like it this line will not do anything. I am brining this up due to performance consideration: in large projects this check might be called numerous times.
Sure! One doubt: what version of clang-format are you using to format the files? I tried clang-format-11 and clang-format-15 and both changes much more than just my changes... |
@jlblancoc re clang-format version: unless i am mistaken it was v13 |
Hi @lyskov ! It's done now:
There are other weird things I noticed in the way, but kept changes minimal in this PR anyway, please check them for subsequent commits?:
That said... congrats for the huge project, it literally made my life easier :-) |
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.
LGTM!
Thank you for your feedback and for adding test for this @jlblancoc !
-- yes, thank you for brining this up! I am aware of this and will escalate update to Python-3.
-- thank you for letting me know! Looks like quite a few changes got accumulated since last clang format run, - i will looks this up.
-- cmake tests does not compare test results (only makes sure that results is compilable) and they also require system-wide install of LLVM which is not always practical during development. Again, thank you for your PR and feedback @jlblancoc ! I will merge this shortly. |
Got it. Thanks you! |
This commit is based on a larger commit by @charbeljc in #160 but manually cherry-picking just the "-field" feature.