Raise warning not error on schema version mismatch - #718
Conversation
|
@chidauri would you be willing to modify the tests to check that the warning is raised? Here's an example of how we check for a warning in a different test: |
Codecov Report
@@ Coverage Diff @@
## master #718 +/- ##
==========================================
+ Coverage 97.64% 97.64% +<.01%
==========================================
Files 118 118
Lines 10247 10249 +2
==========================================
+ Hits 10006 10008 +2
Misses 241 241
Continue to review full report at Codecov.
|
|
@rwedge python2.7 test is failing, i am not sure how is that related to my change? and how to format changelog.rst? Thanks. |
| * Fixed entity set deserialization (:pr:`720`) | ||
| * Added error message when DateTimeIndex is a variable but not set as the time_index (:pr:`723`) | ||
| * Changes | ||
| * Raise warning and not error on schema version mismatch (:pr: `718`) |
There was a problem hiding this comment.
Remove the space between ":pr:" and "718"
| break | ||
| elif c_num < s_num: | ||
| raise RuntimeError(error_text_upgrade) | ||
| warnings.warn(error_text_upgrade) |
There was a problem hiding this comment.
We should add a break after this warning so that we do not continue to iterate after the warning
|
Also, let's rephrase these warnings. Let's remove the "unable to load" sentence from both warnings and add "Attempting to load . . ." at the end of each warning. |
|
@chidauri the python2.7 failure was unrelated. I re-triggered the tests and it passed the second time. |
|
@rwedge is it ok now? |
|
@chidauri looks good! I went ahead and changed the |
Pull Request Description
Fixes #698 .
After creating the pull request: in order to pass the changelog_updated check you will need to update the "Future Release" section of
docs/source/changelog.rstto include this pull request.