At this point we should be treating states, DC, and territories as
equivalent by default. There are a couple of exceptions:
The territories are listed separately because the tax calculation
needs to special-case them as zero federal income tax.
States plus DC are listed separately because two data files
(ira_state_savings and solar_prices) only have entries for states
and DC. The former is only relevant for v0, and the latter is only
used to estimate solar system cost (and the result is not surfaced
anywhere in our current frontends), so it doesn't seem worth the
effort to try to fill in the equivalent data for the territories.
Those are the only uses of STATES_PLUS_DC remaining.
While I'm at it, change the /v1/states endpoint spec to not list out
all the states explicitly. Instead, explain in the description what
the keys are, and just document the { status: "..." } struct once.
Description
At this point we should be treating states, DC, and territories as equivalent by default. There are a couple of exceptions:
The territories are listed separately because the tax calculation needs to special-case them as zero federal income tax.
States plus DC are listed separately because two data files (ira_state_savings and solar_prices) only have entries for states and DC. The former is only relevant for v0, and the latter is only used to estimate solar system cost (and the result is not surfaced anywhere in our current frontends), so it doesn't seem worth the effort to try to fill in the equivalent data for the territories. Those are the only uses of
STATES_PLUS_DC
remaining.While I'm at it, change the
/v1/states
endpoint spec to not list out all the states explicitly. Instead, explain in the description what the keys are, and just document the{ status: "..." }
struct once.Test Plan
yarn test
.