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

Patch/20170504 #317

Closed
wants to merge 18 commits into from
Closed

Patch/20170504 #317

wants to merge 18 commits into from

Conversation

k-ujihara
Copy link
Contributor

Miscellaneous patches.

@egonw
Copy link
Member

egonw commented May 5, 2017

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?

@k-ujihara
Copy link
Contributor Author

k-ujihara commented May 5, 2017 via email

@@ -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 {
Copy link
Member

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[(].*+"));
Copy link
Member

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.

@johnmay
Copy link
Member

johnmay commented May 5, 2017

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.

johnmay
johnmay previously approved these changes May 5, 2017
Copy link
Member

@johnmay johnmay left a comment

Choose a reason for hiding this comment

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

Ignore - approve

@johnmay
Copy link
Member

johnmay commented May 5, 2017

Ignore that approve... I though I could do it per commit.

@johnmay
Copy link
Member

johnmay commented May 5, 2017

@egonw easier to list the ones that need more looking into:

fe2e31f - cdk-reaction need in depth look
a22d04f - cdk-reaction need in depth look
5de731a - okay to my eye by @egonw you'll no more.
c004679 - need to look closer, maybe check with Alex Clark
52a2279 - API Change, am considering fixing this ATM on my local branch (NoSuchAtom should be unchecked)

Others that are okay and why

@johnmay johnmay dismissed their stale review May 5, 2017 12:17

by accident

@johnmay
Copy link
Member

johnmay commented May 5, 2017

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 johnmay closed this May 5, 2017
@k-ujihara
Copy link
Contributor Author

@johnmay
I reviewed several classes to learn cdk and convert to C#. Few classes are refactored on C# code. Most of errors are found during it.
Thanks for a great library.

@johnmay
Copy link
Member

johnmay commented May 6, 2017

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.

@k-ujihara
Copy link
Contributor Author

All codes are written in C#. The repository is the following.
https://github.com/kazuyaujihara/NCDK
I am happy to host it on the cdk.

@k-ujihara k-ujihara deleted the patch/20170504 branch May 28, 2017 02:22
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.

None yet

3 participants