Suggestions for your universalDatabase pull request 195#1
Closed
rwest wants to merge 5 commits into
Closed
Conversation
…t file. Less code, hopefully easier to understand.
With this commit, the recommended.py file in
RMG-database/input/kinetics/families/recommended.py
should just contain a dictionary, not a function call
recommendedFamilies = {
'1,2-Birad_to_alkene': True,
'1,2_Insertion': False,
}
I'll make a corresponding commit in the RMG-database project.
Other changes:
Reduced code duplication, tidied up comments, and added more
sanity checks on input, eg. we check that the list is all
true or all false, not a mix, and we check that all the requested
families can be found in the database (before we just silently skipped them)
and check that all families in the database are listed in the recommended.py
file as either True or False (in case we forget to add them).
This is a small change, but it changes the indentation of a huge block of code so looks like a big one.
The loading of the recommendation list has been moved to its own method because it was getting complicated, and we want to be able to store this more permanently, even if we aren't going to use it. This will allow us to interrogate it, and, for example, to export the Java-style database with it. (is this still going to be neccessarry?)
Now that we have this data to hand, we may as well preserve it and pass it along.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I got carried away with suggestions, and ended up changing so much that my code review needs reviewing itself! sigh