taxcalc 4.3.5__tar.gz → 4.4.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 (244) hide show
  1. {taxcalc-4.3.5 → taxcalc-4.4.0}/PKG-INFO +5 -7
  2. {taxcalc-4.3.5 → taxcalc-4.4.0}/conda.recipe/meta.yaml +4 -4
  3. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/about/releases.md +16 -2
  4. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/contributing/RELEASING.md +4 -6
  5. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/index.md +1 -1
  6. {taxcalc-4.3.5 → taxcalc-4.4.0}/environment.yml +3 -2
  7. {taxcalc-4.3.5 → taxcalc-4.4.0}/setup.py +5 -7
  8. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/__init__.py +1 -1
  9. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/consumption.py +5 -5
  10. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/growdiff.py +5 -10
  11. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/parameters.py +7 -6
  12. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/policy.py +22 -6
  13. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ext.json +1 -1
  14. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/taxcalcio.py +39 -29
  15. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_4package.py +42 -0
  16. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_calculator.py +3 -4
  17. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_consumption.py +5 -6
  18. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_cpscsv.py +49 -1
  19. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_growdiff.py +5 -7
  20. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_policy.py +2 -2
  21. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc.egg-info/PKG-INFO +5 -7
  22. taxcalc-4.4.0/taxcalc.egg-info/requires.txt +5 -0
  23. taxcalc-4.3.5/taxcalc.egg-info/requires.txt +0 -7
  24. {taxcalc-4.3.5 → taxcalc-4.4.0}/.coveragerc +0 -0
  25. {taxcalc-4.3.5 → taxcalc-4.4.0}/.github/FUNDING.yml +0 -0
  26. {taxcalc-4.3.5 → taxcalc-4.4.0}/.github/workflows/build_and_test.yml +0 -0
  27. {taxcalc-4.3.5 → taxcalc-4.4.0}/.github/workflows/check_jupyterbook.yml +0 -0
  28. {taxcalc-4.3.5 → taxcalc-4.4.0}/.github/workflows/deploy_jupyterbook.yml +0 -0
  29. {taxcalc-4.3.5 → taxcalc-4.4.0}/.github/workflows/deploy_parameters_docs.yml +0 -0
  30. {taxcalc-4.3.5 → taxcalc-4.4.0}/.gitignore +0 -0
  31. {taxcalc-4.3.5 → taxcalc-4.4.0}/LICENSE +0 -0
  32. {taxcalc-4.3.5 → taxcalc-4.4.0}/MANIFEST.in +0 -0
  33. {taxcalc-4.3.5 → taxcalc-4.4.0}/Makefile +0 -0
  34. {taxcalc-4.3.5 → taxcalc-4.4.0}/PSL_catalog.json +0 -0
  35. {taxcalc-4.3.5 → taxcalc-4.4.0}/README.md +0 -0
  36. {taxcalc-4.3.5 → taxcalc-4.4.0}/codecov.yml +0 -0
  37. {taxcalc-4.3.5 → taxcalc-4.4.0}/conda.recipe/bld.bat +0 -0
  38. {taxcalc-4.3.5 → taxcalc-4.4.0}/conda.recipe/build.sh +0 -0
  39. {taxcalc-4.3.5 → taxcalc-4.4.0}/csv_show.sh +0 -0
  40. {taxcalc-4.3.5 → taxcalc-4.4.0}/csv_vars.sh +0 -0
  41. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/PSL.svg +0 -0
  42. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/_config.yml +0 -0
  43. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/_static/atr.png +0 -0
  44. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/_static/mtr.png +0 -0
  45. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/_static/pch.png +0 -0
  46. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/_toc.yml +0 -0
  47. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/about/LICENSE.md +0 -0
  48. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/about/history.md +0 -0
  49. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/about/roadmap.md +0 -0
  50. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/calcfunctions.rst +0 -0
  51. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/calculator.rst +0 -0
  52. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/consumption.rst +0 -0
  53. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/data.rst +0 -0
  54. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/decorators.rst +0 -0
  55. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/growdiff.rst +0 -0
  56. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/growfactors.rst +0 -0
  57. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/parameters.rst +0 -0
  58. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/policy.rst +0 -0
  59. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/public_api.rst +0 -0
  60. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/records.rst +0 -0
  61. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/taxcalcio.rst +0 -0
  62. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/utils.rst +0 -0
  63. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/api/utilsprvt.rst +0 -0
  64. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/contributing/contributor_guide.md +0 -0
  65. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/contributing/dependencies.md +0 -0
  66. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/contributing/param_naming.md +0 -0
  67. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/contributing/pr_workflow.md +0 -0
  68. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/contributing/testing.md +0 -0
  69. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/README.md +0 -0
  70. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/assumption_params.md +0 -0
  71. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/cli.md +0 -0
  72. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/index.md +0 -0
  73. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/input_vars.md +0 -0
  74. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/make/make_io_vars.py +0 -0
  75. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/make/make_params.py +0 -0
  76. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/make/make_uguide.py +0 -0
  77. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/output_vars.md +0 -0
  78. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/policy_params.md +0 -0
  79. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/python_interface.md +0 -0
  80. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/templates/assumption_params_template.md +0 -0
  81. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/templates/input_vars_template.md +0 -0
  82. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/templates/output_vars_template.md +0 -0
  83. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/guide/templates/policy_params_template.md +0 -0
  84. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/README.md +0 -0
  85. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/_static/reformA.json +0 -0
  86. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/_static/reformB.json +0 -0
  87. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/_static/reformC.json +0 -0
  88. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/convert_all.sh +0 -0
  89. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/index.md +0 -0
  90. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe00.md +0 -0
  91. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe01.md +0 -0
  92. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe02.md +0 -0
  93. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe03.md +0 -0
  94. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe04.md +0 -0
  95. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe04_pandas.md +0 -0
  96. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe05.md +0 -0
  97. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/md_src/recipe06.md +0 -0
  98. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe00.ipynb +0 -0
  99. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe01.ipynb +0 -0
  100. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe02.ipynb +0 -0
  101. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe03.ipynb +0 -0
  102. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe04.ipynb +0 -0
  103. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe04_pandas.ipynb +0 -0
  104. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe05.ipynb +0 -0
  105. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/recipes/recipe06.ipynb +0 -0
  106. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/usage/data.md +0 -0
  107. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/usage/overview.md +0 -0
  108. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/usage/starting.md +0 -0
  109. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/usage/tcja_after_2025.md +0 -0
  110. {taxcalc-4.3.5 → taxcalc-4.4.0}/docs/use_cases.md +0 -0
  111. {taxcalc-4.3.5 → taxcalc-4.4.0}/extend_tcja.py +0 -0
  112. {taxcalc-4.3.5 → taxcalc-4.4.0}/gitpr +0 -0
  113. {taxcalc-4.3.5 → taxcalc-4.4.0}/gitpr.bat +0 -0
  114. {taxcalc-4.3.5 → taxcalc-4.4.0}/gitsync +0 -0
  115. {taxcalc-4.3.5 → taxcalc-4.4.0}/gitsync.bat +0 -0
  116. {taxcalc-4.3.5 → taxcalc-4.4.0}/ppp.py +0 -0
  117. {taxcalc-4.3.5 → taxcalc-4.4.0}/pyproject.toml +0 -0
  118. {taxcalc-4.3.5 → taxcalc-4.4.0}/pytest.ini +0 -0
  119. {taxcalc-4.3.5 → taxcalc-4.4.0}/setup.cfg +0 -0
  120. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/assumptions/ASSUMPTIONS.md +0 -0
  121. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/assumptions/README.md +0 -0
  122. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/assumptions/economic_assumptions_template.json +0 -0
  123. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/calcfunctions.py +0 -0
  124. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/calculator.py +0 -0
  125. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/cli/__init__.py +0 -0
  126. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/cli/tc.py +0 -0
  127. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/conftest.py +0 -0
  128. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/consumption.json +0 -0
  129. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/cps.csv.gz +0 -0
  130. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/cps_weights.csv.gz +0 -0
  131. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/data.py +0 -0
  132. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/decorators.py +0 -0
  133. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/growdiff.json +0 -0
  134. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/growfactors.csv +0 -0
  135. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/growfactors.py +0 -0
  136. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/policy_current_law.json +0 -0
  137. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/puf_ratios.csv +0 -0
  138. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/puf_weights.csv.gz +0 -0
  139. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/records.py +0 -0
  140. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/records_variables.json +0 -0
  141. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/2017_law.json +0 -0
  142. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/2017_law.out.csv +0 -0
  143. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ARPA.json +0 -0
  144. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ARPA.out.csv +0 -0
  145. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/BrownKhanna.json +0 -0
  146. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/BrownKhanna.out.csv +0 -0
  147. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/CARES.json +0 -0
  148. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/CARES.out.csv +0 -0
  149. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.json +0 -0
  150. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.out.csv +0 -0
  151. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Larson2019.json +0 -0
  152. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Larson2019.out.csv +0 -0
  153. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/README.md +0 -0
  154. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/REFORMS.md +0 -0
  155. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Renacci.json +0 -0
  156. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Renacci.out.csv +0 -0
  157. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/SandersDeFazio.json +0 -0
  158. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/SandersDeFazio.out.csv +0 -0
  159. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/TCJA.json +0 -0
  160. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/TCJA.md +0 -0
  161. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/TCJA.out.csv +0 -0
  162. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Trump2016.json +0 -0
  163. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Trump2016.out.csv +0 -0
  164. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Trump2017.json +0 -0
  165. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/Trump2017.out.csv +0 -0
  166. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/Clinton2016.json +0 -0
  167. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/RyanBrady.json +0 -0
  168. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/TCJA_House.json +0 -0
  169. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/TCJA_House_Amended.json +0 -0
  170. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/TCJA_Reconciliation.json +0 -0
  171. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/TCJA_Senate.json +0 -0
  172. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/TCJA_Senate_111417.json +0 -0
  173. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/archive/TCJA_Senate_120117.json +0 -0
  174. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/cases.csv +0 -0
  175. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/clp.out.csv +0 -0
  176. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/growfactors_ext.csv +0 -0
  177. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes0.json +0 -0
  178. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes0.out.csv +0 -0
  179. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes1.json +0 -0
  180. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes1.out.csv +0 -0
  181. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes2.json +0 -0
  182. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes2.out.csv +0 -0
  183. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes3.json +0 -0
  184. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/reforms/ptaxes3.out.csv +0 -0
  185. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/benefits_expect.csv +0 -0
  186. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/cmpi_cps_expect.txt +0 -0
  187. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/cmpi_puf_expect.txt +0 -0
  188. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/conftest.py +0 -0
  189. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/cpscsv_agg_expect.csv +0 -0
  190. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/puf_var_correl_coeffs_2016.csv +0 -0
  191. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/puf_var_wght_means_by_year.csv +0 -0
  192. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/pufcsv_agg_expect.csv +0 -0
  193. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/pufcsv_mtr_expect.txt +0 -0
  194. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/reforms.json +0 -0
  195. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/reforms_expect.csv +0 -0
  196. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_benefits.py +0 -0
  197. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_calcfunctions.py +0 -0
  198. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_compare.py +0 -0
  199. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_compatible_data.py +0 -0
  200. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_data.py +0 -0
  201. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_decorators.py +0 -0
  202. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_growfactors.py +0 -0
  203. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_parameters.py +0 -0
  204. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_puf_var_stats.py +0 -0
  205. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_pufcsv.py +0 -0
  206. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_records.py +0 -0
  207. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_reforms.py +0 -0
  208. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_responses.py +0 -0
  209. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_taxcalcio.py +0 -0
  210. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/tests/test_utils.py +0 -0
  211. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/utils.py +0 -0
  212. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/utilsprvt.py +0 -0
  213. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/CSV_INPUT_VARS.md +0 -0
  214. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/CSV_OUTPUT_VARS.md +0 -0
  215. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/README.md +0 -0
  216. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/Differences_Explained.md +0 -0
  217. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/README.md +0 -0
  218. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/a17-taxdiffs-expect.csv +0 -0
  219. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/a18-taxdiffs-expect.csv +0 -0
  220. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/a19-taxdiffs-expect.csv +0 -0
  221. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/a20-taxdiffs-expect.csv +0 -0
  222. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/a21-taxdiffs-expect.csv +0 -0
  223. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/b17-taxdiffs-expect.csv +0 -0
  224. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/b18-taxdiffs-expect.csv +0 -0
  225. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/b19-taxdiffs-expect.csv +0 -0
  226. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/b20-taxdiffs-expect.csv +0 -0
  227. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/b21-taxdiffs-expect.csv +0 -0
  228. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/c17-taxdiffs-expect.csv +0 -0
  229. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/c18-taxdiffs-expect.csv +0 -0
  230. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/expected_differences/c19-taxdiffs-expect.csv +0 -0
  231. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/input_setup.py +0 -0
  232. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/main_comparison.py +0 -0
  233. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/prepare_taxcalc_input.py +0 -0
  234. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/process_taxcalc_output.py +0 -0
  235. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/taxsim_emulation.json +0 -0
  236. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/taxsim_input.py +0 -0
  237. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/tc_sims.py +0 -0
  238. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/taxsim35/tests_35.py +0 -0
  239. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc/validation/tests_35.sh +0 -0
  240. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc.egg-info/SOURCES.txt +0 -0
  241. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc.egg-info/dependency_links.txt +0 -0
  242. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc.egg-info/entry_points.txt +0 -0
  243. {taxcalc-4.3.5 → taxcalc-4.4.0}/taxcalc.egg-info/top_level.txt +0 -0
  244. {taxcalc-4.3.5 → taxcalc-4.4.0}/tctest-nojit.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taxcalc
3
- Version: 4.3.5
3
+ Version: 4.4.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
@@ -18,13 +18,11 @@ Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
- Requires-Dist: setuptools
22
- Requires-Dist: numpy
23
- Requires-Dist: pandas
24
- Requires-Dist: bokeh
21
+ Requires-Dist: numpy>=1.26
22
+ Requires-Dist: pandas>=2.2
23
+ Requires-Dist: bokeh>=2.4
25
24
  Requires-Dist: numba
26
- Requires-Dist: requests
27
- Requires-Dist: paramtools>=0.18.3
25
+ Requires-Dist: paramtools>=0.19.0
28
26
 
29
27
  | | |
30
28
  | --- | --- |
@@ -9,10 +9,10 @@ build:
9
9
  requirements:
10
10
  build:
11
11
  - "python>=3.10, <3.13"
12
- - "numpy>=1.26,<1.27"
12
+ - "numpy>=1.26"
13
13
  - "pandas>=2.2"
14
14
  - "bokeh>=2.4"
15
- - "paramtools>=0.18.3"
15
+ - "paramtools>=0.19.0"
16
16
  - numba
17
17
  - curl
18
18
  - openpyxl
@@ -20,10 +20,10 @@ requirements:
20
20
 
21
21
  run:
22
22
  - "python>=3.10, <3.13"
