taxcalc 4.2.2__tar.gz → 4.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. {taxcalc-4.2.2 → taxcalc-4.3.0}/.github/workflows/build_and_test.yml +1 -1
  2. {taxcalc-4.2.2 → taxcalc-4.3.0}/MANIFEST.in +0 -2
  3. {taxcalc-4.2.2 → taxcalc-4.3.0}/Makefile +3 -3
  4. {taxcalc-4.2.2 → taxcalc-4.3.0}/PKG-INFO +1 -1
  5. {taxcalc-4.2.2 → taxcalc-4.3.0}/codecov.yml +1 -0
  6. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/about/releases.md +25 -2
  7. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/contributing/RELEASING.md +10 -2
  8. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/index.md +1 -1
  9. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/usage/data.md +8 -5
  10. {taxcalc-4.2.2 → taxcalc-4.3.0}/extend_tcja.py +38 -15
  11. taxcalc-4.3.0/ppp.py +138 -0
  12. {taxcalc-4.2.2 → taxcalc-4.3.0}/pytest.ini +4 -4
  13. {taxcalc-4.2.2 → taxcalc-4.3.0}/setup.py +1 -1
  14. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/__init__.py +1 -1
  15. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/policy.py +1 -1
  16. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/policy_current_law.json +2611 -99
  17. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/records.py +20 -15
  18. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ext.json +20 -20
  19. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/taxcalcio.py +44 -22
  20. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/cpscsv_agg_expect.csv +18 -18
  21. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/puf_var_wght_means_by_year.csv +5 -5
  22. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/pufcsv_agg_expect.csv +19 -19
  23. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_policy.py +460 -478
  24. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_reforms.py +16 -15
  25. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc.egg-info/PKG-INFO +1 -1
  26. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc.egg-info/SOURCES.txt +0 -5
  27. taxcalc-4.2.2/ppp.py +0 -77
  28. taxcalc-4.2.2/taxcalc/reforms/rounding2022.json +0 -153
  29. taxcalc-4.2.2/taxcalc/reforms/rounding2022.out.csv +0 -10
  30. taxcalc-4.2.2/taxcalc/tests/test_tmdcsv.py +0 -38
  31. taxcalc-4.2.2/taxcalc/tmd_growfactors.csv +0 -55
  32. taxcalc-4.2.2/taxcalc/tmd_weights.csv.gz +0 -0
  33. {taxcalc-4.2.2 → taxcalc-4.3.0}/.coveragerc +0 -0
  34. {taxcalc-4.2.2 → taxcalc-4.3.0}/.github/FUNDING.yml +0 -0
  35. {taxcalc-4.2.2 → taxcalc-4.3.0}/.github/workflows/check_jupyterbook.yml +0 -0
  36. {taxcalc-4.2.2 → taxcalc-4.3.0}/.github/workflows/deploy_jupyterbook.yml +0 -0
  37. {taxcalc-4.2.2 → taxcalc-4.3.0}/.github/workflows/deploy_parameters_docs.yml +0 -0
  38. {taxcalc-4.2.2 → taxcalc-4.3.0}/.gitignore +0 -0
  39. {taxcalc-4.2.2 → taxcalc-4.3.0}/LICENSE +0 -0
  40. {taxcalc-4.2.2 → taxcalc-4.3.0}/PSL_catalog.json +0 -0
  41. {taxcalc-4.2.2 → taxcalc-4.3.0}/README.md +0 -0
  42. {taxcalc-4.2.2 → taxcalc-4.3.0}/conda.recipe/bld.bat +0 -0
  43. {taxcalc-4.2.2 → taxcalc-4.3.0}/conda.recipe/build.sh +0 -0
  44. {taxcalc-4.2.2 → taxcalc-4.3.0}/conda.recipe/meta.yaml +0 -0
  45. {taxcalc-4.2.2 → taxcalc-4.3.0}/csv_show.sh +0 -0
  46. {taxcalc-4.2.2 → taxcalc-4.3.0}/csv_vars.sh +0 -0
  47. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/PSL.svg +0 -0
  48. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/_config.yml +0 -0
  49. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/_static/atr.png +0 -0
  50. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/_static/mtr.png +0 -0
  51. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/_static/pch.png +0 -0
  52. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/_toc.yml +0 -0
  53. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/about/LICENSE.md +0 -0
  54. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/about/history.md +0 -0
  55. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/about/roadmap.md +0 -0
  56. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/calcfunctions.rst +0 -0
  57. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/calculator.rst +0 -0
  58. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/consumption.rst +0 -0
  59. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/data.rst +0 -0
  60. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/decorators.rst +0 -0
  61. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/growdiff.rst +0 -0
  62. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/growfactors.rst +0 -0
  63. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/parameters.rst +0 -0
  64. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/policy.rst +0 -0
  65. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/public_api.rst +0 -0
  66. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/records.rst +0 -0
  67. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/taxcalcio.rst +0 -0
  68. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/utils.rst +0 -0
  69. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/api/utilsprvt.rst +0 -0
  70. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/contributing/contributor_guide.md +0 -0
  71. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/contributing/dependencies.md +0 -0
  72. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/contributing/param_naming.md +0 -0
  73. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/contributing/pr_workflow.md +0 -0
  74. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/contributing/testing.md +0 -0
  75. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/README.md +0 -0
  76. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/assumption_params.md +0 -0
  77. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/cli.md +0 -0
  78. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/index.md +0 -0
  79. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/input_vars.md +0 -0
  80. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/make/make_io_vars.py +0 -0
  81. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/make/make_params.py +0 -0
  82. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/make/make_uguide.py +0 -0
  83. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/output_vars.md +0 -0
  84. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/policy_params.md +0 -0
  85. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/python_interface.md +0 -0
  86. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/templates/assumption_params_template.md +0 -0
  87. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/templates/input_vars_template.md +0 -0
  88. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/templates/output_vars_template.md +0 -0
  89. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/guide/templates/policy_params_template.md +0 -0
  90. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/README.md +0 -0
  91. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/_static/reformA.json +0 -0
  92. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/_static/reformB.json +0 -0
  93. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/_static/reformC.json +0 -0
  94. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/convert_all.sh +0 -0
  95. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/index.md +0 -0
  96. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe00.md +0 -0
  97. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe01.md +0 -0
  98. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe02.md +0 -0
  99. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe03.md +0 -0
  100. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe04.md +0 -0
  101. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe04_pandas.md +0 -0
  102. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe05.md +0 -0
  103. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/md_src/recipe06.md +0 -0
  104. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe00.ipynb +0 -0
  105. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe01.ipynb +0 -0
  106. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe02.ipynb +0 -0
  107. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe03.ipynb +0 -0
  108. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe04.ipynb +0 -0
  109. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe04_pandas.ipynb +0 -0
  110. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe05.ipynb +0 -0
  111. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/recipes/recipe06.ipynb +0 -0
  112. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/usage/overview.md +0 -0
  113. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/usage/starting.md +0 -0
  114. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/usage/tcja_after_2025.md +0 -0
  115. {taxcalc-4.2.2 → taxcalc-4.3.0}/docs/use_cases.md +0 -0
  116. {taxcalc-4.2.2 → taxcalc-4.3.0}/environment.yml +0 -0
  117. {taxcalc-4.2.2 → taxcalc-4.3.0}/gitpr +0 -0
  118. {taxcalc-4.2.2 → taxcalc-4.3.0}/gitpr.bat +0 -0
  119. {taxcalc-4.2.2 → taxcalc-4.3.0}/gitsync +0 -0
  120. {taxcalc-4.2.2 → taxcalc-4.3.0}/gitsync.bat +0 -0
  121. {taxcalc-4.2.2 → taxcalc-4.3.0}/setup.cfg +0 -0
  122. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/assumptions/ASSUMPTIONS.md +0 -0
  123. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/assumptions/README.md +0 -0
  124. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/assumptions/economic_assumptions_template.json +0 -0
  125. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/calcfunctions.py +0 -0
  126. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/calculator.py +0 -0
  127. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/cli/__init__.py +0 -0
  128. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/cli/tc.py +0 -0
  129. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/conftest.py +0 -0
  130. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/consumption.json +0 -0
  131. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/consumption.py +0 -0
  132. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/cps.csv.gz +0 -0
  133. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/cps_weights.csv.gz +0 -0
  134. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/data.py +0 -0
  135. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/decorators.py +0 -0
  136. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/growdiff.json +0 -0
  137. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/growdiff.py +0 -0
  138. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/growfactors.csv +0 -0
  139. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/growfactors.py +0 -0
  140. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/parameters.py +0 -0
  141. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/puf_ratios.csv +0 -0
  142. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/puf_weights.csv.gz +0 -0
  143. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/records_variables.json +0 -0
  144. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/2017_law.json +0 -0
  145. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/2017_law.out.csv +0 -0
  146. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ARPA.json +0 -0
  147. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ARPA.out.csv +0 -0
  148. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/BrownKhanna.json +0 -0
  149. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/BrownKhanna.out.csv +0 -0
  150. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/CARES.json +0 -0
  151. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/CARES.out.csv +0 -0
  152. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.json +0 -0
  153. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.out.csv +0 -0
  154. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Larson2019.json +0 -0
  155. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Larson2019.out.csv +0 -0
  156. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/README.md +0 -0
  157. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/REFORMS.md +0 -0
  158. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Renacci.json +0 -0
  159. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Renacci.out.csv +0 -0
  160. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/SandersDeFazio.json +0 -0
  161. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/SandersDeFazio.out.csv +0 -0
  162. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/TCJA.json +0 -0
  163. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/TCJA.md +0 -0
  164. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/TCJA.out.csv +0 -0
  165. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Trump2016.json +0 -0
  166. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Trump2016.out.csv +0 -0
  167. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Trump2017.json +0 -0
  168. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/Trump2017.out.csv +0 -0
  169. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/Clinton2016.json +0 -0
  170. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/RyanBrady.json +0 -0
  171. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/TCJA_House.json +0 -0
  172. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/TCJA_House_Amended.json +0 -0
  173. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/TCJA_Reconciliation.json +0 -0
  174. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/TCJA_Senate.json +0 -0
  175. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/TCJA_Senate_111417.json +0 -0
  176. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/archive/TCJA_Senate_120117.json +0 -0
  177. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/cases.csv +0 -0
  178. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/clp.out.csv +0 -0
  179. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/growfactors_ext.csv +0 -0
  180. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes0.json +0 -0
  181. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes0.out.csv +0 -0
  182. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes1.json +0 -0
  183. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes1.out.csv +0 -0
  184. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes2.json +0 -0
  185. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes2.out.csv +0 -0
  186. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes3.json +0 -0
  187. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/reforms/ptaxes3.out.csv +0 -0
  188. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/benefits_expect.csv +0 -0
  189. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/cmpi_cps_expect.txt +0 -0
  190. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/cmpi_puf_expect.txt +0 -0
  191. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/conftest.py +0 -0
  192. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/puf_var_correl_coeffs_2016.csv +0 -0
  193. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/pufcsv_mtr_expect.txt +0 -0
  194. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/reforms.json +0 -0
  195. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/reforms_expect.csv +0 -0
  196. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_4package.py +0 -0
  197. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_benefits.py +0 -0
  198. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_calcfunctions.py +0 -0
  199. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_calculator.py +0 -0
  200. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_compare.py +0 -0
  201. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_compatible_data.py +0 -0
  202. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_consumption.py +0 -0
  203. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_cpscsv.py +0 -0
  204. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_data.py +0 -0
  205. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_decorators.py +0 -0
  206. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_growdiff.py +0 -0
  207. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_growfactors.py +0 -0
  208. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_parameters.py +0 -0
  209. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_puf_var_stats.py +0 -0
  210. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_pufcsv.py +0 -0
  211. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_records.py +0 -0
  212. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_responses.py +0 -0
  213. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_taxcalcio.py +0 -0
  214. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/tests/test_utils.py +0 -0
  215. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/utils.py +0 -0
  216. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/utilsprvt.py +0 -0
  217. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/CSV_INPUT_VARS.md +0 -0
  218. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/CSV_OUTPUT_VARS.md +0 -0
  219. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/README.md +0 -0
  220. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/Differences_Explained.md +0 -0
  221. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/README.md +0 -0
  222. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/a17-taxdiffs-expect.csv +0 -0
  223. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/a18-taxdiffs-expect.csv +0 -0
  224. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/a19-taxdiffs-expect.csv +0 -0
  225. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/a20-taxdiffs-expect.csv +0 -0
  226. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/a21-taxdiffs-expect.csv +0 -0
  227. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/b17-taxdiffs-expect.csv +0 -0
  228. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/b18-taxdiffs-expect.csv +0 -0
  229. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/b19-taxdiffs-expect.csv +0 -0
  230. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/b20-taxdiffs-expect.csv +0 -0
  231. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/b21-taxdiffs-expect.csv +0 -0
  232. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/c17-taxdiffs-expect.csv +0 -0
  233. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/c18-taxdiffs-expect.csv +0 -0
  234. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/expected_differences/c19-taxdiffs-expect.csv +0 -0
  235. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/input_setup.py +0 -0
  236. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/main_comparison.py +0 -0
  237. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/prepare_taxcalc_input.py +0 -0
  238. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/process_taxcalc_output.py +0 -0
  239. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/taxsim_emulation.json +0 -0
  240. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/taxsim_input.py +0 -0
  241. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/tc_sims.py +0 -0
  242. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/taxsim35/tests_35.py +0 -0
  243. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc/validation/tests_35.sh +0 -0
  244. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc.egg-info/dependency_links.txt +0 -0
  245. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc.egg-info/entry_points.txt +0 -0
  246. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc.egg-info/requires.txt +0 -0
  247. {taxcalc-4.2.2 → taxcalc-4.3.0}/taxcalc.egg-info/top_level.txt +0 -0
  248. {taxcalc-4.2.2 → taxcalc-4.3.0}/tctest-nojit.sh +0 -0
@@ -34,7 +34,7 @@ jobs:
34
34
  shell: bash -l {0}
35
35
  working-directory: ./
36
36
  run: |
37
- pytest -m 'not requires_pufcsv and not requires_tmdcsv and not pre_release and not local' --cov=./ --cov-report=xml
37
+ pytest -m 'not requires_pufcsv and not pre_release and not local' --cov=./ --cov-report=xml
38
38
  - name: Upload coverage to Codecov
39
39
  if: matrix.os == 'ubuntu-latest' && contains(github.repository, 'PSLmodels/Tax-Calculator')
40
40
  uses: codecov/codecov-action@v4
@@ -7,5 +7,3 @@ include taxcalc/policy_current_law.json
7
7
  include taxcalc/puf_weights.csv.gz
8
8
  include taxcalc/puf_ratios.csv
9
9
  include taxcalc/records_variables.json
10
- include taxcalc/tmd_weights.csv.gz
11
- include taxcalc/tmd_growfactors.csv
@@ -13,7 +13,7 @@ help:
13
13
  @echo "clean : remove .pyc files and local taxcalc package"
14
14
  @echo "package : build and install local package"
15
15
  @echo "pytest-cps : generate report for and cleanup after"
16
- @echo " pytest -m 'not requires_pufcsv and not requires_tmdcsv and not pre_release'"
16
+ @echo " pytest -m 'not requires_pufcsv and not pre_release'"
17
17
  @echo "pytest : generate report for and cleanup after"
