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

TechDebt: CSV Row Validation With Row State #1455

Merged
merged 9 commits into from
Jan 9, 2025
Merged

Conversation

MacQSL
Copy link
Collaborator

@MacQSL MacQSL commented Jan 8, 2025

Description of Changes

  • Adds row-level validation the the CSVConfig
  • Adds row level state for additional validation metadata
  • Slightly modifies existing Critter CSV import to use the CSVRowState

Testing Notes

  • Critter import should work as normal
  • Check the Critter sex values are persisted (it now uses CSVRowState to store the uuid value for the sex_qualitative_option_id)

@MacQSL MacQSL changed the title TechDebt: CSV Row Validation TechDebt: CSV Row Validation and Row State Jan 8, 2025
@MacQSL MacQSL changed the title TechDebt: CSV Row Validation and Row State TechDebt: CSV Row Validation With Row State Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 72.72727% with 15 lines in your changes missing coverage. Please review.

Project coverage is 45.97%. Comparing base (fb14aa8) to head (f950919).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
api/src/utils/csv-utils/csv-config-validation.ts 68.88% 3 Missing and 11 partials ⚠️
...import-services/critter/import-critters-service.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1455      +/-   ##
==========================================
+ Coverage   45.93%   45.97%   +0.03%     
==========================================
  Files         910      910              
  Lines       23680    23698      +18     
  Branches     3488     3493       +5     
==========================================
+ Hits        10878    10895      +17     
+ Misses      12190    12189       -1     
- Partials      612      614       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MacQSL MacQSL requested a review from NickPhura January 8, 2025 21:53
@MacQSL MacQSL added the Ready For Review PR is ready for review label Jan 8, 2025
Copy link

sonarqubecloud bot commented Jan 9, 2025

@NickPhura
Copy link
Collaborator

NickPhura commented Jan 9, 2025

Not specifically related to this PR:

In the CSVError interface, it might be good to more explicitly define some of the fields. Mostly I was thinking of the header field, and was wondering if that was the user facing header, or the internal header. I would have assumed user facing header, since the error needs to make sense to the user. But wasn't sure if it could also be the internal header, and then is re-mapped before being sent to the frontend.

@MacQSL MacQSL merged commit 961f452 into dev Jan 9, 2025
22 checks passed
@MacQSL MacQSL deleted the md-csv-row-validation branch January 9, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants