Closed rwest closed 6 days ago
WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. ⚠️ One or more regression tests failed. Please download the failed results and run the tests locally or check the log to see why.
beep boop this comment was written by a bot :robot:
Motivation or Problem
Pull request https://github.com/ReactionMechanismGenerator/RMG-Py/pull/1961 introduced the ability to draw hydrogen bonds.
To do so, Hydrogen atoms that have H bonds shouldn't be removed from the drawings. This check was removed without explanation in ec9515351ea9964a5a8499c1f4066378544eca41 which was designed to make drawing work for fragments. That broke drawing of hydrogen bonds. The unit test for drawing hydrogen bonds exists, but just checks that a PDF is made, not what it looks like. So the regression was not detected.
Description of Changes
This restores the check that H atoms in H-bonds are not removed from drawings. It also removes code duplication that was introduced in #1961 through erroneous rebasing, that @bjkreitz noticed and removed in a different PR.
Testing
It was while testing the second commit (Bjarne's commit that removes the code duplication) that I found the title problem (the H bonds being broken). Now I've tested both, by running the original tests from #1961
Restoring the check makes the H bonds work. This particular molecule still looks ugly, as it always did. Removing the duplicate code doesn't make them worse.
Reviewer Tips
Not a big change, and not worth a lot of time.