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

Forms api - add 21-4142 mappings #12405

Merged
merged 0 commits into from
Apr 17, 2023
Merged

Forms api - add 21-4142 mappings #12405

merged 0 commits into from
Apr 17, 2023

Conversation

gmrabian
Copy link
Contributor

@gmrabian gmrabian commented Apr 13, 2023

Forms API: adding ability to submit this form via the forms API. Follows similar pattern to other forms like 26-4555

Summary

  • Adds generated mapping and model files (updated with proper mappings)
  • Adds framework for custom stamps necessary for form
  • Add test fixture file with sample payload
  • Enable tests for this form

Related issue(s)

Testing done

  • Tested locally using frontend flow with different payloads. Verified with file generated in tmp/ folder

What areas of the site does it impact?

Form 21-4142 (non-prod)

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

@github-actions
Copy link

github-actions bot commented Apr 13, 2023

1 Warning
⚠️ This PR changes 239 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • modules/forms_api/app/controllers/forms_api/v1/uploads_controller.rb (+1/-0)

  • modules/forms_api/app/form_mappings/vba_21_4142.json.erb (+150/-0)

  • modules/forms_api/app/models/forms_api/vba_21_4142.rb (+30/-0)

  • modules/forms_api/app/services/forms_api/pdf_stamper.rb (+46/-9)

  • modules/forms_api/spec/requests/v1/uploads_spec.rb (+1/-0)

  • modules/forms_api/spec/services/pdf_filler_spec.rb (+2/-0)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to forms_api/21-4142/main/main April 13, 2023 23:01 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to master/main/forms_api/21-4142 April 14, 2023 13:34 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to forms_api/21-4142/main/main April 14, 2023 13:35 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to master/main/forms_api/21-4142 April 14, 2023 13:49 In progress
@va-vsp-bot va-vsp-bot requested a deployment to master/main/forms_api/21-4142 April 14, 2023 13:49 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to forms_api/21-4142/main/main April 14, 2023 13:53 Inactive
@gmrabian gmrabian marked this pull request as ready for review April 14, 2023 14:04
@gmrabian gmrabian requested review from a team as code owners April 14, 2023 14:04
@gmrabian
Copy link
Contributor Author

gmrabian commented Apr 14, 2023

Note: I'm aware this PR is large. The biggest file here is the .json.erb mapping file. It is merely mapping every PDF recognized field to the corresponding value in our data - hence it is large out of nature of the number of fields in the PDF.

I removed the associated tests to shrink the PR size. They will be added in a separate PR. This is a non-prod feature at the moment. You can see what they were in this commit. Let me know if it's ok to add them back here.

@ryan-mcneil
Copy link
Contributor

@gmrabian I was just about to ask about any associated tests, then read your comment 😆 . Personally I would always like to see tests included in the same PR as the respective code changes. And yes, I understand that at times the large diff is unavoidable, but acceptable in the case I think. I'd say pull that commit in here and we'll be good to go!

@va-vsp-bot va-vsp-bot requested a deployment to master/main/forms_api/21-4142 April 14, 2023 18:24 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to forms_api/21-4142/main/main April 14, 2023 18:27 Inactive
@gmrabian
Copy link
Contributor Author

@ryan-mcneil good call. thanks for your feedback! ready to go now 😎

@gmrabian gmrabian self-assigned this Apr 14, 2023
@gmrabian gmrabian enabled auto-merge (squash) April 14, 2023 18:52
@gmrabian gmrabian disabled auto-merge April 14, 2023 19:48
@va-vsp-bot va-vsp-bot requested a deployment to master/main/forms_api/21-4142 April 17, 2023 13:25 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to forms_api/21-4142/main/main April 17, 2023 13:26 Inactive
@gmrabian
Copy link
Contributor Author

@ryan-mcneil can i get a re-review here?

@va-vfs-bot va-vfs-bot temporarily deployed to forms_api/21-4142/main/main April 17, 2023 19:29 Inactive
@jeremy6d
Copy link
Contributor

@gmrabian I'm going to handle this re-review

@va-vsp-bot va-vsp-bot requested a deployment to master/main/forms_api/21-4142 April 17, 2023 20:41 In progress
@gmrabian gmrabian enabled auto-merge (squash) April 17, 2023 20:44
@gmrabian gmrabian merged commit c8379e9 into master Apr 17, 2023
@gmrabian gmrabian deleted the forms_api/21-4142 branch April 17, 2023 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants