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
Patch/20170504 #317
Patch/20170504 #317
Conversation
Or rename to 2,5-dimethylpyrrole
It may return null not throw exception.
Or delete the check.
I should not throw NoSuchElementException.
Dear Kazuya, first, welcome! Oh, wow! Wonderful! There are some patches that should be applied with high priority, but it also has patches I need to look more close too. @kazuyaujihara, a general would be for me to ask if you could indicate (where needed, and some patches are evident), what is being fixed? For example, what problem is fixed by commit c004679 . Also, we have as preference to have unit tests that first demonstrate the problem, e.g. because the existing code calculates the wrong answer. That makes it easier for the reviewer to verify the code, as we do no always manage to get the original author to look at the patch. @johnmay, @kazuyaujihara, may I suggest we cherry-pick the easy ones (e.g. the one about the readers), and then we can review the remaining patches in more detail? E.g. I think these patches are good to go: And these ones probably too: @johnmay, what do you think? Shall I cherry-pick these, and so that this PR can then be rebased? |
Dear Egon, thank you for accepting me.
Because these patches are logically found on my way to port CDK to C#, I do
not have any unit tests yet. So I will explain each of them tentatively.
f335355
<f335355>
---
The file name is 2,5-diMe-furan but the content is 2,5-diMe-pyrrole. Either
of two should be corrected.
fe2e31f
<fe2e31f>
---
There are the resemble codes in Rearrangement...Reaction classes, but only
RearrangementRadicalReaction class is different. Need a unit test.
5de731a
<5de731a>
--- Because IsotopePatternRule.setParameters(Object[] params) accepts
List<double[]>
as params[0], getParameters()[0] is expected to return List<double[]>.
d6ca462
<d6ca462>,
0c0bb18
<0c0bb18>,
a22d04f
<a22d04f>,
a3af9ce
<a3af9ce>
--- Apparently,
they are typo or typical mistakes. Need unit tests.
5687f86
<5687f86>
--- This line never returns null and null is returned at last line on the
proper condition.
a66b51f
<a66b51f>
--- I believe logical And/Or should be used in this context.
d759659
<d759659>
--- I don't know there are other meaning or not.
c004679
<c004679>
--- I expect dblEqual(double v1, double v2) function is designed as nearly
equal function. But it does not work correctly when v1 or v2 are negative.
All current unit tests pass v1 == v2 to dblEqual. Need a unit test?
52a2279
<52a2279>
--- My image of NoSuchElementException class is not used on this context.
2017-05-05 15:30 GMT+09:00 Egon Willighagen <notifications@github.com>:
… Dear Kazuya, first, welcome!
Oh, wow! Wonderful! There are some patches that should be applied with
high priority, but it also has patches I need to look more close too.
@kazuyaujihara <https://github.com/kazuyaujihara>, a general would be for
me to ask if you could indicate (where needed, and some patches are
evident), *what* is being fixed? For example, what problem is fixed by
commit c004679
<c004679>
. Also, we have as preference to have unit tests that first demonstrate the
problem, e.g. because the existing code calculates the wrong answer. That
makes it easier for the reviewer to verify the code, as we do no always
manage to get the original author to look at the patch.
@johnmay <https://github.com/johnmay>, @kazuyaujihara
<https://github.com/kazuyaujihara>, may I suggest we cherry-pick the easy
ones (e.g. the one about the readers), and then we can review the remaining
patches in more detail?
E.g. I think these patches are good to go:
- dc3ee76
<dc3ee76>
- 50a6127
<50a6127>
- be89e66
<be89e66>
- 59054f1
<59054f1>
- e5df9ff
<e5df9ff>
And these ones probably too:
- bd67561
<bd67561>
- d6ca462
<d6ca462>
@johnmay <https://github.com/johnmay>, what do you think? Shall I
cherry-pick these, and so that this PR can then be rebased?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#317 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ARg5EI8FviL0kUfVCSweqULbhStPNxETks5r2sIcgaJpZM4NRckt>
.
|
@@ -1016,7 +1017,7 @@ private boolean isSingleHeteroAtom(IAtom atom, IAtomContainer container) { | |||
|
|||
} | |||
|
|||
private boolean isRingAtom(IAtom atom, IAtomContainer atomContainer, RingSearch searcher) { | |||
private boolean isRingAtom(IAtom atom, IAtomContainer atomContainer, RingSearch searcher) throws NoSuchAtomException { |
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.
Nope!!!! I'm actually about the change the API to try and make NoSuchAtom an unchecked exception but please watch out for breaking the API.
@@ -163,7 +163,7 @@ private void createPattern() { | |||
//cdk.bug 3515122 fixed | |||
atomTypePatterns.add(Pattern.compile("N-[1-3];[CHN]{1,3}.{1}+[A-Z]{0,3}+[,]?+=O[CNXO].*+")); | |||
//NC=0 amid | |||
atomTypePatterns.add(Pattern.compile("N-1-2];[CH]{1}+=S[(].*+")); | |||
atomTypePatterns.add(Pattern.compile("N-[1-2];[CH]{1}+=S[(].*+")); |
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.
Maybe... but this class should be deprecated and has been replaced by Mmff. If it's not deprecated I'll get on it.
Patches look great thanks for tracking them done. Yes please cherry pick @egonw - am okay with the ones you've selected so far. Others are also okay except for the NoSuchElementException (see comment), the cdk-reaction one's are tricky. |
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.
Ignore - approve
Ignore that approve... I though I could do it per commit. |
@egonw easier to list the ones that need more looking into: fe2e31f - cdk-reaction need in depth look Others that are okay and why |
Thanks again. I had a careful look at the ones I was unsure on and agree the patches are correct and merged all but the last one into master. I'll redo the NoSuchAtomException once #318 is applied (or feel free to do it yourself). Out of interest how did you find these errors, lots of them seem very specific? |
@johnmay |
Well thanks again, very nice finds, just reviewing the other pull request now. Did you use IKVM for C# or port the code? Might be something we can host. |
All codes are written in C#. The repository is the following. |
Miscellaneous patches.