18
18
  @echo " pytest -m 'not pre_release'"
19
19
  @echo "pytest-all : generate report for and cleanup after"
@@ -51,7 +51,7 @@ endef
51
51
  .PHONY=pytest-cps
52
52
  pytest-cps:
53
53
  @$(pytest-setup)
54
- @cd taxcalc ; pytest -n4 --disable-warnings --durations=0 --durations-min=2 -m "not requires_pufcsv and not requires_tmdcsv and not pre_release"
54
+ @cd taxcalc ; pytest -n4 --disable-warnings --durations=0 --durations-min=2 -m "not requires_pufcsv and not pre_release"
55
55
  @$(pytest-cleanup)
56
56
 
57
57
  .PHONY=pytest
@@ -103,7 +103,7 @@ define coverage-cleanup
103
103
  rm -f .coverage htmlcov/*
104
104
  endef
105
105
 
106
- COVMARK = "not requires_pufcsv and not requires_tmdcsv and not pre_release"
106
+ COVMARK = "not requires_pufcsv and not pre_release"
107
107
 
108
108
  OS := $(shell uname -s)
109
109
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taxcalc
3
- Version: 4.2.2
3
+ Version: 4.3.0
4
4
  Summary: taxcalc
5
5
  Home-page: https://github.com/PSLmodels/Tax-Calculator
6
6
  Download-URL: https://github.com/PSLmodels/Tax-Calculator
@@ -21,5 +21,6 @@ comment:
21
21
 
22
22
  ignore:
23
23
  - "setup.py"
24
+ - "update_pcl.py"
24
25
  - "ppp.py"
25
26
  - "extend_tcja.py"
@@ -3,6 +3,29 @@ Release history
3
3
  Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclosed)
4
4
  for a complete commit history.
5
5
 
6
+
7
+ 2024-10-02 Release 4.3.0
8
+ ------------------------
9
+ (last merged pull request is
10
+ [#2819](https://github.com/PSLmodels/Tax-Calculator/pull/2819))
11
+
12
+ **This is an enhancement and bug-fix release.**
13
+
14
+ **API Changes**
15
+
16
+ **New Features**
17
+ - Add known values of inflation-indexed policy parameters for 2023 [[#2806](https://github.com/PSLmodels/Tax-Calculator/pull/2806) by Martin Holmer]
18
+ - Enhance `Records.tmd_constructor` static method [[#2809](https://github.com/PSLmodels/Tax-Calculator/pull/2809) by Martin Holmer]
19
+ - Remove TMD data files from Tax-Calculator repository [[#2810](https://github.com/PSLmodels/Tax-Calculator/pull/2810) by Martin Holmer]
20
+ - Add known values of inflation-indexed policy parameters for 2024 [[#2816](https://github.com/PSLmodels/Tax-Calculator/pull/2816) by Martin Holmer]
21
+ - Enhance `extend_tcja.py` and update `reforms/ext.json` [[#2817](https://github.com/PSLmodels/Tax-Calculator/pull/2817) by Martin Holmer]
22
+ - Enhance `ppp.py` script [[#2819](https://github.com/PSLmodels/Tax-Calculator/pull/2819) by Martin Holmer]
23
+
24
+ **Bug Fixes**
25
+ - Fix specification of domestic production deduction under TCJA [[#2807](https://github.com/PSLmodels/Tax-Calculator/pull/2807) by Martin Holmer]
26
+ - Fix `ALD_BusinessLosses_c` parameter values after 2025 [[#2818](https://github.com/PSLmodels/Tax-Calculator/pull/2818) by Martin Holmer]
27
+
28
+
6
29
  2024-09-14 Release 4.2.2
7
30
  ------------------------
8
31
  (last merged pull request is
@@ -14,14 +37,14 @@ for a complete commit history.
14
37
 
15
38
  **New Features**
16
39
  - Non-substantive, cosmetic changes to `policy_current_law.json` file [[#2791](https://github.com/PSLmodels/Tax-Calculator/pull/2791) by Martin Holmer]
17
- -Update `tmd_growfactors.csv` and `tmd_weights.csv.gz` files file [[#2797](https://github.com/PSLmodels/Tax-Calculator/pull/2797) by Martin Holmer]
18
-
40
+ - Update `tmd_growfactors.csv` and `tmd_weights.csv.gz` files [[#2797](https://github.com/PSLmodels/Tax-Calculator/pull/2797) by Martin Holmer]
19
41
 
20
42
  **Bug Fixes**
21
43
  - Add missing pre-2022 values for indexed policy parameters [[#2789](https://github.com/PSLmodels/Tax-Calculator/pull/2789) by Martin Holmer]
22
44
  - Fix education tax credit phase-out parameters [[#2790](https://github.com/PSLmodels/Tax-Calculator/pull/2790) by Martin Holmer]
23
45
  - Several PRs with updates for dependency versions and other minor changes by Martin Holmer and Jason DeBacker
24
46
 
47
+
25
48
  2024-07-30 Release 4.2.1
26
49
  ------------------------
27
50
  (last merged pull request is
@@ -1,10 +1,12 @@
1
1
  Releasing Tax-Caclculator Packages
2
2
  ==================================
3
3
 
4
- The following outlines the process to release Tax-Calculator Packages on Conda-Forge and creating a new branch to fix a bug in a previous release.
4
+ The following outlines the process to release Tax-Calculator Packages
5
+ on Conda-Forge and creating a new branch to fix a bug in a previous
6
+ release.
5
7
 
6
8
  Create new `taxcalc` packages
7
- ===========================
9
+ =============================
8
10
  ```
9
11
 
10
12
  --> on branch X-Y-Z, edit docs/about/releases.md to finalize X.Y.Z info
@@ -13,6 +15,12 @@ Create new `taxcalc` packages
13
15
 
14
16
  --> merge master branch into X-Y-Z branch
15
17
 
18
+ --> run `python update_pcl.py` [to update policy_current_law.json if needed]
19
+
20
+ --> run `python ppp.py` [to update policy_current_law.json if needed]
21
+
22
+ --> run `python extend_tcja.py > ext.json` [to update reforms/ext.json]
23
+
16
24
  --> run `make tctest-jit` [to make sure JIT decorators are not hiding bugs]
17
25
 
18
26
  --> run `make pytest-all` [or `pytest -m pre_release -n4` in taxcalc subdir]
@@ -57,7 +57,7 @@ The cross-model validation work with NBER's TAXSIM-27 model is described
57
57
 
58
58
  ## Latest release
59
59
 
60
- {doc}`4.2.2 (2024-09-14) <about/releases>`
60
+ {doc}`4.3.0 (2024-10-02) <about/releases>`
61
61
 
62
62
  If you are already using Tax-Calculator, upgrade using the following command:
63
63
 
@@ -61,13 +61,16 @@ file.
61
61
 
62
62
  The [tax-microdata
63
63
  repository](https://github.com/PSLmodels/tax-microdata-benchmarking)
64
- produces an input variables file (`tmd.csv`) and a
65
- `tmd_weights.csv.gz` file that is included in the Tax-Calculator
64
+ produces an input variables file (`tmd.csv`), a national weights file
65
+ (`tmd_weights.csv.gz`), and a variable growth factors file
66
+ (`tmd_growfactors.csv`) that can be used with the Tax-Calculator
66
67
  package beginning with the 3.6.0 release. The `tmd.csv` file is
67
68
  available only to Tax-Calculator users who have purchased their own
68
- version of the 2015 IRS-SOI PUF. For those users, the
69
- `Records.tmd_constructor()` method creates a `Records` class object
70
- containing the `tmd` variables and weights.
69
+ version of the 2015 IRS-SOI PUF. For those users, those three files
70
+ are avaiable from the tax-microdata repository. These three tmd files
71
+ can be used with the Tax-Calculator Python API (using the
72
+ `Records.tmd_constructor()` static method) or with the Tax-Calculator
73
+ CLI tool, `tc`.
71
74
 
72
75
  ## Using other data with Tax-Calculator
73
76
 
@@ -3,10 +3,15 @@ This script generates a JSON reform file, which could be called
3
3
  extend_tcja.json, that can serve as an alternative baseline to
4
4
  current-law policy (which ends TCJA temporary provisions after 2025).
5
5
 
6
- USAGE: (taxcalc-dev) ~% python extend_tcja.py
6
+ USAGE: (taxcalc-dev) Tax-Calculator% python extend_tcja.py > ext.json
7
+ THEN CHECK: % diff ext.json taxcalc/reforms/ext.json
8
+ IF DIFFS: % mv ext.json taxcalc/reforms/ext.json
7
9
 
8
- IMPORTANT NOTE: be sure to remove the trailing comma after the last item
9
- in the reform JSON object generated by this script.
10
+ WHEN TO USE: use this script to update reforms/ext.json in these situations:
11
+ (a) whenever inflation rates in the growfactors.csv files are changed
12
+ OR
13
+ (b) whenever inflation-indexed parameters are updated (usually as part
14
+ of changes that increase the value of Policy.LAST_KNOWN_YEAR).
10
15
  """
11
16
 
12
17
  import sys
@@ -76,7 +81,6 @@ TCJA_PARAMETERS = {
76
81
  "PT_qbid_alt_property_rt": {"indexed": False, "category": 7},
77
82
  # category 8 ...
78
83
  "ALD_BusinessLosses_c": {"indexed": True, "category": 8},
79
- "ALD_DomesticProduction_hc": {"indexed": False, "category": 8},
80
84
  }
81
85
 
82
86
 
@@ -84,10 +88,13 @@ def main():
84
88
  """
85
89
  High-level script logic.
86
90
  """
91
+ # identify last parameter name in TCJA_PARAMETERS
92
+ last_pname = list(TCJA_PARAMETERS.keys())[-1]
87
93
  # calculate 2025-to-2026 parameters indexing factor
88
94
  pol = taxcalc.Policy()
89
95
  pirates = pol.inflation_rates()
90
- ifactor = 1.0 + pirates[2025-taxcalc.Policy.JSON_START_YEAR]
96
+ ifactor25 = 1.0 + pirates[2025-taxcalc.Policy.JSON_START_YEAR]
97
+ ifactor28 = 1.0 + pirates[2028-taxcalc.Policy.JSON_START_YEAR]
91
98
  # specify extend-TCJA-beyond-2025 reform
92
99
  # ... get 2025 parameter values
93
100
  pol.set_year(2025)
@@ -95,45 +102,61 @@ def main():
95
102
  # ... write reform header comments
96
103
  print( '// REFORM TO EXTEND TEMPORARY TCJA PROVISIONS BEYOND 2025')
97
104
  print(f'// USING TAX-CALCULATOR {taxcalc.__version__}')
98
- print(f'// WITH 2025-to-2026 INDEXING FACTOR = {ifactor:.6f}')
105
+ print(f'// WITH 2025-to-2026 INDEXING FACTOR = {ifactor25:.6f}')
106
+ print(f'// AND 2028-to-2029 INDEXING FACTOR = {ifactor28:.6f}')
99
107
  if TCJA_CATEGORY:
100
108
  print(f'// ONLY TCJA PROVISIONS IN CATEGORY {TCJA_CATEGORY}')
101
109
  print('{')
102
- # ... set 2026 nonreverted values for the parameters set to revert
110
+ # ... set 2026/29 nonreverted values for the parameters set to revert
111
+ left_brace = '{'
112
+ right_brace = '}'
113
+ year = 2026
103
114
  for pname, pinfo in TCJA_PARAMETERS.items():
104
115
  if TCJA_CATEGORY and pinfo['category'] != TCJA_CATEGORY:
105
116
  continue # skip this parameter
117
+ if pname == 'ALD_BusinessLosses_c':
118
+ ifactor = ifactor28
119
+ year = 2029
120
+ pol.set_year(2028)
121
+ pdata = dict(pol.items())
122
+ else:
123
+ if year != 2026:
124
+ pol.set_year(2025)
125
+ pdata = dict(pol.items())
126
+ ifactor = ifactor25
127
+ year = 2026
128
+ trailing_comma = '' if pname == last_pname else ','
106
129
  if pinfo['indexed']:
107
130
  pval = pdata[pname][0] * ifactor
108
131
  if isinstance(pval, numpy.ndarray):
109
132
  # handle vector parameter
110
133
  pval = numpy.minimum(9e99, pval.round(2))
111
134
  sys.stdout.write(f' "{pname}": ')
112
- sys.stdout.write('{"2026": ')
135
+ sys.stdout.write(f'{left_brace}"{year}": ')
113
136
  sys.stdout.write(f'{pval.tolist()}')
114
- sys.stdout.write('},\n')
137
+ sys.stdout.write(f'{right_brace}{trailing_comma}\n')
115
138
  else:
116
139
  # handle scalar parameter
117
140
  pval = min(9e99, pval)
118
141
  sys.stdout.write(f' "{pname}": ')
119
- sys.stdout.write('{"2026": ')
142
+ sys.stdout.write(f'{left_brace}"{year}": ')
120
143
  sys.stdout.write(f'{pval*ifactor:.2f}')
121
- sys.stdout.write('},\n')
144
+ sys.stdout.write(f'{right_brace}{trailing_comma}\n')
122
145
  else: # if parameter is not indexed
123
146
  pval = pdata[pname][0]
124
147
  if isinstance(pval, numpy.ndarray):
125
148
  # handle vector parameter
126
149
  pval = numpy.minimum(9e99, pval.round(2))
127
150
  sys.stdout.write(f' "{pname}": ')
128
- sys.stdout.write('{"2026": ')
151
+ sys.stdout.write(f'{left_brace}"{year}": ')
129
152
  sys.stdout.write(f'{pval.tolist()}')
130
- sys.stdout.write('},\n')
153
+ sys.stdout.write(f'{right_brace}{trailing_comma}\n')
131
154
  else:
132
155
  # handle scalar parameter
133
156
  sys.stdout.write(f' "{pname}": ')
134
- sys.stdout.write('{"2026": ')
157
+ sys.stdout.write(f'{left_brace}"{year}": ')
135
158
  sys.stdout.write(f'{pval:.2f}')
136
- sys.stdout.write('},\n')
159
+ sys.stdout.write(f'{right_brace}{trailing_comma}\n')
137
160
  print('}')
138
161
  return 0
139
162
  # end main function code
taxcalc-4.3.0/ppp.py ADDED
@@ -0,0 +1,138 @@
1
+ """
2
+ This policy parameter projection script, which calculates policy
3
+ parameter values that were changed by TCJA and will revert to
4
+ their pre-TCJA values in 2026 (adjusted for inflation).
5
+
6
+ USAGE: (taxcalc-dev) T-C% python ppp.py
7
+ THEN CHECK: % diff pcl.json taxcalc/policy_current_law.json
8
+ IF DIFFS OK % mv pcl.json taxcalc/policy_current_law.json
9
+
10
+ WHEN TO USE: use this script to update taxcalc/policy_current_law.json
11
+ whenever post-2016 inflation rates in the growfactors.csv files are changed.
12
+ """
13
+
14
+ import sys
15
+ import re
16
+ from pathlib import Path
17
+ from taxcalc import Policy
18
+
19
+ REVERTING_PARAMS = {
20
+ 'ALD_BusinessLosses_c': 2029,
21
+ 'II_em': 2026,
22
+ 'II_em_ps': 2026,
23
+ 'STD': 2026,
24
+ 'ID_AllTaxes_c': 2026,
25
+ 'ID_ps': 2026,
26
+ 'II_brk1': 2026,
27
+ 'II_brk2': 2026,
28
+ 'II_brk3': 2026,
29
+ 'II_brk4': 2026,
30
+ 'II_brk5': 2026,
31
+ 'II_brk6': 2026,
32
+ 'II_brk7': 2026,
33
+ 'PT_brk1': 2026,
34
+ 'PT_brk2': 2026,
35
+ 'PT_brk3': 2026,
36
+ 'PT_brk4': 2026,
37
+ 'PT_brk5': 2026,
38
+ 'PT_brk6': 2026,
39
+ 'PT_brk7': 2026,
40
+ 'PT_qbid_taxinc_thd': 2026,
41
+ 'AMT_em': 2026,
42
+ 'AMT_em_ps': 2026,
43
+ 'AMT_em_pe': 2026,
44
+ }
45
+ MARS_VALUES = ['single', 'mjoint', 'mseparate', 'headhh', 'widow']
46
+ PYEAR = 2017 # prior year before TCJA first implemented
47
+ FYEAR = 2026 # final year in which parameter values revert
48
+
49
+
50
+ def cumulative_ifactor():
51
+ """
52
+ Return PYEAR-to_FYEAR inflation factor.
53
+ """
54
+ pol = Policy()
55
+ # calculate the inflation factor used to calculate the
56
+ # inflation-adjusted 2026 reverting parameter values
57
+ # NOTE: pvalue[t+1] = pvalue[t] * ( 1 + irate[t] )
58
+ cum_ifactor = 1.0
59
+ for year in range(PYEAR, FYEAR):
60
+ # pylint: disable=protected-access
61
+ rate = pol._inflation_rates[year - pol.start_year]
62
+ cum_ifactor *= 1.0 + rate
63
+ return cum_ifactor
64
+
65
+
66
+ def integrate_fragments(fragments):
67
+ """
68
+ Integrate specified fragments with the policy_current_law.json text.
69
+ """
70
+ p_c_l_path = Path('.') / 'taxcalc' / 'policy_current_law.json'
71
+ with open(p_c_l_path, 'r', encoding='utf-8') as ofile:
72
+ olines = ofile.readlines()
73
+ # pylint: disable=consider-using-with
74
+ nfile = open('pcl.json', 'w', encoding='utf-8')
75
+ re_param_line = re.compile(r'^\s{4}"(\w+)": {$')
76
+ re_ryear26_line = re.compile(r'^\s{16}"year": 2026,$')
77
+ re_ryear29_line = re.compile(r'^\s{16}"year": 2029,$')
78
+ re_value_line = re.compile(r'^\s{16}"value":')
79
+ writing_oline = True
80
+ pname_has_fragments = False
81
+ for oline in olines:
82
+ pmatch = re_param_line.search(oline)
83
+ if pmatch:
84
+ pname = pmatch.group(1)
85
+ pname_has_fragments = pname in fragments
86
+ if pname_has_fragments:
87
+ if fragments[pname][0]['year'] == 2026:
88
+ re_ryear_line = re_ryear26_line
89
+ else:
90
+ re_ryear_line = re_ryear29_line
91
+ idx = -1
92
+ elif pname_has_fragments:
93
+ ymatch = re_ryear_line.search(oline)
94
+ if ymatch:
95
+ idx += 1
96
+ if pname_has_fragments and idx >= 0:
97
+ if re_value_line.search(oline):
98
+ writing_oline = False
99
+ else:
100
+ writing_oline = True
101
+ if writing_oline:
102
+ nfile.write(oline)
103
+ else:
104
+ nfile.write(
105
+ f' "value": {fragments[pname][idx]["value"]}\n'
106
+ )
107
+ nfile.close()
108
+ return 0
109
+
110
+
111
+ def main():
112
+ """
113
+ High-level script logic.
114
+ """
115
+ ifactor = cumulative_ifactor()
116
+
117
+ # construct policy_current_law.json revert-year fragments
118
+ # for each reverting parameter in a fragments dictionary
119
+ fragments = {}
120
+ parameters = Policy()
121
+ for pname, ryear in REVERTING_PARAMS.items():
122
+ vos = parameters.select_eq(pname, year=PYEAR)
123
+ frag_list = []
124
+ for vo in vos:
125
+ rval = min(9e99, round(vo['value'] * ifactor, 0))
126
+ frag_list.append({'year': ryear, 'value': rval})
127
+ fragments[pname] = frag_list
128
+
129
+ # integrate fragment info into existing policy_current_law.json
130
+ rcode = integrate_fragments(fragments)
131
+
132
+ # return exit code returned by integrate_fragments function
133
+ return rcode
134
+ # end main function code
135
+
136
+
137
+ if __name__ == '__main__':
138
+ sys.exit(main())
@@ -3,14 +3,14 @@ testpaths =
3
3
  taxcalc
4
4
  markers =
5
5
  requires_pufcsv
6
- requires_tmdcsv
7
6
  pre_release
8
- compatible_data
9
7
  local
10
8
  benefits
11
- itmded_vars
9
+ compatible_data
12
10
  cpscsv_agg
11
+ extend_tcja
12
+ itmded_vars
13
13
  pufcsv_agg
14
14
  reforms
15
15
  rtr
16
- extend_tcja
16
+ stded
@@ -3,7 +3,7 @@ from setuptools import setup
3
3
  with open("README.md") as f:
4
4
  longdesc = f.read()
5
5
 
6
- version = "4.2.2"
6
+ version = "4.3.0"
7
7
 
8
8
  config = {
9
9
  "description": "Tax Calculator",
@@ -14,4 +14,4 @@ from taxcalc.taxcalcio import *
14
14
  from taxcalc.utils import *
15
15
  from taxcalc.cli import *
16
16
 
17
- __version__ = '4.2.2'
17
+ __version__ = '4.3.0'
@@ -37,7 +37,7 @@ class Policy(Parameters):
37
37
  DEFAULTS_FILE_NAME = 'policy_current_law.json'
38
38
  DEFAULTS_FILE_PATH = os.path.abspath(os.path.dirname(__file__))
39
39
  JSON_START_YEAR = 2013 # remains the same unless earlier data added
40
- LAST_KNOWN_YEAR = 2022 # last year for which indexed param vals are known
40
+ LAST_KNOWN_YEAR = 2024 # last year for which indexed param vals are known
41
41
  # should increase LAST_KNOWN_YEAR by one every calendar year
42
42
  LAST_BUDGET_YEAR = 2034 # last extrapolation year
43
43
  # should increase LAST_BUDGET_YEAR by one every calendar year