From b599a215bc55cb7586168762a40c0af681f65045 Mon Sep 17 00:00:00 2001 From: Martin Holmer Date: Fri, 17 Nov 2017 16:12:30 -0500 Subject: [PATCH 1/6] Fix logic of run_nth_year_gdp_elast_model tbi function --- taxcalc/tbi/tbi.py | 2 +- taxcalc/tests/test_tbi.py | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/taxcalc/tbi/tbi.py b/taxcalc/tbi/tbi.py index 419744113..173a7cdfc 100644 --- a/taxcalc/tbi/tbi.py +++ b/taxcalc/tbi/tbi.py @@ -177,7 +177,7 @@ def run_nth_year_gdp_elast_model(year_n, start_year, # calculate gdp_effect fyear = check_years_return_first_year(year_n, start_year, use_puf_not_cps) - if (start_year + year_n) > fyear: + if year_n > 0 and (start_year + year_n) > fyear: # create calc1 and calc2 calculated for year_n - 1 (calc1, calc2, _) = calculate((year_n - 1), start_year, use_puf_not_cps, diff --git a/taxcalc/tests/test_tbi.py b/taxcalc/tests/test_tbi.py index c4930a359..78f6ded1c 100644 --- a/taxcalc/tests/test_tbi.py +++ b/taxcalc/tests/test_tbi.py @@ -126,7 +126,19 @@ def test_run_gdp_elast_model_1(resdict): def test_run_gdp_elast_model_2(): usermods = USER_MODS usermods['behavior'] = dict() - res = run_nth_year_gdp_elast_model(0, 2014, # forces no automatic zero + res = run_nth_year_gdp_elast_model(0, 2014, # forces automatic zero + use_puf_not_cps=False, + use_full_sample=False, + user_mods=usermods, + gdp_elasticity=0.36, + return_dict=False) + assert res == 0.0 + + +def test_run_gdp_qelast_model_3(): + usermods = USER_MODS + usermods['behavior'] = dict() + res = run_nth_year_gdp_elast_model(0, 2017, # forces automatic zero use_puf_not_cps=False, use_full_sample=False, user_mods=usermods, From 2eaa128bbefc50ac141cc6ba0b212c5c532cfcdb Mon Sep 17 00:00:00 2001 From: Martin Holmer Date: Fri, 17 Nov 2017 17:31:47 -0500 Subject: [PATCH 2/6] Update RELEASES.md info --- RELEASES.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index fd2ea9e3d..83623c814 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4,6 +4,34 @@ Go [here](https://github.com/open-source-economics/Tax-Calculator/pulls?q=is%3Ap for a complete commit history. +2017-11-?? Release 0.13.2 +------------------------- +(last merged pull request is +[#xxxx](https://github.com/open-source-economics/Tax-Calculator/pull/xxxx)) + +**API Changes** +- None + +**New Features** +- Add TCJA_House_Amended JSON policy reform file + [[#1664](https://github.com/open-source-economics/Tax-Calculator/pull/1664) + by Cody Kallen and Matt Jensen] +- Add `_cpi_offset` policy parameter that can be used to specify chained CPI indexing reforms + [[#1667](https://github.com/open-source-economics/Tax-Calculator/pull/1667) + by Martin Holmer] + +**Bug Fixes** +- Fix `_ACTC_ChildNum` policy parameter documentation and logic + [[#1666](https://github.com/open-source-economics/Tax-Calculator/pull/1666) + by Martin Holmer, reported by Ernie Tedeschi] +- Fix documentation for mis-named `n1821` input variable + [[#1672](https://github.com/open-source-economics/Tax-Calculator/pull/1672) + by Martin Holmer, reported by Max Ghenis] +- Fix logic of run_nth_year_gdp_elast_model function in the TaxBrainInterface + [[#1677](https://github.com/open-source-economics/Tax-Calculator/pull/1677) + by Martin Holmer, reported by Hank Doupe] + + 2017-11-10 Release 0.13.1 ------------------------- (last merged pull request is From 94c7dbe39df9e7da60933713a68072fbdb870c2b Mon Sep 17 00:00:00 2001 From: Martin Holmer Date: Fri, 17 Nov 2017 18:11:46 -0500 Subject: [PATCH 3/6] Update RELEASES.md info --- RELEASES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 83623c814..ac89d0e59 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -19,6 +19,12 @@ for a complete commit history. - Add `_cpi_offset` policy parameter that can be used to specify chained CPI indexing reforms [[#1667](https://github.com/open-source-economics/Tax-Calculator/pull/1667) by Martin Holmer] +- Add new policy parameter that changes the stacking order of child/dependent credits + [[#1676](https://github.com/open-source-economics/Tax-Calculator/pull/1676) + by Matt Jensen as suggested by Cody Kallen] +- Add TCJA_Senate_Chairman_Modified_Mark JSON policy reform file + [[#1678](https://github.com/open-source-economics/Tax-Calculator/pull/1678) + by Cody Kallen and Sean Wang] **Bug Fixes** - Fix `_ACTC_ChildNum` policy parameter documentation and logic From 003f01075eb31639ddeda0a4fe7f50f7979908c5 Mon Sep 17 00:00:00 2001 From: Martin Holmer Date: Fri, 17 Nov 2017 18:54:01 -0500 Subject: [PATCH 4/6] Finalize RELEASE.md info for 0.13.2 --- RELEASES.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index ac89d0e59..bf4521be4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4,10 +4,10 @@ Go [here](https://github.com/open-source-economics/Tax-Calculator/pulls?q=is%3Ap for a complete commit history. -2017-11-?? Release 0.13.2 +2017-11-17 Release 0.13.2 ------------------------- (last merged pull request is -[#xxxx](https://github.com/open-source-economics/Tax-Calculator/pull/xxxx)) +[#1677](https://github.com/open-source-economics/Tax-Calculator/pull/1677)) **API Changes** - None @@ -22,9 +22,6 @@ for a complete commit history. - Add new policy parameter that changes the stacking order of child/dependent credits [[#1676](https://github.com/open-source-economics/Tax-Calculator/pull/1676) by Matt Jensen as suggested by Cody Kallen] -- Add TCJA_Senate_Chairman_Modified_Mark JSON policy reform file - [[#1678](https://github.com/open-source-economics/Tax-Calculator/pull/1678) - by Cody Kallen and Sean Wang] **Bug Fixes** - Fix `_ACTC_ChildNum` policy parameter documentation and logic From 8d7fbb2ad842392d182bc7b1131ed958709b15de Mon Sep 17 00:00:00 2001 From: Martin Holmer Date: Fri, 17 Nov 2017 19:02:21 -0500 Subject: [PATCH 5/6] Update again RELEASE.md info --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index bf4521be4..ba4fda298 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -21,7 +21,7 @@ for a complete commit history. by Martin Holmer] - Add new policy parameter that changes the stacking order of child/dependent credits [[#1676](https://github.com/open-source-economics/Tax-Calculator/pull/1676) - by Matt Jensen as suggested by Cody Kallen] + by Matt Jensen as suggested by Cody Kallen with need identified by Joint Economic Committee staff] **Bug Fixes** - Fix `_ACTC_ChildNum` policy parameter documentation and logic From bdd08c79ec2c4759668994e08abf3173cbe8e47e Mon Sep 17 00:00:00 2001 From: Martin Holmer Date: Fri, 17 Nov 2017 19:20:53 -0500 Subject: [PATCH 6/6] Update again the RELEASES.md info --- RELEASES.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index ba4fda298..78473a543 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -7,7 +7,7 @@ for a complete commit history. 2017-11-17 Release 0.13.2 ------------------------- (last merged pull request is -[#1677](https://github.com/open-source-economics/Tax-Calculator/pull/1677)) +[#1680](https://github.com/open-source-economics/Tax-Calculator/pull/1680)) **API Changes** - None @@ -22,6 +22,9 @@ for a complete commit history. - Add new policy parameter that changes the stacking order of child/dependent credits [[#1676](https://github.com/open-source-economics/Tax-Calculator/pull/1676) by Matt Jensen as suggested by Cody Kallen with need identified by Joint Economic Committee staff] +- Add to several TCJA reform files the provision for chained CPI indexing + [[#1680](https://github.com/open-source-economics/Tax-Calculator/pull/1680) + by Matt Jensen] **Bug Fixes** - Fix `_ACTC_ChildNum` policy parameter documentation and logic