-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start supporting multi-valued "items" field #156
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Description In preparation for rolling out more granular `item` values for things like heat pumps and weatherization, incentives will need to support multiple values items. This change starts reading from a new array-valued `items` field if it's available. Next step will be to deploy a backend change that adds the multi-valued field to responses. Then, remove `item` from the frontend. Then, remove `item` from the backend. https://app.asana.com/0/1206661332626418/1206911030685282 ## Test Plan Running calculations against a local backend that has the `items` change applied succeeds; Cypress tests pass in that state.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
oyamauchi
added a commit
to rewiringamerica/api.rewiringamerica.org
that referenced
this pull request
Apr 25, 2024
## Description This is the beginning of the process of adding more granular item types for heat pumps and weatherization. Individual incentives will now pertain to multiple `Item`s. The process will be: 1. Land and deploy this 2. Land and deploy rewiringamerica/embed.rewiringamerica.org#156 3. Land and deploy a PEP PR which is yet to come, similar to the embed one above (read from new field if available; fall back to existing one if not) 4. Update the backend to stop including the old single-valued field in responses. 5. Remove the support for the old field from the embed and PEP code 6. Start updating the underlying data, this getting rid of the "synthesize `items`" bit from this PR. I decided to ditch the human-friendly `name`. It was a holdover from v0, in which it was used to populate the table UIs of the old IRA and embed calculators. It's too frontend-coupled to make total sense in v1, and neither PEP nor the new embed calculator use it, so it's gone. Throughout this I don't expect to proactively inform any external API clients of the changes, and certainly not to block on them. I believe anyone we've given v1 to has been warned that v1 will break without notice. ## Test Plan `yarn test` with updated fixtures. Tested the embed frontend from the above PR against this state running locally.
oyamauchi
added a commit
to rewiringamerica/api.rewiringamerica.org
that referenced
this pull request
Apr 29, 2024
## Description This is the beginning of the process of adding more granular item types for heat pumps and weatherization. Individual incentives will now pertain to multiple `Item`s. The process will be: 1. Land and deploy this 2. Land and deploy rewiringamerica/embed.rewiringamerica.org#156 3. Land and deploy a PEP PR which is yet to come, similar to the embed one above (read from new field if available; fall back to existing one if not) 4. Update the backend to stop including the old single-valued field in responses. 5. Remove the support for the old field from the embed and PEP code 6. Start updating the underlying data, this getting rid of the "synthesize `items`" bit from this PR. I decided to ditch the human-friendly `name`. It was a holdover from v0, in which it was used to populate the table UIs of the old IRA and embed calculators. It's too frontend-coupled to make total sense in v1, and neither PEP nor the new embed calculator use it, so it's gone. Throughout this I don't expect to proactively inform any external API clients of the changes, and certainly not to block on them. I believe anyone we've given v1 to has been warned that v1 will break without notice. ## Test Plan `yarn test` with updated fixtures. Tested the embed frontend from the above PR against this state running locally.
oyamauchi
added a commit
to rewiringamerica/api.rewiringamerica.org
that referenced
this pull request
Apr 29, 2024
## Description This is the beginning of the process of adding more granular item types for heat pumps and weatherization. Individual incentives will now pertain to multiple `Item`s. The process will be: 1. Land and deploy this 2. Land and deploy rewiringamerica/embed.rewiringamerica.org#156 3. Land and deploy a PEP PR which is yet to come, similar to the embed one above (read from new field if available; fall back to existing one if not) 4. Update the backend to stop including the old single-valued field in responses. 5. Remove the support for the old field from the embed and PEP code 6. Start updating the underlying data, this getting rid of the "synthesize `items`" bit from this PR. I decided to ditch the human-friendly `name`. It was a holdover from v0, in which it was used to populate the table UIs of the old IRA and embed calculators. It's too frontend-coupled to make total sense in v1, and neither PEP nor the new embed calculator use it, so it's gone. Throughout this I don't expect to proactively inform any external API clients of the changes, and certainly not to block on them. I believe anyone we've given v1 to has been warned that v1 will break without notice. ## Test Plan `yarn test` with updated fixtures. Tested the embed frontend from the above PR against this state running locally.
matelau
approved these changes
Apr 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In preparation for rolling out more granular
item
values for thingslike heat pumps and weatherization, incentives will need to support
multiple values items. This change starts reading from a new
array-valued
items
field if it's available.Next step will be to deploy a backend change that adds the
multi-valued field to responses. Then, remove
item
from thefrontend. Then, remove
item
from the backend.https://app.asana.com/0/1206661332626418/1206911030685282
Test Plan
Running calculations against a local backend that has the
items
change applied succeeds; Cypress tests pass in that state.