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
find_data in lark #341
find_data in lark #341
Conversation
self.ast.find_data('atom') destroys the original order of atoms in a SMARTSGraph. Since later on, the first atom is used for atom-typing, it causes an error. This keeps the order: [x for x in self.ast.iter_subtrees_topdown() if x.data == 'atom']
Codecov Report
@@ Coverage Diff @@
## master #341 +/- ##
=======================================
Coverage 84.55% 84.55%
=======================================
Files 14 14
Lines 1282 1282
=======================================
Hits 1084 1084
Misses 198 198 |
Nice fix! Can you also unpin the |
@daico007 I'm a bit new to github. Is this what you mean: |
@violet101 Yes, that's what I meant. |
@daico007 Done. Thanks. |
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 @violet101 for your contribution! I was stumped on this issue and I really appreciate you figuring it out!
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 contribution!
Thank you for this helpful fix @violet101 ! I noticed that the pull request was based off of your The way we prevent those issues for our codebases here is through the fork and pull request model You have already done part of that, by forking foyer, which is awesome! The other crucial piece for our pull requests are using feature branches to submit your changes We use the same remote names as defined in the first link:
If you have any issues setting this up, please reach out to any of us, we can be found at our Gitter channel: https://gitter.im/mosdef-hub/Lobby |
@rmatsum836 @daico007 I'm glad it helped :) @justinGilmer Thanks for the helpful tips. |
self.ast.find_data('atom') destroys the original order of atoms in a SMARTSGraph. Since later on, the first atom is used for atom-typing, it was causing an error. The following keeps the order:
[x for x in self.ast.iter_subtrees_topdown() if x.data == 'atom']
PR Summary:
PR Checklist