Skip to content
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

Update eleven mask script to run on 2020 and 2021 #139841

Merged
merged 4 commits into from
Dec 3, 2024
Merged

Conversation

ntsummers1
Copy link
Collaborator

@ntsummers1 ntsummers1 commented Nov 25, 2024

Description

This ETL is a follow up to the <11 PR work and expands upon the removal of certain calculations in the print view as defined in this ticket. It goes through and adds the <11 mask to the 2021 and 2020 prior forms for all states for the exact same questions and removes a few calculations in sections 3 and 5. You can see a live before and after of running this script in the deployed environment here:

Screen.Recording.2024-10-16.at.11.08.03.AM.mov

Related ticket(s)


How to test

  • ./run local (To ensure a brand new, seeded database)
  • In a new terminal run DYNAMO_ENDPOINT=http://localhost:8000 dynamodb-admin after the local environment has fully spun up.
  • Navigate to localhost:8001 to see the local instance of dynamo.
  • Confirm that for the report AL-2021, Section 3c questions 2-4 that in the print view entering 5 still shows as 5.
  • In a new terminal, run DYNAMODB_URL="http://localhost:8000" dynamoPrefix="local" node services/database/scripts/add-less-than-eleven-mask.js
  • Reload the 2021 report
  • Navigate to Section 3c
  • See that question 2-4 in Part 5 still show your original answer of 5
  • Click the print button and then click print section at the bottom of the page
  • See that the questions answer now shows <11
  • The computed calculations will be hidden and no longer shown
  • Navigate to localhost:8001 to see the local instance of dynamo.
  • Confirm that for the report AL-2021, Section 3 that there there has been a mask added to that field.

Extra Credit

  • Logout and sign in as an admin ([email protected])
  • Open the 2021 report and navigate to Section 3c
  • See that all the fields also show <11 and computed values associated are hidden

Pre-review checklist

  • I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary
  • I have performed a self-review of my code
  • [] I have manually tested this PR in the deployed cloud environment

Pre-merge checklist

Review

  • Product: This work has been reviewed and approved by product owner, if necessary

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 24537 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 24547 lines exceeds the maximum allowed for the inline comments feature.

Copy link

codeclimate bot commented Nov 25, 2024

Code Climate has analyzed commit 0fbd482 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 81.1% (0.0% change).

View more on Code Climate.

@ntsummers1 ntsummers1 marked this pull request as ready for review November 26, 2024 14:33
@ntsummers1 ntsummers1 added the ready for review Ready for all the reviews! label Nov 26, 2024
@jessabean
Copy link

When I try to run the second Dynamo command I'm getting a node error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './protocols' is not defined by "exports" in /Users/jessatcoforma/Projects/macpro-mdct-carts/services/database/node_modules/@aws-sdk/client-dynamodb/node_modules/@smithy/core/package.json

But doing a yarn in the database service doesn't appear to fix it. Am I missing something else? :(

Copy link

@jessabean jessabean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 IT WORKS!

@ntsummers1
Copy link
Collaborator Author

In case anyone comes across this error in the future, a node_modules folder deletion + running ./yarn (both of these actions being in the database folder) cleared it up :D

@ntsummers1 ntsummers1 merged commit ae1742f into main Dec 3, 2024
21 checks passed
@ntsummers1 ntsummers1 deleted the eleven-mask-2020 branch December 3, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for all the reviews!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants