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

add case aggregates to submission history #2627

Conversation

jtimpe
Copy link

@jtimpe jtimpe commented Jul 24, 2023

Summary of Changes

Pull request closes #1612

How to Test

cd tdrs-backend && docker-compose up
cd tdrs-frontend && docker-compose up --build
  1. Open http://localhost:3000/ and sign in.
  2. Submit multiple data files in different submissions to section 1; include valid and invalid files
  3. Navigate to the Submission History tab and inspect the created tables

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

  • [insert ACs here]
  • lfrohlich and/or adpennington confirmed that ACs are met.

Deliverable 2: Tested Code

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces backend code changes, are they meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested?
  • Are code coverage minimums met?
    • Frontend coverage: [insert coverage %] (see CodeCov Report comment in PR)
    • Backend coverage: [insert coverage %] (see CodeCov Report comment in PR)

Deliverable 3: Properly Styled Code

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?
  • Are code maintainability principles being followed?

Deliverable 4: Accessible

  • Does this PR complete the epic?
  • Are links included to any other gov-approved PRs associated with epic?
  • Does PR include documentation for Raft's a11y review?
  • Did automated and manual testing with iamjolly and ttran-hub using Accessibility Insights reveal any errors introduced in this PR?

Deliverable 5: Deployed

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

  • Does this PR provide background for why coding decisions were made?
  • If this PR introduces backend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces frontend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces dependencies, are their licenses documented?
  • Can reviewer explain and take ownership of these elements presented in this code review?

Deliverable 7: Secure

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any new security issues?
  • If new issues detected, is investigation and/or remediation plan documented?

Deliverable 8: User Research

Research product(s) clearly articulate(s):

  • the purpose of the research
  • methods used to conduct the research
  • who participated in the research
  • what was tested and how
  • impact of research on TDP
  • (if applicable) final design mockups produced for TDP development

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #2627 (1e20abb) into feature/1610-frontend-parsing-status (f83c019) will decrease coverage by 0.96%.
Report is 55 commits behind head on feature/1610-frontend-parsing-status.
The diff coverage is 94.55%.

Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                            @@
##           feature/1610-frontend-parsing-status    #2627      +/-   ##
========================================================================
- Coverage                                 93.59%   92.64%   -0.96%     
========================================================================
  Files                                        44      239     +195     
  Lines                                       921     5299    +4378     
  Branches                                    145      469     +324     
========================================================================
+ Hits                                        862     4909    +4047     
- Misses                                       32      297     +265     
- Partials                                     27       93      +66     
Flag Coverage Δ
dev-backend 92.51% <95.40%> (?)
dev-frontend 93.20% <81.08%> (-0.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
tdrs-backend/tdpservice/core/logger.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/data_files/serializers.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/data_files/views.py 90.65% <100.00%> (ø)
tdrs-backend/tdpservice/email/email.py 76.78% <100.00%> (ø)
...vice/email/helpers/account_deactivation_warning.py 100.00% <100.00%> (ø)
...backend/tdpservice/email/helpers/account_status.py 84.84% <100.00%> (ø)
tdrs-backend/tdpservice/email/helpers/data_file.py 100.00% <100.00%> (ø)
...rs/migrations/0002_alter_parsererror_error_type.py 100.00% <ø> (ø)
...vice/parsers/migrations/0006_auto_20230810_1500.py 100.00% <ø> (ø)
...service/parsers/migrations/0007_datafilesummary.py 100.00% <100.00%> (ø)
... and 38 more

... and 150 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f83c019...1e20abb. Read the comment docs.

jtimpe and others added 28 commits July 31, 2023 15:36
* Updating to latest stable version

* Update manifest.buildpack.yml

* Update buildpack-changelog.md

---------

Co-authored-by: andrew-jameson <[email protected]>
…endpoint to be tested from the global exclude list (#2659)

Co-authored-by: George Hudson <[email protected]>
Co-authored-by: Andrew <[email protected]>
* add sendgrid lib

* update settings

* sendgrid sandbox off

* use sendgrid backend for send

* lint

* adds api key to local

* re-enable task

* temporarily comment

* update from address

* remove comments and unused shared_task

* use automated_email synchronously

* fix tests

* test name

* rm old vars

* use new sendgrid api lib

* add + impl custom email backend

* update tests to be synchronous

* rm local email config

* fix lint

* update local compose
* updated deadline in docs

* updated deadline for aug on homepage
* added the logic for uploading the file

* uploading file

* upload test with sucess message

* Update accounts.js

* Update accounts.js linting

* separating the file_upload
* add the required Referer header

* improve stt lookup reliability

---------

Co-authored-by: Andrew <[email protected]>
* first commit

* - add cat3 validator for t1

* - Added cat3 validators for T1

* - Added test class for cat3 validators

* - Updated test to validate all branches in validators

* - Fixed lint errors

* - updating num expected errors

* added cross complex validators

* - Added remainign cat3 validators
- Added test for validators

* added validations

* Corrected fields and validations

* t1 changes

* adedd all T1 validations

* T1 validations finished

* T2 validators still missing two

* linting

* - Updated validator logic
- added cat3 t3 validators
- added new validators

* - Updated validator logic

* - Fixed lint errors
- Fixed validator logic
- updated tests to use new validator format
- Updated schemas to use correct validators

* - Updated model field to correct type
- Updated tests per validation changes

* - removed unnecessary prints

* - Fix lint errors

* validated against excel file

* corrections on validators

* linting

* unit tests

* correct isBlank

* correction on cross validations

* added cross valitors and applied corrections

* linting

* changed if_then validator to correct the logic

* corrections a test

* added missing validators for t3 child one

* added migration to e2e job

* - Resolving type issues
- Most validators updated

* - Updating remaining validators

* - Updated field types
- FIxed failing tests/validators

* - Resolved conflicts/test issues

* - Fixing validators

* - Updated validators to respect field changes

* - updating validator tests

* - Fix lint errors

* Update jobs.yml

corrected backend directory name

* SSN refactor notOneOf

* - Updated based on review comments

* - Updated based on review comments

* - Fix lint errors

* - Removing accidental file commit

* requested change & added extention 2 or validator

* - Fix lint errors

* - fixing randomness of test

* added missing 9 in the ranges for SSN

* leading zeros for ZIP_CODE

* - Resolved bug causing missing parser errors
- Updated tests to reflect record index

* correction on isInLimits validator

* Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py

Co-authored-by: Alex P.  <[email protected]>

* Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py

Co-authored-by: Alex P.  <[email protected]>

* Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py

Co-authored-by: Alex P.  <[email protected]>

---------

Co-authored-by: elipe17 <[email protected]>
Co-authored-by: andrew-jameson <[email protected]>
Co-authored-by: msohanifr <[email protected]>
Co-authored-by: Alex P. <[email protected]>
* sendgrid adr

* update name

* update adr title

* Update docs/Technical-Documentation/Architecture-Decision-Record/021-sendgrid.md

Co-authored-by: Alex P.  <[email protected]>

* Apply suggestions from code review

Co-authored-by: Alex P.  <[email protected]>

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: Alex P. <[email protected]>
* - ADding t2 schema

* - small fixes to naming
- added t2.py
- Updating var names to match field names

* - Added new doc for T2
- Updated model fo rT2
- Added active parse function

* - Added T3 schema defs

* - Fixing most lint errors

* - Updated T3 to multirow record

* - Added unit test and data files
- updated field names

* - Updating var names to conform to DB max var name length

* - Updating based on unit test failure

* - adding datafile

* - Adding unit tests for t2 and t3

* - Fixed field types
- Updated test file

* - Removing many migrations to consolodate into one migration

* Revert "- Removing many migrations to consolodate into one migration"

This reverts commit 1455ae4.

* - Resolved test issues after merge

* - Resolve lint errors

* - Merged 1113.2

* - Removed unnecessary file

* - Rename model fields
- Combined migrations

* - fixed spelling in test

* - Fixed lint errors

* rm commented validators

* - Updated schema newlines to be consistent

* - Updated field names
- Updated tests
- Updated migration

* - consolodating migrations

* - Updated readme and backup script

* - Updated parse logic to batch create records

* - Fixed lint errors

* - Batching record serialization

* - Updated parse logic

* - Adding big s1 datafile

* - fixing lint errors

* - Removing test to see if its causing weird failure

* - Updating based on comments
- Removing big file since circi cant handle it

* - fixing error in update method

* - fixing error in update

* - Removed extraneous seek

* - updating ignore to ignore patch files

* - Made evaluate_trailer pure/immutable

* Revert "- Removing test to see if its causing weird failure"

This reverts commit 64b78b7.

* - Use custom transactions while parsing
- Handle transaction rollback on parse failure/error
- Update tests to use transaction logic
- Created new decorator to rollback database when assertion error is hit
- Making elastic search log level configurable
- Added test for inter parse rollback

* - updated store logic to one liner
- updated decorator to catch all exceptions
- updated tests

* - removed function
- renamed test

* - refactored multirecord schema to be a schema manager instead
- updated parse functions to use the new layout
- updated bulk create to manage batch size

* - Name update for clarity

* - Fix lint errors

* - Changing batch size to avoid crash in circi

* - Updated based on review
- Updated tests to reflect line number

* - Updated based on review/OH
- Added extra transaction safety

* - Updated view to show latest datafiles
- Added admin filter to show newest or all datafile records
- Updated indices to allow easier elastic queries

* - Updated based on review  comments

* - Updated based on feedback for preparse error handling
- updated tests

* - Updated search indices to have parent FK

* - Fix lint errors

* - Updated submission tests
- Moved create_datafile to util

* - fix lint errors

* - removing frontend filtering

* - addding datafile to admin model

* Revert "- addding datafile to admin model"

This reverts commit 35a6f24.

* - Fixed issue where datafile FK wasnt populating
- Regenerated migration

* - Readding datafile back to admin view now that the error is resolved

* - adding datafile back

* Revert "- Readding datafile back to admin view now that the error is resolved"

This reverts commit 2807425.

* - Removed unnecessary fields
- Updated dependencies
- Updated filter

* - Updated document to include required fields

* - Moved datafile reference to avoid confusion

* - Updating based on comments.
- Added base class to keep things a little more DRY

* - Refactored parsing to avoid custom transactions by leveraging the FK on the records. Rollbacks are a lot slower now, but hopefully that will happen much less versus successful parses.

* - small optimization for the rollback

* - Fix lint errors

* - Removing commented code

* - Installing build essentials

* Revert "- Installing build essentials"

This reverts commit 782a5f7.

* - adding setup tools and wheel

* Revert "- adding setup tools and wheel"

This reverts commit f529728.

* - Updating dependencies to get around pep issue

* - Pin factoryboy
- fix lint error

* - Updating manifest

* - Added EncryptedField class
- Updated schema's
- Updated datafiles since all are encrypted

* - Fix lint errors

* - Added decryption for ssp

* - Making the encrypted check stronger

* - Added section two models, schemas, and an initial test

* - Allowing fields to be nullable

* - add missing field

* - Consolodating migrations

* - Consolodate migration
- Add tests

* - Added encrypted field

* - Refactored fields and rowschema into seperate files
- Updated encrypted field to take decryption function

* - fix lint errors

* - Fixed file spacing

* - fix imports
- fix lint errors

* - Fix import error

* - Fix failing test

* - Revert erroneous change

* - Updating item numbers

* - Fixed item numbers

* - Updating to accomodate item number as string

* - Removed erroneous update that was causing error
- Fixed whitespace in datafiles

* - White space error

* - Resolved error

* - Fixing test

* - fix lint errors

* - Added field validators for T4/T5

* - Added cat3 validators

* - Resolve lint and unit test errors

* - small optimization to validator

* - Added tests for cat3 validators for T5 record

* - Fix lint errors

* - updated fields to correct types

* - update race/ethnicity

* - updated tests post merge
- added check in make_validator to just return false if the value is None

* - Updated based on review feedback

* - Fix lint error

* - Updating to the correct types

* - Resolve conflicts

* - Moving field updates to seperate migration to see if they take place

* Revert "- Moving field updates to seperate migration to see if they take place"

This reverts commit a3214f2.

* - Revert migration 15 to original state
- Generate new migration for field alterations

* - Merged base branch and updated tests/factories

* - Fixed test

* - Fixed field names to correspond to model

* - Remove duplicate function
- Update ssn validator
- Removed asserts with large number of parse errors

* - Remove print statemtnt

* - Resolved filter issue that made it seem like records werent being created
- Added filter to remaining records

* - fix lint errors

* - correct form merge conflict

* - Added specific validators to avoid duplication
- Updated naming of validators

* TANF Section 3 Parsing/Validation (#2649)

* - Updated to support parsing section 3 data

* - Added validators and tests for T6 record

* - resolve lint errors

* - Quick rename

* - Update fields in test

* - Fixed conflict

* - Fix error from merge conflict

* - Updated to create RPT_MONTH_YEAR from CALENDAR_QUARTER
- Updated tests

* - Added new validators for field change

* - Remove debug code

* - Genericize TransformField
- Update all schemas to use TransformField
- Move transforms to seperate file
- Fix lint errors

* - put kwargs in correct spot

* - Very minor change to avoid setting field unnecessarily on all TransformFields

* - Updated validator to call out name of field versus the value
- Updated tests

* - Fix lint

* - Calling super to avoid duplicate code

* - Added validators for transformed field

* - Updating based on merge

* - Fixed remaining merge conflicts

* - Fix lint errors

* - update error messages based on validator updates

* - Corrected validator

* - Resolved bug causing file to think it was encrytped after multiple submissions and changing the encryption header in between submissions

* - Made case number validators consistent

* - Converging validators between sections

* - Updating based on review comments

* - Fix paren error

* - Removed extra dot

* - Updating validator

* - updating race conditional validators

* - corrected validator

---------

Co-authored-by: Jan Timpe <[email protected]>
Co-authored-by: Alex P <[email protected]>
* let's try diff orb versions

* Update base_config.yml
@ADPennington ADPennington added the Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI label Sep 22, 2023
jtimpe and others added 8 commits September 25, 2023 11:31
* saving state real quick

* finishing merge with latest

* Missed old test script

* Added new test, more cleanup

* Updating unit tests in DFS, preparing for 1610

* Merging in Jan's 1610 code for parserError useful-ness

* Revert "Merging in Jan's 1610 code for parserError useful-ness"

This reverts commit c5796da.

* update to test to use dfs fixture

* saving state before new 1610 merge

* Resolving merge conflicts with 1610.

* Linting changes and comparing to 1610

* Some unit test linting but inherited 1610 issues

* Re-ordering job to run tests vs lint first.

* Updates to linting and unit tests.

* Fixing linting.

* Update tdrs-backend/setup.cfg

* updates per PR.

* Excluding trailers for rejection

* VSCode merge resolution is garbage.

* Fixing precheck for not implemented types

* Updating to error-handle not implemented schema types

* - Updated view to show latest datafiles
- Added admin filter to show newest or all datafile records
- Updated indices to allow easier elastic queries

* - Updated search indices to have parent FK

* - Fix lint errors

* - Updated submission tests
- Moved create_datafile to util

* - fix lint errors

* - removing frontend filtering

* - addding datafile to admin model

* Revert "- addding datafile to admin model"

This reverts commit 35a6f24.

* - Fixed issue where datafile FK wasnt populating
- Regenerated migration

* - Readding datafile back to admin view now that the error is resolved

* - adding datafile back

* Revert "- Readding datafile back to admin view now that the error is resolved"

This reverts commit 2807425.

* - Removed unnecessary fields
- Updated dependencies
- Updated filter

* - Updated document to include required fields

* - Fixed failing test

* add adminUrl to deployment cypress overrides

* Adding "beta" banners to relevant error report sections (#2522)

* Update views.py

* Update views.py

* Update SubmissionHistory.jsx

* Update SubmissionHistory.test.js

* Apply suggestions from code review

Co-authored-by: Miles Reiter <[email protected]>

* lint fixes

---------

Co-authored-by: Miles Reiter <[email protected]>
Co-authored-by: Alex P <[email protected]>
Co-authored-by: andrew-jameson <[email protected]>

* Create sprint-73-summary.md (#2565)

* hotfix for large file sizes (#2542)

* hotfix for large file sizes

* apply timeouts/req limits to dev

* filter identity pages from scan

* IGNORE sql injection

---------

Co-authored-by: Jan Timpe <[email protected]>
Co-authored-by: mo sohani <[email protected]>
Co-authored-by: Alex P <[email protected]>

* updating validation error language

* accidentally included coding challenge

* rm comments

* 2550 deactivation email link (#2557)

* - updated nginx buildpack

* - specifying different nginx version

* - Updating changelog

* - added script to update certain apps in cf
- added workflow for each environment in circi

* - fixed base config

* - fixing jobs

* - Updated based on feedback in OH

* - Updating defaults

* - Removing defaults

* - Fixing indent

* - Adding params to config

* test

* test

* - updating work dir

* - Adding checkout

* - adding cf check

* - logging into cf

* - update cf check to install required binary

* - removing unnecessary switch

* - Forcing plugin installation

* - test installing plugin from script also

* - Adding url to email

* - test code for sandbox

* - using my email

* Revert "Merge branch 'update-cf-os' into 2551-deactivation-email-link"

This reverts commit e963b9d, reversing
changes made to cc9cf81.

* Revert "- using my email"

This reverts commit cc9cf81.

* Revert "- test code for sandbox"

This reverts commit 0603774.

---------

Co-authored-by: Alex P <[email protected]>
Co-authored-by: Andrew <[email protected]>

* Update README.md (#2577)

Add ATO

Co-authored-by: Andrew <[email protected]>

* Create 2023, Spring - Testing CSV & Excel-based error reports.md

* Update README.md

* Updating deliverable links (#2584)

* User viewset not returning/duplicating users (#2573)

* - Fixed issue not allowing pagination to work locally with nginx
- Added ordering to user field to fix duplicates issue

* - fix lint error

* - Removing ID check since we cannot guarantee that the uuid that is generated per test run will be lexigraphically consistent

---------

Co-authored-by: Alex P <[email protected]>
Co-authored-by: Andrew <[email protected]>

* Update cf os (#2523)

* - updated nginx buildpack

* - specifying different nginx version

* - Updating changelog

* - added script to update certain apps in cf
- added workflow for each environment in circi

* - fixed base config

* - fixing jobs

* - Updated based on feedback in OH

* - Updating defaults

* - Removing defaults

* - Fixing indent

* - Adding params to config

* test

* test

* - updating work dir

* - Adding checkout

* - adding cf check

* - logging into cf

* - update cf check to install required binary

* - removing unnecessary switch

* - Forcing plugin installation

* - test installing plugin from script also

* - Adding new dependencies

* - adding package

* - fixing broken install

* - fixing libs

* - using correct command

* - gettign correct version of libc

* - trying to upgrade libs

* - testing

* - Updated README and script

* Revert "- Updated README and script"

This reverts commit 92697b3.

* - Removed unnecessary circi stuff
- Removed script
- Updated docs to callout updating secondary apps

* - Correct spelling error

---------

Co-authored-by: Andrew <[email protected]>

* Item Number Mismatch (#2578)

* - Updated schemas and models to reflect correct item numbers of fields

* - Revert migration

* - Updated header/trailer item numbers

* - Fixed item numbers off by one errors

---------

Co-authored-by: Andrew <[email protected]>

* pipeline filtering (#2538)

* pipeline changes that filter based on paths and branches. circle ci tracks specified branches in order to keep current functionality on HHS side.

* updated syntax to be in line with build-all.yml

* removed comma

* WIP build flow docs

* added Architecture Decision Record for the change to pipeline workflows

* corrected file type of doc to .md

---------

Co-authored-by: George Hudson <[email protected]>
Co-authored-by: Andrew <[email protected]>

* Hotfix Devops/2457 path filtering for documentation (#2597)

* pipeline changes that filter based on paths and branches. circle ci tracks specified branches in order to keep current functionality on HHS side.

* updated syntax to be in line with build-all.yml

* removed comma

* WIP build flow docs

* added Architecture Decision Record for the change to pipeline workflows

* corrected file type of doc to .md

* build and test all on PRs even for documentation

---------

Co-authored-by: George Hudson <[email protected]>

* Create sprint-74-summary.md (#2596)

Co-authored-by: Andrew <[email protected]>

* added URL filters (#2580)

* added URL filters

* allow github to trigger owasp and label deploys (#2601)

Co-authored-by: George Hudson <[email protected]>

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: George Hudson <[email protected]>
Co-authored-by: George Hudson <[email protected]>

* Create sprint-75-summary.md (#2608)

* Create sprint-76-summary.md (#2609)

Co-authored-by: Andrew <[email protected]>

* - Resolved failing tests

* - Corrected merge thrash

* - Using randbits to generate pk to get around confilcting sequence pks

* Revert "- Using randbits to generate pk to get around confilcting sequence pks"

This reverts commit ac9b065.

* - Updating region in fixture instead of factory
- letting django handle transaction for test

* - Moved datafile reference to avoid confusion

* pushing up incomplete codebase

* Other unit tests now have passed w/ good error handling

* Working tests, need to get setup for case aggregates populating via DB

* - Updated queries
- Added helper function
- Need to merge in 2579 for queries to work

* minor improvement to month2int

* - Fixing most merge errors

* - Fixing functions

* - Updated queries based on generic relation

* - Updated queries to count by case number instead of record number

* - Added route
- Updated task to create dfs

* - updated tests to include dfs

* Cleaning up most comments that are no longer necessary and fixed lint issues.

* making minor updates, still broken tests.

* updating pipfile.lock and rebuild image resolved test issues

* Reorganizing tests, still failing in test_parse.py

* deleted summary file, split into other test scripts.

* Fixed missing self reference.

* Linting fixes.

* Found reference failure in deployed env.

* Removing extra returns for missing record type.

* lint fix

* Addressed invocation of datafile for failing test

* lint update for whitespace

* Intermediary commit, broken test

* new assignemnts in util

* - updated rejected query to correctly count objs

* - Fixing most tests

* - Fixed user error. Swapped numbers by accident.

* - make region None to avoid PK collision

* - Fix lint errors

* - Updating to avoid warning

* vscode merge conflict resolution (#2623)

* auto-create the external network

* didn't stage commit properly

* checking diffs, matching 1613.2

* doesn't work in pipeline. must be cached local

* re-commenting in unit test

* lint failures fixed

---------

Co-authored-by: andrew-jameson <[email protected]>

* url change per me, want pipeline to run e2e

* Upgraded to querysets, fix PR comments, PE str

* missing : not caught locally

* Feat/1613 merge 2 (#2650)

* Create sprint-78-summary.md (#2645)

* Missing/unsaved parser_error for record_type

* removing redundant tests

* Hopefully resolved on unit tests and lint

---------

Co-authored-by: Smithh-Co <[email protected]>
Co-authored-by: andrew-jameson <[email protected]>

* icontains

* tests

* Changing dict structure per 1612.

* fixed tests and lint issues, parse is too complex

* schema_manager replaces schema check

* Saving state prior to merge-conflict.

* Adopting latest manager, removing old error style.

* Commented out t6 line during Office hours

* minor reference update

* Acclimating to schemaManager

* lint-fix isinstance

* syntax mistake with isinstance

* Apply suggestions from code review

* reverting search_index merge artifacts.

* adjusting for removing unused "get-schema()"

* whitespace lint

* Feedback from Jan

* Ensuring tests run/work.

* Ensure we have leading zero in rptmonthyear.

* Minor lint fix for exception logging

* resolving merge conflict problems

* fixing tests from merge conflicts.

* dumb lint fix

* reducing line length for lint

* Moving DFS migration into it's own file to avoid conflicts.

---------

Co-authored-by: andrew-jameson <[email protected]>
Co-authored-by: elipe17 <[email protected]>
Co-authored-by: Jan Timpe <[email protected]>
Co-authored-by: Miles Reiter <[email protected]>
Co-authored-by: Alex P <[email protected]>
Co-authored-by: Smithh-Co <[email protected]>
Co-authored-by: mo sohani <[email protected]>
Co-authored-by: Eric Lipe <[email protected]>
Co-authored-by: Lauren Frohlich <[email protected]>
Co-authored-by: Miles Reiter <[email protected]>
Co-authored-by: George Hudson <[email protected]>
Co-authored-by: George Hudson <[email protected]>
Co-authored-by: raftmsohani <[email protected]>
* added md file for dropping DB

* added section for db_backup & merged into README

* Update CloudFoundry-DB-Connection.md

---------

Co-authored-by: Andrew <[email protected]>
@ADPennington ADPennington removed the Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI label Sep 29, 2023
ADPennington and others added 6 commits September 29, 2023 10:23
* - ADding t2 schema

* - small fixes to naming
- added t2.py
- Updating var names to match field names

* - Added new doc for T2
- Updated model fo rT2
- Added active parse function

* - Added T3 schema defs

* - Fixing most lint errors

* - Updated T3 to multirow record

* - Added unit test and data files
- updated field names

* - Updating var names to conform to DB max var name length

* - Updating based on unit test failure

* - adding datafile

* - Adding unit tests for t2 and t3

* - Fixed field types
- Updated test file

* - Removing many migrations to consolodate into one migration

* Revert "- Removing many migrations to consolodate into one migration"

This reverts commit 1455ae4.

* - Resolved test issues after merge

* - Resolve lint errors

* - Merged 1113.2

* - Removed unnecessary file

* - Rename model fields
- Combined migrations

* - fixed spelling in test

* - Fixed lint errors

* rm commented validators

* - Updated schema newlines to be consistent

* - Updated field names
- Updated tests
- Updated migration

* - consolodating migrations

* - Updated readme and backup script

* - Updated parse logic to batch create records

* - Fixed lint errors

* - Batching record serialization

* - Updated parse logic

* - Adding big s1 datafile

* - fixing lint errors

* - Removing test to see if its causing weird failure

* - Updating based on comments
- Removing big file since circi cant handle it

* - fixing error in update method

* - fixing error in update

* - Removed extraneous seek

* - updating ignore to ignore patch files

* - Made evaluate_trailer pure/immutable

* Revert "- Removing test to see if its causing weird failure"

This reverts commit 64b78b7.

* - Use custom transactions while parsing
- Handle transaction rollback on parse failure/error
- Update tests to use transaction logic
- Created new decorator to rollback database when assertion error is hit
- Making elastic search log level configurable
- Added test for inter parse rollback

* - updated store logic to one liner
- updated decorator to catch all exceptions
- updated tests

* - removed function
- renamed test

* - refactored multirecord schema to be a schema manager instead
- updated parse functions to use the new layout
- updated bulk create to manage batch size

* - Name update for clarity

* - Fix lint errors

* - Changing batch size to avoid crash in circi

* - Updated based on review
- Updated tests to reflect line number

* - Updated based on review/OH
- Added extra transaction safety

* - Updated view to show latest datafiles
- Added admin filter to show newest or all datafile records
- Updated indices to allow easier elastic queries

* - Updated based on review  comments

* - Updated based on feedback for preparse error handling
- updated tests

* - Updated search indices to have parent FK

* - Fix lint errors

* - Updated submission tests
- Moved create_datafile to util

* - fix lint errors

* - removing frontend filtering

* - addding datafile to admin model

* Revert "- addding datafile to admin model"

This reverts commit 35a6f24.

* - Fixed issue where datafile FK wasnt populating
- Regenerated migration

* - Readding datafile back to admin view now that the error is resolved

* - adding datafile back

* Revert "- Readding datafile back to admin view now that the error is resolved"

This reverts commit 2807425.

* - Removed unnecessary fields
- Updated dependencies
- Updated filter

* - Updated document to include required fields

* - Moved datafile reference to avoid confusion

* - Updating based on comments.
- Added base class to keep things a little more DRY

* - Refactored parsing to avoid custom transactions by leveraging the FK on the records. Rollbacks are a lot slower now, but hopefully that will happen much less versus successful parses.

* - small optimization for the rollback

* - Fix lint errors

* - Removing commented code

* - Installing build essentials

* Revert "- Installing build essentials"

This reverts commit 782a5f7.

* - adding setup tools and wheel

* Revert "- adding setup tools and wheel"

This reverts commit f529728.

* - Updating dependencies to get around pep issue

* - Pin factoryboy
- fix lint error

* - Updating manifest

* - Added EncryptedField class
- Updated schema's
- Updated datafiles since all are encrypted

* - Fix lint errors

* - Added decryption for ssp

* - Making the encrypted check stronger

* - Added section two models, schemas, and an initial test

* - Allowing fields to be nullable

* - add missing field

* - Consolodating migrations

* - Consolodate migration
- Add tests

* - Added encrypted field

* - Refactored fields and rowschema into seperate files
- Updated encrypted field to take decryption function

* - fix lint errors

* - Fixed file spacing

* - fix imports
- fix lint errors

* - Fix import error

* - Fix failing test

* - Revert erroneous change

* - Updating item numbers

* - Fixed item numbers

* - Updating to accomodate item number as string

* - Removed erroneous update that was causing error
- Fixed whitespace in datafiles

* - White space error

* - Resolved error

* - Fixing test

* - fix lint errors

* - Added field validators for T4/T5

* - Added cat3 validators

* - Resolve lint and unit test errors

* - small optimization to validator

* - Added tests for cat3 validators for T5 record

* - Fix lint errors

* - updated fields to correct types

* - update race/ethnicity

* - updated tests post merge
- added check in make_validator to just return false if the value is None

* - Updated based on review feedback

* - Fix lint error

* - Updating to the correct types

* - Resolve conflicts

* - Moving field updates to seperate migration to see if they take place

* Revert "- Moving field updates to seperate migration to see if they take place"

This reverts commit a3214f2.

* - Revert migration 15 to original state
- Generate new migration for field alterations

* - Merged base branch and updated tests/factories

* - Fixed test

* - Fixed field names to correspond to model

* - Remove duplicate function
- Update ssn validator
- Removed asserts with large number of parse errors

* t7 model, index changes

* add t7 to parser

* update model mapping test

* add s3-s10

* - Remove print statemtnt

* - Resolved filter issue that made it seem like records werent being created
- Added filter to remaining records

* - fix lint errors

* - correct form merge conflict

* - Added specific validators to avoid duplication
- Updated naming of validators

* TANF Section 3 Parsing/Validation (#2649)

* - Updated to support parsing section 3 data

* - Added validators and tests for T6 record

* - resolve lint errors

* - Quick rename

* - Update fields in test

* - Fixed conflict

* - Fix error from merge conflict

* - Updated to create RPT_MONTH_YEAR from CALENDAR_QUARTER
- Updated tests

* - Added new validators for field change

* - Remove debug code

* - Genericize TransformField
- Update all schemas to use TransformField
- Move transforms to seperate file
- Fix lint errors

* - put kwargs in correct spot

* - Very minor change to avoid setting field unnecessarily on all TransformFields

* - Updated validator to call out name of field versus the value
- Updated tests

* - Fix lint

* - Calling super to avoid duplicate code

* - Added validators for transformed field

* - Updating based on merge

* - Fixed remaining merge conflicts

* - Fix lint errors

* - update error messages based on validator updates

* - Corrected validator

* - Resolved bug causing file to think it was encrytped after multiple submissions and changing the encryption header in between submissions

* - UPdated migration
- Updated test

* - Added transform fields
- UPdated migrations

* - Stratified T7 to one record per month per section indicator and stratum.

* - Updated tests

* - Fix test

* - Add T7 factory

* - Fix lint error

* - Remove test class until cat three validators exist

* - fix lint errors

* - Fixing colliding migration

* - Generating schemas instead of defining

* - Fix lint errors

* - Updated based on review feedback

* rm 17/18

* remake migration 18

* fix merge error

* fix merge error

* fix merge error

* labels are stuck

* rm

* dont compute aggregates for section 3/4

* move save

* Update tdrs-backend/tdpservice/parsers/test/factories.py

Co-authored-by: Alex P.  <[email protected]>

* enhance t7 modeladmin

* fix rpt_month_year off by 1

* lint

* differentiate item 6a/6b/67 in t7 records

---------

Co-authored-by: elipe17 <[email protected]>
Co-authored-by: Alex P <[email protected]>
Co-authored-by: Eric Lipe <[email protected]>
* saving state real quick

* finishing merge with latest

* Missed old test script

* Added new test, more cleanup

* Updating unit tests in DFS, preparing for 1610

* Merging in Jan's 1610 code for parserError useful-ness

* Revert "Merging in Jan's 1610 code for parserError useful-ness"

This reverts commit c5796da.

* update to test to use dfs fixture

* saving state before new 1610 merge

* Resolving merge conflicts with 1610.

* Linting changes and comparing to 1610

* Some unit test linting but inherited 1610 issues

* Re-ordering job to run tests vs lint first.

* Updates to linting and unit tests.

* Fixing linting.

* Update tdrs-backend/setup.cfg

* updates per PR.

* Excluding trailers for rejection

* VSCode merge resolution is garbage.

* Fixing precheck for not implemented types

* Updating to error-handle not implemented schema types

* - Updated view to show latest datafiles
- Added admin filter to show newest or all datafile records
- Updated indices to allow easier elastic queries

* - Updated search indices to have parent FK

* - Fix lint errors

* - Updated submission tests
- Moved create_datafile to util

* - fix lint errors

* - removing frontend filtering

* - addding datafile to admin model

* Revert "- addding datafile to admin model"

This reverts commit 35a6f24.

* - Fixed issue where datafile FK wasnt populating
- Regenerated migration

* - Readding datafile back to admin view now that the error is resolved

* - adding datafile back

* Revert "- Readding datafile back to admin view now that the error is resolved"

This reverts commit 2807425.

* - Removed unnecessary fields
- Updated dependencies
- Updated filter

* - Updated document to include required fields

* - Fixed failing test

* add adminUrl to deployment cypress overrides

* Adding "beta" banners to relevant error report sections (#2522)

* Update views.py

* Update views.py

* Update SubmissionHistory.jsx

* Update SubmissionHistory.test.js

* Apply suggestions from code review

Co-authored-by: Miles Reiter <[email protected]>

* lint fixes

---------

Co-authored-by: Miles Reiter <[email protected]>
Co-authored-by: Alex P <[email protected]>
Co-authored-by: andrew-jameson <[email protected]>

* Create sprint-73-summary.md (#2565)

* hotfix for large file sizes (#2542)

* hotfix for large file sizes

* apply timeouts/req limits to dev

* filter identity pages from scan

* IGNORE sql injection

---------

Co-authored-by: Jan Timpe <[email protected]>
Co-authored-by: mo sohani <[email protected]>
Co-authored-by: Alex P <[email protected]>

* updating validation error language

* accidentally included coding challenge

* rm comments

* 2550 deactivation email link (#2557)

* - updated nginx buildpack

* - specifying different nginx version

* - Updating changelog

* - added script to update certain apps in cf
- added workflow for each environment in circi

* - fixed base config

* - fixing jobs

* - Updated based on feedback in OH

* - Updating defaults

* - Removing defaults

* - Fixing indent

* - Adding params to config

* test

* test

* - updating work dir

* - Adding checkout

* - adding cf check

* - logging into cf

* - update cf check to install required binary

* - removing unnecessary switch

* - Forcing plugin installation

* - test installing plugin from script also

* - Adding url to email

* - test code for sandbox

* - using my email

* Revert "Merge branch 'update-cf-os' into 2551-deactivation-email-link"

This reverts commit e963b9d, reversing
changes made to cc9cf81.

* Revert "- using my email"

This reverts commit cc9cf81.

* Revert "- test code for sandbox"

This reverts commit 0603774.

---------

Co-authored-by: Alex P <[email protected]>
Co-authored-by: Andrew <[email protected]>

* Update README.md (#2577)

Add ATO

Co-authored-by: Andrew <[email protected]>

* Create 2023, Spring - Testing CSV & Excel-based error reports.md

* Update README.md

* Updating deliverable links (#2584)

* User viewset not returning/duplicating users (#2573)

* - Fixed issue not allowing pagination to work locally with nginx
- Added ordering to user field to fix duplicates issue

* - fix lint error

* - Removing ID check since we cannot guarantee that the uuid that is generated per test run will be lexigraphically consistent

---------

Co-authored-by: Alex P <[email protected]>
Co-authored-by: Andrew <[email protected]>

* Update cf os (#2523)

* - updated nginx buildpack

* - specifying different nginx version

* - Updating changelog

* - added script to update certain apps in cf
- added workflow for each environment in circi

* - fixed base config

* - fixing jobs

* - Updated based on feedback in OH

* - Updating defaults

* - Removing defaults

* - Fixing indent

* - Adding params to config

* test

* test

* - updating work dir

* - Adding checkout

* - adding cf check

* - logging into cf

* - update cf check to install required binary

* - removing unnecessary switch

* - Forcing plugin installation

* - test installing plugin from script also

* - Adding new dependencies

* - adding package

* - fixing broken install

* - fixing libs

* - using correct command

* - gettign correct version of libc

* - trying to upgrade libs

* - testing

* - Updated README and script

* Revert "- Updated README and script"

This reverts commit 92697b3.

* - Removed unnecessary circi stuff
- Removed script
- Updated docs to callout updating secondary apps

* - Correct spelling error

---------

Co-authored-by: Andrew <[email protected]>

* Item Number Mismatch (#2578)

* - Updated schemas and models to reflect correct item numbers of fields

* - Revert migration

* - Updated header/trailer item numbers

* - Fixed item numbers off by one errors

---------

Co-authored-by: Andrew <[email protected]>

* pipeline filtering (#2538)

* pipeline changes that filter based on paths and branches. circle ci tracks specified branches in order to keep current functionality on HHS side.

* updated syntax to be in line with build-all.yml

* removed comma

* WIP build flow docs

* added Architecture Decision Record for the change to pipeline workflows

* corrected file type of doc to .md

---------

Co-authored-by: George Hudson <[email protected]>
Co-authored-by: Andrew <[email protected]>

* Hotfix Devops/2457 path filtering for documentation (#2597)

* pipeline changes that filter based on paths and branches. circle ci tracks specified branches in order to keep current functionality on HHS side.

* updated syntax to be in line with build-all.yml

* removed comma

* WIP build flow docs

* added Architecture Decision Record for the change to pipeline workflows

* corrected file type of doc to .md

* build and test all on PRs even for documentation

---------

Co-authored-by: George Hudson <[email protected]>

* Create sprint-74-summary.md (#2596)

Co-authored-by: Andrew <[email protected]>

* added URL filters (#2580)

* added URL filters

* allow github to trigger owasp and label deploys (#2601)

Co-authored-by: George Hudson <[email protected]>

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: George Hudson <[email protected]>
Co-authored-by: George Hudson <[email protected]>

* Create sprint-75-summary.md (#2608)

* Create sprint-76-summary.md (#2609)

Co-authored-by: Andrew <[email protected]>

* - Resolved failing tests

* - Corrected merge thrash

* - Using randbits to generate pk to get around confilcting sequence pks

* Revert "- Using randbits to generate pk to get around confilcting sequence pks"

This reverts commit ac9b065.

* - Updating region in fixture instead of factory
- letting django handle transaction for test

* - Moved datafile reference to avoid confusion

* pushing up incomplete codebase

* Other unit tests now have passed w/ good error handling

* Working tests, need to get setup for case aggregates populating via DB

* - Updated queries
- Added helper function
- Need to merge in 2579 for queries to work

* minor improvement to month2int

* - Fixing most merge errors

* - Fixing functions

* - Updated queries based on generic relation

* - Updated queries to count by case number instead of record number

* - Added route
- Updated task to create dfs

* - updated tests to include dfs

* Cleaning up most comments that are no longer necessary and fixed lint issues.

* making minor updates, still broken tests.

* updating pipfile.lock and rebuild image resolved test issues

* Reorganizing tests, still failing in test_parse.py

* deleted summary file, split into other test scripts.

* Fixed missing self reference.

* Linting fixes.

* Found reference failure in deployed env.

* Removing extra returns for missing record type.

* lint fix

* Addressed invocation of datafile for failing test

* lint update for whitespace

* Intermediary commit, broken test

* add reverse relation

* frontend summary status

* new assignemnts in util

* - updated rejected query to correctly count objs

* - Fixing most tests

* - Fixed user error. Swapped numbers by accident.

* - make region None to avoid PK collision

* - Fix lint errors

* - Updating to avoid warning

* add acceptance icon

* add reverse relationship to summary model

* vscode merge conflict resolution (#2623)

* auto-create the external network

* didn't stage commit properly

* checking diffs, matching 1613.2

* doesn't work in pipeline. must be cached local

* re-commenting in unit test

* lint failures fixed

---------

Co-authored-by: andrew-jameson <[email protected]>

* add a pending status

* add acceptance status tests

* update warning icon

* rm old assert

* update rejected icon

* url change per me, want pipeline to run e2e

* Upgraded to querysets, fix PR comments, PE str

* missing : not caught locally

* Feat/1613 merge 2 (#2650)

* Create sprint-78-summary.md (#2645)

* Missing/unsaved parser_error for record_type

* removing redundant tests

* Hopefully resolved on unit tests and lint

---------

Co-authored-by: Smithh-Co <[email protected]>
Co-authored-by: andrew-jameson <[email protected]>

* icontains

* tests

* Changing dict structure per 1612.

* fixed tests and lint issues, parse is too complex

* schema_manager replaces schema check

* Saving state prior to merge-conflict.

* Adopting latest manager, removing old error style.

* Commented out t6 line during Office hours

* minor reference update

* Acclimating to schemaManager

* lint-fix isinstance

* syntax mistake with isinstance

* Apply suggestions from code review

* reverting search_index merge artifacts.

* adjusting for removing unused "get-schema()"

* whitespace lint

* Feedback from Jan

* Ensuring tests run/work.

* Ensure we have leading zero in rptmonthyear.

* Minor lint fix for exception logging

* fix migration

* add backend partially accepted status

* add frontend partially accepted status

* add partially accepted test

* rm accidental commit

* rm unused variable

* resolving merge conflict problems

* fixing tests from merge conflicts.

* dumb lint fix

* Update tdrs-backend/tdpservice/parsers/migrations/0007_alter_datafilesummary_datafile.py

* fix merge errors

* fix name attr not populated for preparsing errors

* include preparsing errors in row_precheck_errors status

* make header precheck errors force rejected status

* lint msg

---------

Co-authored-by: Andrew Jameson <[email protected]>
Co-authored-by: Andrew <[email protected]>
Co-authored-by: andrew-jameson <[email protected]>
Co-authored-by: elipe17 <[email protected]>
Co-authored-by: Miles Reiter <[email protected]>
Co-authored-by: Alex P <[email protected]>
Co-authored-by: Smithh-Co <[email protected]>
Co-authored-by: mo sohani <[email protected]>
Co-authored-by: Eric Lipe <[email protected]>
Co-authored-by: Lauren Frohlich <[email protected]>
Co-authored-by: Miles Reiter <[email protected]>
Co-authored-by: George Hudson <[email protected]>
Co-authored-by: George Hudson <[email protected]>
Co-authored-by: raftmsohani <[email protected]>
An error occurred while trying to automatically change base from feature/1610-frontend-parsing-status to develop October 4, 2023 18:06
@andrew-jameson
Copy link
Collaborator

Closing as the intended changes were resolved in #2643 per sprint ceremonies 9.21.

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.

7 participants