PSLmodels / ParamTools

Library for parameter processing and validation with a focus on computational modeling projects
https://paramtools.dev
MIT License
19 stars 14 forks source link

Drop warnings for adjusting non-active values. #91

Closed hdoupe closed 4 years ago

hdoupe commented 4 years ago

ParamTools emits warnings if you adjust a parameter's value that is not active. That is, the value's label value is not in the set of values in the active state. This PR removes those warnings since this case is more normal than I thought:

In [1]: import taxcalc                                                                                                                                                                        

In [2]: pol = taxcalc.Policy()                                                                                                                                                                

In [3]: pol.adjust({"II_em": [{"year": 2017, "value": 2000}]})                                                                                                                                
/home/hankdoupe/miniconda3/envs/taxcalc-dev/lib/python3.8/site-packages/paramtools/parameters.py:207: UserWarning: II_em[year=2017] is not active in the current state: year= [2013].
  warnings.warn(msg)
Out[3]: OrderedDict([('II_em', [{'year': 2017, 'value': 2000.0}])])

In [4]: