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
methods to manipulate atom types in ReactionManipulator #883
methods to manipulate atom types in ReactionManipulator #883
Conversation
uli-f
commented
Aug 26, 2022
- added methods to perceive and unset the atom type configurations in ReactionManipulator
- fixed a javadoc errors wrt content in AtomContainerManipulator#percieveAtomTypesAndConfigureUnsetProperties
… ReactionManipulator - fixed a javadoc errors wrt content in AtomContainerManipulator#percieveAtomTypesAndConfigureUnsetProperties
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.
Please add test methods for all new methods. And thanx for the extensive documentation!
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/AtomContainerManipulator.java
Show resolved
Hide resolved
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionManipulator.java
Show resolved
Hide resolved
I decided against adding tests as the methods merely combine two (already tested) method calls. There is not logic in those methods other than a for loop. I am happy to add tests if that is what you prefer (e.g., to achieve good test coverage numbers). |
Understood. But... we write unit tests as much as now as for the future. The implementation is now simple, but in the future may not. I found it much more beneficial for maintainability if all assumption are explicit. It fixed a lot of code in the 2003-2008 period, even the silliest unit tests. |
Okay, I see your point. |
- added null pointer checks for perceiveAtomTypesAndConfigureAtoms, perceiveAtomTypesAndConfigureUnsetProperties, and clearAtomConfigurations
Added tests now. |
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 adding the tests.
Looks fine, personally I don't think we use wildcard imports anywhere else mainly for convention. In the restricted case of
Although that would be pretty silly :-). |