Say when the employer unemployment-tax total is an estimate, and keep the no-worker regression in its New Jersey test

未关闭 适合新手
#11,653 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, yaml
领域
databases, testing

调研方向

阅读 employer_total_state_unemployment_tax.py 和 nj_employer_state_unemployment_tax.yaml,尤其是所引用的 fixture 行附近的无员工情形。更新估算的措辞,并恢复雇主工资总额输入,同时保留所述预期;添加税率为零的改革情形,并在情形标题中明确说明七月的税率变更。完成标准是:文档描述了估算的两种条件,且 New Jersey 的情形能够捕获旧公式并覆盖调用路径。

由索引模型根据 Issue 内容生成。

描述

Agent-written for Max, by Claude Code for Max Ghenis.

The last review of #10700 approved it at 8c92c28b and left two follow-ups.

1. Documentation

employer_total_state_unemployment_tax applies one worker's effective rate to the employer's taxable wages. Its documentation says the total is an estimate when workers' wages differ (variable). It is also an estimate when worker wages are missing and the rate changes during the year, even for one worker.

In New Jersey in 2022, one worker paid $100,000 evenly owes $1,067.635: $25,000 taxed in Q1 and $14,800 in Q2 at 2.6825%. With worker wages left out, the total uses the average of the four quarterly rates, 2.8325%, and gives $1,127.335 on $39,800.

Proposed: say the total is an estimate whenever the rate changes during the year and the worker profile is missing or unrepresentative.

2. Test

In nj_employer_state_unemployment_tax.yaml, the no-worker row leaves out the $100,000 employer gross wages that the case had before (fixture). Without that input, the old and new formulas both give $1,127.335, so the row cannot catch a return to the old formula.

Proposed:

  • Restore employer_total_payroll_tax_gross_wages: 100_000 in that row and keep the $1,127.335 expectation; the old formula gave $1,067.635.
  • Add a reform that sets the effective rate to zero, to test the caller path next to the supplied-zero case.
  • Name the July rate change in the case title: the $60,000 row taxes $9,800 in Q3 at the higher rate.
主要语言
Python
星标
178
派生
224
平均合并
3 天 13 小时
30 天内合并 PR
309

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/policyengine-us 的其他 Issue

查看 PolicyEngine/policyengine-us 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。