23
- - "numpy>=1.26,<1.27"
23
+ - "numpy>=1.26"
24
24
  - "pandas>=2.2"
25
25
  - "bokeh>=2.4"
26
- - "paramtools>=0.18.3"
26
+ - "paramtools>=0.19.0"
27
27
  - numba
28
28
  - curl
29
29
  - openpyxl
@@ -4,6 +4,20 @@ Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclose
4
4
  for a complete commit history.
5
5
 
6
6
 
7
+ 2024-12-19 Release 4.4.0
8
+ ------------------------
9
+ (last merged pull request is
10
+ [#2856](https://github.com/PSLmodels/Tax-Calculator/pull/2856))
11
+
12
+ **This is an enhancement release.**
13
+
14
+ **API Changes**
15
+
16
+ **New Features**
17
+ - Make a Policy object's last budget year be flexible
18
+ [[#2856](https://github.com/PSLmodels/Tax-Calculator/pull/2856) by Jason DeBacker with minor assistance from Martin Holmer]
19
+
20
+
7
21
  2024-12-16 Release 4.3.5
8
22
  ------------------------
9
23
  (last merged pull request is
@@ -23,8 +37,8 @@ for a complete commit history.
23
37
 
24
38
  **Bug Fixes**
25
39
  - Fix several broken documentation links
26
- [[#2847](https://github.com/PSLmodels/Tax-Calculator/pull/2847) by Martin Holmer] and
27
- [[#2849](https://github.com/PSLmodels/Tax-Calculator/pull/2849) by Martin Holmer]
40
+ [[#2847](https://github.com/PSLmodels/Tax-Calculator/pull/2847) by Martin Holmer and
41
+ [#2849](https://github.com/PSLmodels/Tax-Calculator/pull/2849) by Martin Holmer]
28
42
  - Remove incorrect use of GrowFactors() in Policy and Parameters classes
29
43
  [[#2852](https://github.com/PSLmodels/Tax-Calculator/pull/2852) by Martin Holmer]
30
44
 
@@ -8,12 +8,11 @@ release.
8
8
  Create new `taxcalc` packages
9
9
  =============================
10
10
  ```
11
+ --> merge master branch into X-Y-Z branch
11
12
 
12
13
  --> on branch X-Y-Z, edit docs/about/releases.md to finalize X.Y.Z info
13
14
 
14
- --> specify release X.Y.Z in setup.py and taxcalc/__init__.py
15
-
16
- --> merge master branch into X-Y-Z branch
15
+ --> specify release X.Y.Z in setup.py and taxcalc/__init__.py and docs/index.md
17
16
 
18
17
  --> run `python update_pcl.py` [to update policy_current_law.json if needed]
19
18
 
@@ -29,8 +28,6 @@ Create new `taxcalc` packages
29
28
 
30
29
  --> cd taxcalc/validation ; ./tests_35.sh ; .fix. ; cd ../..
31
30
 
32
- --> specify release X.Y.Z in docs/index.md
33
-
34
31
  --> make clean [to remove taxcalc package]
35
32
 
36
33
  --> commit X-Y-Z branch and push to origin
@@ -42,7 +39,8 @@ Create new `taxcalc` packages
42
39
  --> create release X.Y.Z on GitHub using master branch
43
40
 
44
41
  --> Create new package on Conda-Forge for release X.Y.Z
45
- --> open a PR to github.com/conda-forge/taxcalc-feedstock where you change the `recipe/meta.yaml` file by updating (1) the version number to X.Y.Z and (2) the checksum to reflect the checksum for the tarball for release X.Y.Z in the Tax-Calculator GitHub repo
42
+
43
+ --> open a PR to github.com/conda-forge/taxcalc-feedstock where you change the `recipe/meta.yaml` file by updating (1) the version number to X.Y.Z and (2) the checksum to reflect the checksum for the tarball for release X.Y.Z in the Tax-Calculator GitHub repo
46
44
 
47
45
  ====> ADD NEW DEPENDENCY OR UPDATE MINIMUM REQUIRED VERSION <====
48
46
 
@@ -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.3.5 (2024-12-16) <about/releases>`
60
+ {doc}`4.4.0 (2024-12-19) <about/releases>`
61
61
 
62
62
  If you are already using Tax-Calculator, upgrade using the following command:
63
63
 
@@ -3,11 +3,12 @@ channels:
3
3
  - conda-forge
4
4
  dependencies:
5
5
  - "python>=3.10, <3.13"
6
- - "numpy>=1.26,<1.27"
6
+ - "numpy>=1.26"
7
7
  - "pandas>=2.2"
8
8
  - "bokeh>=2.4"
9
9
  - numba
10
10
  - curl
11
+ - setuptools
11
12
  - pytest
12
13
  - pytest-xdist
13
14
  - pycodestyle
@@ -18,4 +19,4 @@ dependencies:
18
19
  - pip
19
20
  - pip:
20
21
  - jupyter-book
21
- - "paramtools>=0.18.3"
22
+ - "paramtools>=0.19.0"
@@ -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.3.5"
6
+ version = "4.4.0"
7
7
 
8
8
  config = {
9
9
  "description": "Tax Calculator",
@@ -18,13 +18,11 @@ config = {
18
18
  "include_package_data": True,
19
19
  "name": "taxcalc",
20
20
  "install_requires": [
21
- "setuptools",
22
- "numpy",
23
- "pandas",
24
- "bokeh",
21
+ "numpy>=1.26",
22
+ "pandas>=2.2",
23
+ "bokeh>=2.4",
25
24
  "numba",
26
- "requests",
27
- "paramtools>=0.18.3",
25
+ "paramtools>=0.19.0",
28
26
  ],
29
27
  "classifiers": [
30
28
  "Development Status :: 4 - Beta",
@@ -14,6 +14,6 @@ from taxcalc.taxcalcio import *
14
14
  from taxcalc.utils import *
15
15
  from taxcalc.cli import *
16
16
 
17
- __version__ = '4.3.5'
17
+ __version__ = '4.4.0'
18
18
  __min_python3_version__ = 10
19
19
  __max_python3_version__ = 12
@@ -20,7 +20,8 @@ class Consumption(Parameters):
20
20
 
21
21
  Parameters
22
22
  ----------
23
- none
23
+ last_budget_year: integer
24
+ user-defined last parameter extrapolation year
24
25
 
25
26
  Returns
26
27
  -------
@@ -28,14 +29,13 @@ class Consumption(Parameters):
28
29
  """
29
30
 
30
31
  JSON_START_YEAR = Policy.JSON_START_YEAR
31
- DEFAULT_NUM_YEARS = Policy.DEFAULT_NUM_YEARS
32
32
  DEFAULTS_FILE_NAME = 'consumption.json'
33
33
  DEFAULTS_FILE_PATH = os.path.abspath(os.path.dirname(__file__))
34
34
 
35
- def __init__(self):
35
+ def __init__(self, last_budget_year=Policy.LAST_BUDGET_YEAR):
36
36
  super().__init__()
37
- self.initialize(Consumption.JSON_START_YEAR,
38
- Consumption.DEFAULT_NUM_YEARS)
37
+ nyrs = Policy.number_of_years(last_budget_year)
38
+ self.initialize(Consumption.JSON_START_YEAR, nyrs)
39
39
 
40
40
  @staticmethod
41
41
  def read_json_update(obj):
@@ -20,7 +20,8 @@ class GrowDiff(Parameters):
20
20
 
21
21
  Parameters
22
22
  ----------
23
- none
23
+ last_budget_year: integer
24
+ user-defined last parameter extrapolation year
24
25
 
25
26
  Returns
26
27
  -------
@@ -28,14 +29,13 @@ class GrowDiff(Parameters):
28
29
  """
29
30
 
30
31
  JSON_START_YEAR = Policy.JSON_START_YEAR
31
- DEFAULT_NUM_YEARS = Policy.DEFAULT_NUM_YEARS
32
32
  DEFAULTS_FILE_NAME = 'growdiff.json'
33
33
  DEFAULTS_FILE_PATH = os.path.abspath(os.path.dirname(__file__))
34
34
 
35
- def __init__(self):
35
+ def __init__(self, last_budget_year=Policy.LAST_BUDGET_YEAR):
36
36
  super().__init__()
37
- self.initialize(GrowDiff.JSON_START_YEAR,
38
- GrowDiff.DEFAULT_NUM_YEARS)
37
+ nyrs = Policy.number_of_years(last_budget_year)
38
+ self.initialize(GrowDiff.JSON_START_YEAR, nyrs)
39
39
 
40
40
  @staticmethod
41
41
  def read_json_update(obj, topkey):
@@ -81,8 +81,3 @@ class GrowDiff(Parameters):
81
81
  cyr = i + self.start_year
82
82
  diff_array = getattr(self, _gfvn)
83
83
  growfactors.update(gfvn, cyr, diff_array[i])
84
-
85
- def set_rates(self):
86
- """
87
- Unimplemented base class method that is not used here.
88
- """
@@ -98,19 +98,16 @@ class Parameters(pt.Parameters):
98
98
  self.DEFAULTS_FILE_PATH,
99
99
  self.DEFAULTS_FILE_NAME
100
100
  )
101
-
101
+ last_budget_year = start_year + num_years - 1
102
102
  if last_known_year is None:
103
103
  self._last_known_year = start_year
104
104
  else:
105
105
  assert last_known_year >= start_year
106
- assert last_known_year <= self.LAST_BUDGET_YEAR
106
+ assert last_known_year <= last_budget_year
107
107
  self._last_known_year = last_known_year
108
-
109
108
  self._removed_params = removed or self.REMOVED_PARAMS
110
109
  self._redefined_params = redefined or self.REDEFINED_PARAMS
111
-
112
110
  self._wage_indexed = wage_indexed or self.WAGE_INDEXED_PARAMS
113
-
114
111
  if (
115
112
  (start_year or self.JSON_START_YEAR) and
116
113
  "initial_state" not in kwargs
@@ -118,6 +115,10 @@ class Parameters(pt.Parameters):
118
115
  kwargs["initial_state"] = {
119
116
  "year": start_year or self.JSON_START_YEAR
120
117
  }
118
+ # update defaults to correspond to user-defined parameter years
119
+ self.defaults = super().get_defaults()
120
+ label = self.defaults["schema"]["labels"]["year"]
121
+ label["validators"]["range"]["max"] = last_budget_year
121
122
  super().__init__(**kwargs)
122
123
 
123
124
  def adjust(
@@ -774,7 +775,7 @@ class Parameters(pt.Parameters):
774
775
  attr[1:], year=list(range(self.start_year, self.end_year + 1))
775
776
  )
776
777
  else:
777
- raise AttributeError(f"{attr} not definied.")
778
+ raise AttributeError(f"{attr} is not defined.")
778
779
 
779
780
 
780
781
  TaxcalcReform = Union[str, Mapping[int, Any]]
@@ -24,6 +24,9 @@ class Policy(Parameters):
24
24
  gfactors: GrowFactors class instance
25
25
  containing price inflation rates and wage growth rates
26
26
 
27
+ last_budget_year: integer
28
+ user-defined last parameter extrapolation year
29
+
27
30
  Raises
28
31
  ------
29
32
  ValueError:
@@ -39,9 +42,16 @@ class Policy(Parameters):
39
42
  JSON_START_YEAR = 2013 # remains the same unless earlier data added
40
43
  LAST_KNOWN_YEAR = 2025 # last year for which indexed param vals are known
41
44
  # should increase LAST_KNOWN_YEAR by one every calendar year
42
- LAST_BUDGET_YEAR = 2034 # last extrapolation year
45
+ LAST_BUDGET_YEAR = 2034 # default value of last extrapolation year
43
46
  # should increase LAST_BUDGET_YEAR by one every calendar year
44
- DEFAULT_NUM_YEARS = LAST_BUDGET_YEAR - JSON_START_YEAR + 1
47
+
48
+ @staticmethod
49
+ def number_of_years(last_budget_year=LAST_BUDGET_YEAR):
50
+ """
51
+ Static method returns number of policy parameters years given
52
+ user-defined last_budget_year.
53
+ """
54
+ return last_budget_year - Policy.JSON_START_YEAR + 1
45
55
 
46
56
  # NOTE: the following three data structures use internal parameter names:
47
57
  # (1) specify which Policy parameters have been removed or renamed
@@ -80,7 +90,10 @@ class Policy(Parameters):
80
90
  # (3) specify which Policy parameters are wage (rather than price) indexed
81
91
  WAGE_INDEXED_PARAMS = ['SS_Earnings_c', 'SS_Earnings_thd']
82
92
 
83
- def __init__(self, gfactors=None, **kwargs):
93
+ def __init__(self,
94
+ gfactors=None,
95
+ last_budget_year=LAST_BUDGET_YEAR,
96
+ **kwargs):
84
97
  # put JSON contents of DEFAULTS_FILE_NAME into self._vals dictionary
85
98
  super().__init__()
86
99
  # handle gfactors argument
@@ -92,7 +105,7 @@ class Policy(Parameters):
92
105
  raise ValueError('gfactors is not None or a GrowFactors instance')
93
106
  # read default parameters and initialize
94
107
  syr = Policy.JSON_START_YEAR
95
- nyrs = Policy.DEFAULT_NUM_YEARS
108
+ nyrs = Policy.number_of_years(last_budget_year)
96
109
  self._inflation_rates = None
97
110
  self._wage_growth_rates = None
98
111
  self.initialize(syr, nyrs, Policy.LAST_KNOWN_YEAR,
@@ -101,7 +114,10 @@ class Policy(Parameters):
101
114
  Policy.WAGE_INDEXED_PARAMS, **kwargs)
102
115
 
103
116
  @staticmethod
104
- def tmd_constructor(growfactors: Path | GrowFactors): # pragma: no cover
117
+ def tmd_constructor(
118
+ growfactors: Path | GrowFactors,
119
+ last_budget_year=LAST_BUDGET_YEAR,
120
+ ): # pragma: no cover
105
121
  """
106
122
  Static method returns a Policy object instantiated with TMD
107
123
  input data. This convenience method works in a analogous way
@@ -112,7 +128,7 @@ class Policy(Parameters):
112
128
  growfactors = GrowFactors(growfactors_filename=str(growfactors))
113
129
  else:
114
130
  assert isinstance(growfactors, GrowFactors)
115
- return Policy(gfactors=growfactors)
131
+ return Policy(gfactors=growfactors, last_budget_year=last_budget_year)
116
132
 
117
133
  @staticmethod
118
134
  def read_json_reform(obj):
@@ -1,5 +1,5 @@
1
1
  // REFORM TO EXTEND TEMPORARY TCJA PROVISIONS BEYOND 2025
2
- // USING TAX-CALCULATOR 4.3.5
2
+ // USING TAX-CALCULATOR 4.4.0
3
3
  // WITH 2025-to-2026 INDEXING FACTOR = 1.024900
4
4
  // AND 2028-to-2029 INDEXING FACTOR = 1.021800
5
5
  {
@@ -249,6 +249,35 @@ class TaxCalcIO():
249
249
  # pylint: disable=too-many-arguments,too-many-locals
250
250
  # pylint: disable=too-many-statements,too-many-branches
251
251
  self.errmsg = ''
252
+ # instantiate base and reform GrowFactors objects
253
+ if self.tmd_input_data:
254
+ gfactors_base = GrowFactors(self.tmd_gfactor) # pragma: no cover
255
+ gfactors_ref = GrowFactors(self.tmd_gfactor) # pragma: no cover
256
+ else:
257
+ gfactors_base = GrowFactors()
258
+ gfactors_ref = GrowFactors()
259
+ # check tax_year validity
260
+ max_tax_year = gfactors_base.last_year
261
+ if tax_year > max_tax_year:
262
+ msg = f'TAXYEAR={tax_year} is greater than {max_tax_year}'
263
+ self.errmsg += f'ERROR: {msg}\n'
264
+ if self.puf_input_data:
265
+ min_tax_year = max( # pragma: no cover
266
+ Policy.JSON_START_YEAR, Records.PUFCSV_YEAR)
267
+ elif self.cps_input_data:
268
+ min_tax_year = max(
269
+ Policy.JSON_START_YEAR, Records.CPSCSV_YEAR)
270
+ elif self.tmd_input_data:
271
+ min_tax_year = max( # pragma: no cover
272
+ Policy.JSON_START_YEAR, Records.TMDCSV_YEAR)
273
+ else:
274
+ min_tax_year = Policy.JSON_START_YEAR
275
+ if tax_year < min_tax_year:
276
+ msg = f'TAXYEAR={tax_year} is less than {min_tax_year}'
277
+ self.errmsg += f'ERROR: {msg}\n'
278
+ # tax_year out of valid range means cannot proceed with calculations
279
+ if self.errmsg:
280
+ return
252
281
  # get policy parameter dictionary from --baseline file
253
282
  basedict = Calculator.read_json_param_objects(baseline, None)
254
283
  # get assumption sub-dictionaries
@@ -264,35 +293,29 @@ class TaxCalcIO():
264
293
  # remember parameters for reform documentation
265
294
  self.param_dict = paramdict
266
295
  self.policy_dicts = policydicts
296
+ # set last_b_year
297
+ last_b_year = max(tax_year, Policy.LAST_BUDGET_YEAR)
267
298
  # create gdiff_baseline object
268
- gdiff_baseline = GrowDiff()
299
+ gdiff_baseline = GrowDiff(last_budget_year=last_b_year)
269
300
  try:
270
301
  gdiff_baseline.update_growdiff(paramdict['growdiff_baseline'])
271
302
  except paramtools.ValidationError as valerr_msg:
272
303
  self.errmsg += valerr_msg.__str__()
273
- # create GrowFactors base object that incorporates gdiff_baseline
274
- if self.tmd_input_data:
275
- gfactors_base = GrowFactors(self.tmd_gfactor) # pragma: no cover
276
- else:
277
- gfactors_base = GrowFactors()
304
+ # apply gdiff_baseline to gfactor_base
278
305
  gdiff_baseline.apply_to(gfactors_base)
279
306
  # specify gdiff_response object
280
- gdiff_response = GrowDiff()
307
+ gdiff_response = GrowDiff(last_budget_year=last_b_year)
281
308
  try:
282
309
  gdiff_response.update_growdiff(paramdict['growdiff_response'])
283
310
  except paramtools.ValidationError as valerr_msg:
284
311
  self.errmsg += valerr_msg.__str__()
285
- # create GrowFactors ref object that has all gdiff objects applied
286
- if self.tmd_input_data:
287
- gfactors_ref = GrowFactors(self.tmd_gfactor) # pragma: no cover
288
- else:
289
- gfactors_ref = GrowFactors()
312
+ # apply gdiff_baseline and gdiff_response to gfactor_ref
290
313
  gdiff_baseline.apply_to(gfactors_ref)
291
314
  gdiff_response.apply_to(gfactors_ref)
292
315
  self.gf_reform = copy.deepcopy(gfactors_ref)
293
316
  # create Policy objects:
294
317
  # ... the baseline Policy object
295
- base = Policy(gfactors=gfactors_base)
318
+ base = Policy(gfactors=gfactors_base, last_budget_year=last_b_year)
296
319
  try:
297
320
  base.implement_reform(basedict['policy'],
298
321
  print_warnings=True,
@@ -303,7 +326,7 @@ class TaxCalcIO():
303
326
  self.errmsg += valerr_msg.__str__()
304
327
  # ... the reform Policy object
305
328
  if self.specified_reform:
306
- pol = Policy(gfactors=gfactors_ref)
329
+ pol = Policy(gfactors=gfactors_ref, last_budget_year=last_b_year)
307
330
  for poldict in policydicts:
308
331
  try:
309
332
  pol.implement_reform(poldict,
@@ -316,22 +339,13 @@ class TaxCalcIO():
316
339
  except paramtools.ValidationError as valerr_msg:
317
340
  self.errmsg += valerr_msg.__str__()
318
341
  else:
319
- pol = Policy(gfactors=gfactors_base)
342
+ pol = Policy(gfactors=gfactors_base, last_budget_year=last_b_year)
320
343
  # create Consumption object
321
- con = Consumption()
344
+ con = Consumption(last_budget_year=last_b_year)
322
345
  try:
323
346
  con.update_consumption(paramdict['consumption'])
324
347
  except paramtools.ValidationError as valerr_msg:
325
348
  self.errmsg += valerr_msg.__str__()
326
- # check for valid tax_year value
327
- if tax_year < pol.start_year:
328
- msg = 'tax_year {} less than policy.start_year {}'
329
- msg = msg.format(tax_year, pol.start_year)
330
- self.errmsg += 'ERROR: {}\n'.format(msg)
331
- if tax_year > pol.end_year:
332
- msg = 'tax_year {} greater than policy.end_year {}'
333
- msg = msg.format(tax_year, pol.end_year)
334
- self.errmsg += 'ERROR: {}\n'.format(msg)
335
349
  # any errors imply cannot proceed with calculations
336
350
  if self.errmsg:
337
351
  return
@@ -388,10 +402,6 @@ class TaxCalcIO():
388
402
  adjust_ratios=None,
389
403
  exact_calculations=exact_calculations)
390
404
  recs_base = copy.deepcopy(recs)
391
- if tax_year < recs.data_year:
392
- msg = 'tax_year {} less than records.data_year {}'
393
- msg = msg.format(tax_year, recs.data_year)
394
- self.errmsg += 'ERROR: {}\n'.format(msg)
395
405
  # create Calculator objects
396
406
  self.calc = Calculator(policy=pol, records=recs,
397
407
  verbose=True,
@@ -10,6 +10,34 @@ import re
10
10
  import subprocess
11
11
  import yaml
12
12
  import pytest
13
+ import ast
14
+
15
+
16
+ def extract_install_requires(setup_py_content):
17
+ """
18
+ Extract the install_requires list from a setup.py file content.
19
+
20
+ Args:
21
+ setup_py_content (str): The full content of the setup.py file
22
+
23
+ Returns:
24
+ list: A list of package requirements
25
+ """
26
+ # Use regex to find the install_requires list
27
+ match = re.search(r'"install_requires"\s*:\s*\[([^\]]+)\]', setup_py_content, re.DOTALL)
28
+
29
+ if match:
30
+ # Extract the contents of the list and split into packages
31
+ packages_str = match.group(1)
32
+ # Use ast.literal_eval to safely parse the string representations
33
+ packages = [
34
+ ast.literal_eval(f'{pkg.strip()}')
35
+ for pkg in packages_str.split(',')
36
+ if pkg.strip()
37
+ ]
38
+ return packages
39
+
40
+ return []
13
41
 
14
42
 
15
43
  @pytest.mark.local
@@ -38,6 +66,7 @@ def test_for_consistency(tests_path):
38
66
  'coverage',
39
67
  "pip",
40
68
  "jupyter-book",
69
+ "setuptools"
41
70
  ])
42
71
  # read conda.recipe/meta.yaml requirements
43
72
  meta_file = os.path.join(tests_path, '..', '..',
@@ -65,3 +94,16 @@ def test_for_consistency(tests_path):
65
94
  # confirm that extras in env (relative to run) equal the dev_pkgs set
66
95
  extras = env - run
67
96
  assert extras == dev_pkgs
97
+ # Read the setup.py file and extract the install_requires list
98
+ setup_file = os.path.join(tests_path, '..', '..',
99
+ 'setup.py')
100
+ with open(setup_file, 'r') as f:
101
+ setup_py_content = f.read()
102
+ setup = set(extract_install_requires(setup_py_content))
103
+ # confirm that setup.py
104
+ print("Setup packages = ", setup)
105
+ print("Meta packages = ", bld)
106
+ # if package in both, confirm that the version is the same
107
+ for pkg in setup.intersection(bld):
108
+ assert pkg in setup
109
+ assert pkg in bld
@@ -74,9 +74,9 @@ def test_make_calculator_with_policy_reform(cps_subsample):
74
74
  assert calc.current_year == year
75
75
  assert calc.policy_param('II_em') == 4000
76
76
  assert np.allclose(calc.policy_param('_II_em'),
77
- np.array([4000] * Policy.DEFAULT_NUM_YEARS))
77
+ np.array([4000] * pol.num_years))
78
78
  exp_STD_Aged = [[1600, 1300, 1300,
79
- 1600, 1600]] * Policy.DEFAULT_NUM_YEARS
79
+ 1600, 1600]] * pol.num_years
80
80
  assert np.allclose(calc.policy_param('_STD_Aged'),
81
81
  np.array(exp_STD_Aged))
82
82
  assert np.allclose(calc.policy_param('STD_Aged'),
@@ -100,10 +100,9 @@ def test_make_calculator_with_multiyear_reform(cps_subsample):
100
100
  # create a Calculator object using this policy-reform
101
101
  calc = Calculator(policy=pol, records=rec)
102
102
  # check that Policy object embedded in Calculator object is correct
103
- assert pol.num_years == Policy.DEFAULT_NUM_YEARS
104
103
  assert calc.current_year == year
105
104
  assert calc.policy_param('II_em') == 3950
106
- exp_II_em = [3900, 3950, 5000] + [6000] * (Policy.DEFAULT_NUM_YEARS - 3)
105
+ exp_II_em = [3900, 3950, 5000] + [6000] * (pol.num_years - 3)
107
106
  assert np.allclose(calc.policy_param('_II_em'),
108
107
  np.array(exp_II_em))
109
108
  calc.increment_year()
@@ -8,9 +8,8 @@ import copy
8
8
  from taxcalc import Policy, Records, Calculator, Consumption
9
9
 
10
10
 
11
- def test_year_consistency():
11
+ def test_start_year_consistency():
12
12
  assert Consumption.JSON_START_YEAR == Policy.JSON_START_YEAR
13
- assert Consumption.DEFAULT_NUM_YEARS == Policy.DEFAULT_NUM_YEARS
14
13
 
15
14
 
16
15
  def test_validity_of_consumption_vars_set():
@@ -31,23 +30,23 @@ def test_update_consumption():
31
30
  2015: 0.80}
32
31
  }
33
32
  consump.update_consumption(revision)
34
- expected_mpc_e20400 = np.full((Consumption.DEFAULT_NUM_YEARS,), 0.06)
33
+ expected_mpc_e20400 = np.full((consump.num_years,), 0.06)
35
34
  expected_mpc_e20400[0] = 0.0
36
35
  expected_mpc_e20400[1] = 0.05
37
36
  assert np.allclose(consump._MPC_e20400,
38
37
  expected_mpc_e20400,
39
38
  rtol=0.0)
40
39
  assert np.allclose(consump._MPC_e17500,
41
- np.zeros((Consumption.DEFAULT_NUM_YEARS,)),
40
+ np.zeros((consump.num_years,)),
42
41
  rtol=0.0)
43
- expected_ben_mcare_value = np.full((Consumption.DEFAULT_NUM_YEARS,), 0.80)
42
+ expected_ben_mcare_value = np.full((consump.num_years,), 0.80)
44
43
  expected_ben_mcare_value[0] = 1.0
45
44
  expected_ben_mcare_value[1] = 0.75
46
45
  assert np.allclose(consump._BEN_mcare_value,
47
46
  expected_ben_mcare_value,
48
47
  rtol=0.0)
49
48
  assert np.allclose(consump._BEN_snap_value,
50
- np.ones((Consumption.DEFAULT_NUM_YEARS,)),
49
+ np.ones((consump.num_years,)),
51
50
  rtol=0.0)
52
51
  consump.set_year(2015)
53
52
  assert consump.current_year == 2015