Skip to content

Commit b807454

Browse files
anth-volkclaude
andcommitted
Fix parameter path indexing and add PostCSS configuration
- Fix federal bracket rates to use 1-indexed keys (range(1,8)) matching YAML - Add .amount sub-key to EITC max bracket scale paths - Add .rate sub-key to VA income tax rate bracket scale paths - Add postcss.config.mjs with @tailwindcss/postcss plugin (required for Tailwind v4) - Add @tailwindcss/postcss and postcss as devDependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2eccb4b commit b807454

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

backend/simulation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ class StatewideImpactRequest(BaseModel):
7777
"head_of_household": "HEAD_OF_HOUSEHOLD",
7878
}
7979

80-
# Federal income tax bracket rate parameter paths (7 brackets, 1-indexed)
80+
# Federal income tax bracket rate parameter paths (7 brackets, 1-indexed keys in YAML)
8181
FEDERAL_BRACKET_RATE_PATHS = [
82-
f"gov.irs.income.bracket.rates[{i}]" for i in range(7)
82+
f"gov.irs.income.bracket.rates[{i}]" for i in range(1, 8)
8383
]
8484

8585
# Federal CTC parameter paths
@@ -88,14 +88,14 @@ class StatewideImpactRequest(BaseModel):
8888
FEDERAL_CTC_REFUNDABLE_MAX_PATH = "gov.irs.credits.ctc.refundable.individual_max"
8989
FEDERAL_CTC_FULLY_REFUNDABLE_PATH = "gov.irs.credits.ctc.refundable.fully_refundable"
9090

91-
# Federal EITC max parameter paths (indexed by number of children: 0, 1, 2, 3)
91+
# Federal EITC max parameter paths (bracket scale, 0-indexed, needs .amount sub-key)
9292
FEDERAL_EITC_MAX_PATHS = [
93-
f"gov.irs.credits.eitc.max[{i}]" for i in range(4)
93+
f"gov.irs.credits.eitc.max[{i}].amount" for i in range(4)
9494
]
9595

96-
# Virginia income tax rate parameter paths (4 brackets, 0-indexed)
96+
# Virginia income tax rate parameter paths (bracket scale, 0-indexed, needs .rate sub-key)
9797
VA_RATE_PATHS = [
98-
f"gov.states.va.tax.income.rates[{i}]" for i in range(4)
98+
f"gov.states.va.tax.income.rates[{i}].rate" for i in range(4)
9999
]
100100

101101
# Virginia standard deduction

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
"tailwindcss": "^4"
1919
},
2020
"devDependencies": {
21+
"@tailwindcss/postcss": "^4.2.1",
2122
"@testing-library/jest-dom": "^6",
2223
"@testing-library/react": "^16",
2324
"@types/node": "^22",
2425
"@types/react": "^19",
2526
"@types/react-dom": "^19",
2627
"@vitejs/plugin-react": "4.3.4",
2728
"jsdom": "^25",
29+
"postcss": "^8.5.8",
2830
"typescript": "^5",
2931
"vitest": "^2"
3032
}

postcss.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
plugins: {
3+
"@tailwindcss/postcss": {},
4+
},
5+
};

0 commit comments

Comments
 (0)