Bugfix in check_inputs - #846
Open
elenya-grant wants to merge 6 commits into
Open
Conversation
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.
Bugfix in
check_inputsThis was inspired by Issue #845. While resolving the error message, I wanted to make sure that all error messages were being properly tested in
h2integrate/core/test/test_utilities.py::test_check_inputs. I temporarily modified the error messages being thrown incheck_inputsto have numbers at the start (to see if they were being tested) and the tests still passed (which they shouldn't have - because I changed the error string). So - I realized that the assert statement paired with thepytest.raisescommand were indented one too many times and that the tests were not actually being ran. Anyway - I made it so that the tests do run (they all failed initially because of small differences in the error message strings).I'm going to delete the test
test_check_inputs_example01that I added - since nowtest_check_inputsis actually working. I also fixed the error message described in Issue #845 so that it works properly.Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
test_check_inputs_example01andh2integrate/core/test/inputs/buggy_battery_v0.yamlType of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
Other feedback:
Should the
msgincheck_inputsbe added onto and have an error thrown at the end of the method or just have tests be raised immediately when the situation arises? (see my comment on Issue #845 for more info)Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Section 4: Related Issues
Intended to resolve #845
Section 5: Impacted Areas of the Software
Section 5.1: New Files
N/A
Section 5.2: Modified Files
check_inputs: fixed error messageh2integrate/core/test/test_utilities.py::test_check_inputs: fixed testsSection 6: Additional Supporting Information
Section 7: Test Results, if applicable