-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix formula_parser and tests #1
Conversation
If it's convenient for you, could you please review my pull request?@lfoppiano |
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.
I think seems to be working fine. However, I'm not a chemist.
I wonder, could you please add some more examples as tests?
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.
I left some comments, I'm going to verify the rest of the json files in the next days
098288c
to
480f2c0
Compare
…r_dict is a reference variable.
…ression for parsing parentheses.
…s) tests to the test_parser script
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 the changes, I'm sorry I have still some questions.
…platform defaults to 'gbk (cp936)'.
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 your explanation and quick updates. We could add more unit tests in future.
To fix the tests, you should need to just add a |
Thanks! |
Thanks for your swift review and professional guidance. I am looking forward to making more contributions together in the future. |
The purpose of this pull request is twofold.
tests
files.formula_parser.py
in parsing chemical formulas, such as 'Na2/3Ni1/3Co(1/3-x)Mn1/3AlxO2'. To validate these improvements, a corresponding test case has been added toformulas.json
.