-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
user_mods dict is a later year then start year #330
Conversation
- An additional test that is relevant for a production case First, make a Records and Parameters object at a given year, then increment, then update with a user_mods dict at some future year.
this reveals a subtle bug in the |
TJ @talumbau said:
I do not understand why anybody would want to do the above. Why not simply implement the multi-year reform using Parameter class That is the idiom demonstrated in the test_multi_year_reform() |
As I mentioned before, in the |
We can certainly support multiple ways of specifying multi-year reforms, and in fact, it seems reasonable to discuss deprecating the current way that this is done. But, it happens to be the case that we currently don't do multi-year reforms in the way that is shown in test_multi_year_reform in #321. In particular, we make use of the style of a user_mods in the form `{N : {name: [sequence of values]} }, where the ith value (either scalar or array) is the reform value for year N + i. In addition, we support
where |
Back to the issue at hand, merging this is just an assertion of the behavior we depend on right now. Even if it is behavior that will go away, we can use this test (or its removal) to be explicit about that. Therefore, I would suggest merging. |
@talumbau, that makes sense to me as well. If we want this behavior to go away in the future, then we can remove the test. |
user_mods dict is a later year then start year
@talumbau, I found an issue with the test suite. When running any operation involving a line like this in this test (which appears if you try to run calc.diagnostic_table() for instance):
I get the error: ValueError: operands could not be broadcast together with shapes (8799,) (139651,) |
First, make a Records and Parameters object at a given year,
then increment, then update with a user_mods dict at some
future year.