From 05eb747c8e7f60302d80ebb2c98c76a1bb66c819 Mon Sep 17 00:00:00 2001 From: hdoupe Date: Fri, 4 Jan 2019 14:58:30 -0500 Subject: [PATCH 1/7] failed build --- conda-requirements.txt | 6 +++--- distributed/api/celery_tasks.py | 7 +++---- python_env_build.sh | 2 +- webapp/apps/btax/helpers.py | 5 ++--- webapp/apps/btax/views.py | 10 ++-------- webapp/apps/dynamic/compute.py | 3 +-- webapp/apps/dynamic/helpers.py | 12 +++--------- webapp/apps/dynamic/views.py | 9 +++------ webapp/apps/pages/views.py | 6 ++---- webapp/apps/taxbrain/behaviors.py | 8 ++++++-- webapp/apps/taxbrain/compute.py | 3 +-- webapp/apps/taxbrain/forms.py | 8 ++++---- webapp/apps/taxbrain/helpers.py | 10 +++++++--- webapp/apps/taxbrain/param_displayers.py | 6 ++++-- webapp/apps/taxbrain/views.py | 4 +--- 15 files changed, 43 insertions(+), 56 deletions(-) diff --git a/conda-requirements.txt b/conda-requirements.txt index 22788bbf..e5efd4d3 100644 --- a/conda-requirements.txt +++ b/conda-requirements.txt @@ -1,7 +1,7 @@ nomkl -taxcalc==0.22.2 -btax==0.2.2 -ogusa==0.5.11 +taxcalc==0.23.3 +btax==0.2.6 +ogusa==0.5.12 numba>=0.33.0 pandas>=0.22.0 pillow diff --git a/distributed/api/celery_tasks.py b/distributed/api/celery_tasks.py index 56abde16..42a4acdc 100644 --- a/distributed/api/celery_tasks.py +++ b/distributed/api/celery_tasks.py @@ -43,9 +43,8 @@ def dropq_task(year_n, user_mods, first_budget_year, use_puf_not_cps=True, ) # Add taxcalc version to results - vinfo = taxcalc._version.get_versions() - results['taxcalc_version'] = vinfo['version'] - results['dropq_version'] = vinfo['version'] + results['taxcalc_version'] = taxcalc.__version__ + results['dropq_version'] = taxcalc.__version__ json_res = json.dumps(results) return json_res @@ -118,7 +117,7 @@ def btax_async(user_mods, start_year): vinfo = taxcalc._version.get_versions() results['taxcalc_version'] = vinfo['version'] results['dropq_version'] = vinfo['version'] - binfo = btax._version.get_versions() + binfo = btax.__version__ results['btax_version'] = binfo['version'] json_res = json.dumps(results) return json_res diff --git a/python_env_build.sh b/python_env_build.sh index eb619dd9..cbc61086 100755 --- a/python_env_build.sh +++ b/python_env_build.sh @@ -6,7 +6,7 @@ echo 'activating env: pb_env' source activate pb_env echo 'installing conda packages' -conda install -c ospc -c defaults --file conda-requirements.txt --yes +conda install -c pslmodels -c defaults --file conda-requirements.txt --yes echo 'pip installing remaining requirements' diff --git a/webapp/apps/btax/helpers.py b/webapp/apps/btax/helpers.py index 76f6c1e5..550e64ff 100644 --- a/webapp/apps/btax/helpers.py +++ b/webapp/apps/btax/helpers.py @@ -34,13 +34,12 @@ 'btax_depr_7yr', 'btax_depr_10yr', 'btax_depr_15yr','btax_depr_20yr', 'btax_depr_25yr', 'btax_depr_27_5yr', 'btax_depr_39yr'] -BTAX_OTHER = ['btax_other_hair', 'btax_other_corpeq', +BTAX_OTHER = [ 'btax_other_hair_c', 'btax_other_hair_nc', 'btax_other_corpeq', 'btax_other_proptx','btax_other_invest'] BTAX_ECON = ['btax_econ_nomint', 'btax_econ_inflat',] -BTAX_VERSION_INFO = btax._version.get_versions() -BTAX_VERSION = BTAX_VERSION_INFO['version'] +BTAX_VERSION = btax.__version__ # diff --git a/webapp/apps/btax/views.py b/webapp/apps/btax/views.py index e5acb2a9..4f40467e 100644 --- a/webapp/apps/btax/views.py +++ b/webapp/apps/btax/views.py @@ -54,16 +54,10 @@ dropq_compute = DropqComputeBtax() -BTAX_VERSION_INFO = btax._version.get_versions() - -BTAX_VERSION = BTAX_VERSION_INFO['version'] +BTAX_VERSION = btax.__version__ WEBAPP_VERSION = settings.WEBAPP_VERSION - - -tcversion_info = taxcalc._version.get_versions() - -TAXCALC_VERSION = tcversion_info['version'] +TAXCALC_VERSION = taxcalc.__version__ JOB_PROC_TIME_IN_SECONDS = 30 diff --git a/webapp/apps/dynamic/compute.py b/webapp/apps/dynamic/compute.py index bffa0ff1..df396bdc 100644 --- a/webapp/apps/dynamic/compute.py +++ b/webapp/apps/dynamic/compute.py @@ -10,8 +10,7 @@ from .helpers import filter_ogusa_only from ..constants import START_YEAR -dqversion_info = taxcalc._version.get_versions() -dropq_version = dqversion_info['version'] +dropq_version = taxcalc.__version__ NUM_BUDGET_YEARS = int(os.environ.get('NUM_BUDGET_YEARS', 10)) #Hard fail on lack of dropq workers dropq_workers = os.environ.get('DROPQ_WORKERS', '') diff --git a/webapp/apps/dynamic/helpers.py b/webapp/apps/dynamic/helpers.py index cfadbfca..11d0a427 100644 --- a/webapp/apps/dynamic/helpers.py +++ b/webapp/apps/dynamic/helpers.py @@ -96,15 +96,9 @@ def normalize(x): # import taxcalc -tcversion_info = taxcalc._version.get_versions() -#ogversion_info = {u'full-revisionid': u'9ae018afc6c80b10fc19684d7ba9aa1729aa2f47', - #u'dirty': False, u'version': u'0.1.1', u'error': None} - -version_path = os.path.join(os.path.split(__file__)[0], "ogusa_version.json") -with open(version_path, "r") as f: - ogversion_info = json.load(f) -ogusa_version = ".".join([ogversion_info['version'], - ogversion_info['full-revisionid'][:6]]) +import ogusa +tcversion_info = taxcalc.__version__ +ogusa_version = ogusa.__version__ NUM_BUDGET_YEARS = int(os.environ.get('NUM_BUDGET_YEARS', 10)) diff --git a/webapp/apps/dynamic/views.py b/webapp/apps/dynamic/views.py index b289be24..3c9230eb 100644 --- a/webapp/apps/dynamic/views.py +++ b/webapp/apps/dynamic/views.py @@ -64,14 +64,11 @@ from ..formatters import format_dynamic_params, get_version -tcversion_info = taxcalc._version.get_versions() -TAXCALC_VERSION = tcversion_info['version'] +TAXCALC_VERSION = taxcalc.__version__ # TODO: use import ogusa; ogusa.__version__ -version_path = os.path.join(os.path.split(__file__)[0], "ogusa_version.json") -with open(version_path, "r") as f: - ogversion_info = json.load(f) -OGUSA_VERSION = ogversion_info['version'] +import ogusa +OGUSA_VERSION = ogusa.__version__ from django.conf import settings WEBAPP_VERSION = settings.WEBAPP_VERSION diff --git a/webapp/apps/pages/views.py b/webapp/apps/pages/views.py index 388d495a..194e48ac 100644 --- a/webapp/apps/pages/views.py +++ b/webapp/apps/pages/views.py @@ -15,10 +15,8 @@ import btax import taxcalc -BTAX_VERSION_INFO = btax._version.get_versions() -TAXCALC_VERSION_INFO = taxcalc._version.get_versions() -BTAX_VERSION = BTAX_VERSION_INFO['version'] -TAXCALC_VERSION = TAXCALC_VERSION_INFO['version'] +BTAX_VERSION = btax.__version__ +TAXCALC_VERSION = taxcalc.__version__ BLOG_URL = os.environ.get('BLOG_URL', 'www.ospc.org') EMAIL_DEFAULT = '1' diff --git a/webapp/apps/taxbrain/behaviors.py b/webapp/apps/taxbrain/behaviors.py index 7b34faf6..0ff4174a 100644 --- a/webapp/apps/taxbrain/behaviors.py +++ b/webapp/apps/taxbrain/behaviors.py @@ -65,8 +65,12 @@ def set_fields(self, upstream_obj, nonparam_fields=None): 3. Do more specific type checking--in particular, check if field is the type that Tax-Calculator expects from this param """ - default_data = upstream_obj.default_data(start_year=self.start_year, - metadata=True) + if isinstance(upstream_obj, taxcalc.Policy): + pol = taxcalc.Policy() + pol.set_year(start_year) + default_data = pol.metadata() + else: #isinstance(upstream_obj, taxcalc.Behavior): + default_data = taxcalc.Behavior()._vals if self.raw_input_fields is None: self.raw_input_fields = {} diff --git a/webapp/apps/taxbrain/compute.py b/webapp/apps/taxbrain/compute.py index 85430a0a..897da48f 100644 --- a/webapp/apps/taxbrain/compute.py +++ b/webapp/apps/taxbrain/compute.py @@ -11,8 +11,7 @@ import requests_mock requests_mock.Mocker.TEST_PREFIX = 'dropq' -dqversion_info = taxcalc._version.get_versions() -dropq_version = dqversion_info['version'] +dropq_version = taxcalc.__version__ NUM_BUDGET_YEARS = int(os.environ.get('NUM_BUDGET_YEARS', 10)) NUM_BUDGET_YEARS_QUICK = int(os.environ.get('NUM_BUDGET_YEARS_QUICK', 1)) #Hard fail on lack of dropq workers diff --git a/webapp/apps/taxbrain/forms.py b/webapp/apps/taxbrain/forms.py index 108c9f78..e61b4f38 100644 --- a/webapp/apps/taxbrain/forms.py +++ b/webapp/apps/taxbrain/forms.py @@ -308,10 +308,10 @@ class Meta: fields = ['first_year', 'data_source', 'raw_input_fields', 'input_fields'] start_year = int(START_YEAR) - default_policy = taxcalc.Policy.default_data( - start_year=int(START_YEAR), - metadata=True - ) + pol = taxcalc.Policy() + pol.set_year(int(START_YEAR)) + default_policy = pol.metadata() + defaults_key = (start_year, True) if defaults_key not in TAXCALC_DEFAULTS: TAXCALC_DEFAULTS[defaults_key] = default_policy( diff --git a/webapp/apps/taxbrain/helpers.py b/webapp/apps/taxbrain/helpers.py index 05ef8bb6..b6125d98 100644 --- a/webapp/apps/taxbrain/helpers.py +++ b/webapp/apps/taxbrain/helpers.py @@ -171,7 +171,12 @@ def default_taxcalc_data(cls, start_year, metadata=False): ''' Call the default data function on the given class for the given start year with meatadata flag ''' - dd = cls.default_data(metadata=metadata, start_year=start_year) + if isinstance(cls, taxcalc.Policy): + pol = taxcalc.Policy() + pol.set_year(start_year) + dd = pol.metadata() + else: #isinstance(cls, taxcalc.Behavior): + dd = taxcalc.Behavior()._vals if metadata: for k in dd: dd[k]['value'] = round_gt_one_to_nearest_int(dd[k]['value']) @@ -184,8 +189,7 @@ def default_taxcalc_data(cls, start_year, metadata=False): # Prepare user params to send to DropQ/Taxcalc # -tcversion_info = taxcalc._version.get_versions() -taxcalc_version = tcversion_info['version'] +taxcalc_version = taxcalc.__version__ TAXCALC_COMING_SOON_FIELDS = [] diff --git a/webapp/apps/taxbrain/param_displayers.py b/webapp/apps/taxbrain/param_displayers.py index 9b5ed561..c5785e86 100644 --- a/webapp/apps/taxbrain/param_displayers.py +++ b/webapp/apps/taxbrain/param_displayers.py @@ -202,8 +202,10 @@ def nested_form_parameters(budget_year=2017, use_puf_not_cps=True, defaults=None): # defaults are None unless we are testing if defaults is None: - defaults = taxcalc.Policy.default_data(metadata=True, - start_year=budget_year) + pol = taxcalc.Policy() + pol.set_year(budget_year) + defaults = pol.metadata() + groups = parse_top_level(defaults) for x in groups: for y, z in x.items(): diff --git a/webapp/apps/taxbrain/views.py b/webapp/apps/taxbrain/views.py index 8c77de5e..8a619993 100644 --- a/webapp/apps/taxbrain/views.py +++ b/webapp/apps/taxbrain/views.py @@ -67,9 +67,7 @@ WEBAPP_VERSION = settings.WEBAPP_VERSION -tcversion_info = taxcalc._version.get_versions() - -TAXCALC_VERSION = tcversion_info['version'] +TAXCALC_VERSION = taxcalc.__version__ JOB_PROC_TIME_IN_SECONDS = 35 From b2a39f5877d43b4972c41a0f259ad585bdc90812 Mon Sep 17 00:00:00 2001 From: hdoupe Date: Thu, 10 Jan 2019 10:23:15 -0500 Subject: [PATCH 2/7] bump taxcalc to 0.24.0 --- conda-requirements.txt | 2 +- distributed/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conda-requirements.txt b/conda-requirements.txt index e5efd4d3..5c883f60 100644 --- a/conda-requirements.txt +++ b/conda-requirements.txt @@ -1,5 +1,5 @@ nomkl -taxcalc==0.23.3 +taxcalc==0.24 btax==0.2.6 ogusa==0.5.12 numba>=0.33.0 diff --git a/distributed/Dockerfile b/distributed/Dockerfile index 3f2ea844..11c56e5b 100644 --- a/distributed/Dockerfile +++ b/distributed/Dockerfile @@ -13,8 +13,8 @@ RUN conda config --add channels ospc RUN conda config --add channels ospc/label/dev RUN conda config --append channels conda-forge -RUN conda install python=3.6 numpy>=1.12.1 pandas>=0.23.0 taxcalc=0.22.2 \ - btax=0.2.2 ogusa=0.5.11 matplotlib>=3.0.1 numba six bokeh>=0.12.7 mock xlrd \ +RUN conda install python=3.6 numpy>=1.12.1 pandas>=0.23.0 taxcalc=0.24.0 \ + btax=0.2.6 matplotlib>=3.0.1 numba six bokeh>=0.12.7 mock xlrd \ sphinx nomkl RUN pip install -r requirements.txt From 806e7477f03e24e56ea0a62d88ee64ff37635049 Mon Sep 17 00:00:00 2001 From: hdoupe Date: Thu, 10 Jan 2019 11:09:09 -0500 Subject: [PATCH 3/7] Taxbrain tests pass --- webapp/apps/taxbrain/behaviors.py | 10 +++------- webapp/apps/taxbrain/forms.py | 8 ++++---- webapp/apps/taxbrain/helpers.py | 6 +++--- webapp/apps/taxbrain/tests/test_all.py | 7 +++++-- webapp/apps/taxbrain/tests/test_helpers.py | 4 +++- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/webapp/apps/taxbrain/behaviors.py b/webapp/apps/taxbrain/behaviors.py index 0ff4174a..503b7687 100644 --- a/webapp/apps/taxbrain/behaviors.py +++ b/webapp/apps/taxbrain/behaviors.py @@ -11,7 +11,8 @@ from distutils.version import LooseVersion from .helpers import (rename_keys, reorder_lists, PRE_TC_0130_RES_MAP, - REORDER_LT_TC_0130_DIFF_LIST, DIFF_TABLE_IDs) + REORDER_LT_TC_0130_DIFF_LIST, DIFF_TABLE_IDs, + default_taxcalc_data) from ..constants import TAXCALC_VERS_RESULTS_BACKWARDS_INCOMPATIBLE from . import param_formatters @@ -65,12 +66,7 @@ def set_fields(self, upstream_obj, nonparam_fields=None): 3. Do more specific type checking--in particular, check if field is the type that Tax-Calculator expects from this param """ - if isinstance(upstream_obj, taxcalc.Policy): - pol = taxcalc.Policy() - pol.set_year(start_year) - default_data = pol.metadata() - else: #isinstance(upstream_obj, taxcalc.Behavior): - default_data = taxcalc.Behavior()._vals + default_data = default_taxcalc_data(upstream_obj, self.start_year) if self.raw_input_fields is None: self.raw_input_fields = {} diff --git a/webapp/apps/taxbrain/forms.py b/webapp/apps/taxbrain/forms.py index e61b4f38..456ac29f 100644 --- a/webapp/apps/taxbrain/forms.py +++ b/webapp/apps/taxbrain/forms.py @@ -112,12 +112,12 @@ def add_errors_on_extra_inputs(self): "Extra input '{0}' not allowed".format(_input)) all_fields = self.cleaned_data['raw_input_fields'] - default_policy = getattr(self.Meta, 'default_policy', None) + default_policy_data = getattr(self.Meta, 'default_policy_data', None) allowed_fields = getattr(self.Meta, 'allowed_fields', None) for _field in all_fields: - if default_policy: + if default_policy_data: try: - get_default_policy_param(_field, default_policy) + get_default_policy_param(_field, default_policy_data) except ParameterLookUpException as exn: self.add_error(None, str(exn)) elif _field not in allowed_fields: @@ -310,7 +310,7 @@ class Meta: start_year = int(START_YEAR) pol = taxcalc.Policy() pol.set_year(int(START_YEAR)) - default_policy = pol.metadata() + default_policy_data = pol.metadata() defaults_key = (start_year, True) if defaults_key not in TAXCALC_DEFAULTS: diff --git a/webapp/apps/taxbrain/helpers.py b/webapp/apps/taxbrain/helpers.py index b6125d98..566cad5b 100644 --- a/webapp/apps/taxbrain/helpers.py +++ b/webapp/apps/taxbrain/helpers.py @@ -167,15 +167,15 @@ def round_gt_one(x): return rounded -def default_taxcalc_data(cls, start_year, metadata=False): +def default_taxcalc_data(cls, start_year, metadata=True): ''' Call the default data function on the given class for the given start year with meatadata flag ''' - if isinstance(cls, taxcalc.Policy): + if cls == taxcalc.Policy: pol = taxcalc.Policy() pol.set_year(start_year) dd = pol.metadata() - else: #isinstance(cls, taxcalc.Behavior): + else: #cls == taxcalc.Behavior): dd = taxcalc.Behavior()._vals if metadata: for k in dd: diff --git a/webapp/apps/taxbrain/tests/test_all.py b/webapp/apps/taxbrain/tests/test_all.py index d20ea88c..a9e2352b 100644 --- a/webapp/apps/taxbrain/tests/test_all.py +++ b/webapp/apps/taxbrain/tests/test_all.py @@ -216,8 +216,11 @@ def test_arrange_totals_by_row(self): def test_default_taxcalc_data(self): import math dd = default_taxcalc_data(taxcalc.policy.Policy, start_year=2017) - dd_raw = taxcalc.policy.Policy.default_data(start_year=2017) - dd_meta = default_taxcalc_data(taxcalc.policy.Policy, start_year=2017, metadata=True) + dd = {k: dd[k]['value'] for k in dd} + pol = taxcalc.Policy() + pol.set_year(2017) + dd_meta = pol.metadata() + dd_raw = {k: dd_meta[k]["value"] for k in dd_meta} floored_std_aged = list(map(math.floor, dd['_STD_Aged'][0])) assert dd['_STD_Aged'] == [floored_std_aged] assert dd_meta['_STD_Aged']['value'] == [floored_std_aged] diff --git a/webapp/apps/taxbrain/tests/test_helpers.py b/webapp/apps/taxbrain/tests/test_helpers.py index 06aacaec..7d42ff0b 100644 --- a/webapp/apps/taxbrain/tests/test_helpers.py +++ b/webapp/apps/taxbrain/tests/test_helpers.py @@ -207,7 +207,9 @@ def test_taxbrain_TaxCalcParam(): to make sure that the values are set correctly for display to the user. """ - dd = taxcalc.Policy.default_data(metadata=True, start_year=2017) + pol = taxcalc.Policy() + pol.set_year(2017) + dd = pol.metadata() for param_name in dd: tc_param = TaxCalcParam(param_name, dd[param_name], 2017) From 0c99124c3ba1c6a31e6de99381fa8c28a7ae0e3f Mon Sep 17 00:00:00 2001 From: hdoupe Date: Thu, 10 Jan 2019 11:11:29 -0500 Subject: [PATCH 4/7] Update default_params_Policy fixture with new tc api --- webapp/apps/test_assets/test_param_formatters.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/apps/test_assets/test_param_formatters.py b/webapp/apps/test_assets/test_param_formatters.py index eab5c616..f1bd11d2 100644 --- a/webapp/apps/test_assets/test_param_formatters.py +++ b/webapp/apps/test_assets/test_param_formatters.py @@ -22,8 +22,9 @@ @pytest.fixture def default_params_Policy(): - return taxcalc.Policy.default_data(start_year=START_YEAR, - metadata=True) + pol = taxcalc.Policy() + pol.set_year(2017) + return pol.metadata() ############################################################################### From e375e0178d437e87648b2f844dbd1b51f70e06c8 Mon Sep 17 00:00:00 2001 From: hdoupe Date: Fri, 11 Jan 2019 10:46:29 -0500 Subject: [PATCH 5/7] Updates to install requirements --- distributed/Dockerfile | 3 +-- distributed/requirements.txt | 1 + requirements.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distributed/Dockerfile b/distributed/Dockerfile index 11c56e5b..e710884c 100644 --- a/distributed/Dockerfile +++ b/distributed/Dockerfile @@ -9,8 +9,7 @@ COPY requirements.txt home/distributed WORKDIR /home/distributed RUN conda update conda -RUN conda config --add channels ospc -RUN conda config --add channels ospc/label/dev +RUN conda config --add channels pslmodels RUN conda config --append channels conda-forge RUN conda install python=3.6 numpy>=1.12.1 pandas>=0.23.0 taxcalc=0.24.0 \ diff --git a/distributed/requirements.txt b/distributed/requirements.txt index 88b6579b..8d04e5bf 100644 --- a/distributed/requirements.txt +++ b/distributed/requirements.txt @@ -6,3 +6,4 @@ celery requests-mock requests pytest +msgpack \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index d25c82f5..9ea8dea0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,3 +28,4 @@ python-dateutil toolz whitenoise msgpack +psycopg2-binary From 0c9691014f1254bf9474fc51d112e14501666b45 Mon Sep 17 00:00:00 2001 From: hdoupe Date: Fri, 11 Jan 2019 14:48:29 -0500 Subject: [PATCH 6/7] Bump to btax 0.2.8 --- conda-requirements.txt | 2 +- distributed/Dockerfile | 2 +- distributed/api/celery_tasks.py | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/conda-requirements.txt b/conda-requirements.txt index 5c883f60..9e0d438d 100644 --- a/conda-requirements.txt +++ b/conda-requirements.txt @@ -1,6 +1,6 @@ nomkl taxcalc==0.24 -btax==0.2.6 +btax==0.2.8 ogusa==0.5.12 numba>=0.33.0 pandas>=0.22.0 diff --git a/distributed/Dockerfile b/distributed/Dockerfile index e710884c..e0976fd7 100644 --- a/distributed/Dockerfile +++ b/distributed/Dockerfile @@ -13,7 +13,7 @@ RUN conda config --add channels pslmodels RUN conda config --append channels conda-forge RUN conda install python=3.6 numpy>=1.12.1 pandas>=0.23.0 taxcalc=0.24.0 \ - btax=0.2.6 matplotlib>=3.0.1 numba six bokeh>=0.12.7 mock xlrd \ + btax=0.2.8 matplotlib>=3.0.1 numba six bokeh>=0.12.7 mock xlrd \ sphinx nomkl RUN pip install -r requirements.txt diff --git a/distributed/api/celery_tasks.py b/distributed/api/celery_tasks.py index 42a4acdc..accd1099 100644 --- a/distributed/api/celery_tasks.py +++ b/distributed/api/celery_tasks.py @@ -104,7 +104,7 @@ def btax_async(user_mods, start_year): user_mods['start_year'] = start_year print("submitting btax data: ", user_mods) results = {} - tables = json.loads(runner_json_tables(**user_mods)) + tables = json.loads(runner_json_tables(test_run=False, **user_mods)) if tables.get("json_table"): results.update(tables["json_table"]) if tables.get("dataframes"): @@ -114,10 +114,8 @@ def btax_async(user_mods, start_year): results["dataframes"] = dataframes else: results.update(tables) - vinfo = taxcalc._version.get_versions() - results['taxcalc_version'] = vinfo['version'] - results['dropq_version'] = vinfo['version'] - binfo = btax.__version__ - results['btax_version'] = binfo['version'] + results['taxcalc_version'] = taxcalc.__version__ + results['dropq_version'] = taxcalc.__version__ + results['btax_version'] = btax.__version__ json_res = json.dumps(results) return json_res From 540aea50918088bf6314d880eff2ad5b3d152b7e Mon Sep 17 00:00:00 2001 From: hdoupe Date: Fri, 11 Jan 2019 15:06:01 -0500 Subject: [PATCH 7/7] Update RELEASES and bump pb version --- RELEASES.md | 12 ++++++++++++ webapp/settings.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 28340a80..b6704e07 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4,6 +4,18 @@ Go [here](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pulls?q=is%3Apr+is%3Aclosed) for a complete commit history. +Release 1.7.7 on 2019-01-14 +---------------------------- +**Major Changes** +- None + +**Minor Changes** +- [#950](https://github.com/ospc-org/ospc.org/pull/950) - Update Tax-Calculator and B-Tax - Hank Doupe + +**Bug Fixes** +- None + + Release 1.7.6 on 2018-11-09 ---------------------------- **Major Changes** diff --git a/webapp/settings.py b/webapp/settings.py index e5255dcb..ba694e62 100644 --- a/webapp/settings.py +++ b/webapp/settings.py @@ -58,7 +58,7 @@ ] -WEBAPP_VERSION = "1.7.6" +WEBAPP_VERSION = "1.7.7" # Application definition