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

SIMSBIOHUB-633: Revamp CSV Imports - Critter #1438

Merged
merged 42 commits into from
Dec 7, 2024
Merged

SIMSBIOHUB-633: Revamp CSV Imports - Critter #1438

merged 42 commits into from
Dec 7, 2024

Conversation

MacQSL
Copy link
Collaborator

@MacQSL MacQSL commented Nov 28, 2024

Links to Jira Tickets

Description of Changes

  • Revamps the existing CSV import services to an improved structure
  • New CSVConfig concept - Static / Dynamic header configs
  • Supports ALL data types
  • New validation utils / functions for validating CSVConfigs
  • New ImportCrittersService for importing Critter CSVs
  • Util files for cellValidator and cellSetter functions
  • CSV validation now returns CSVErrors

Testing Notes

  • Should be able to import a Critter CSV with Postman
  • Should see validation errors when issues exist in the CSV
  • Correcting the issues and re-importing will succeed

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 87.20539% with 38 lines in your changes missing coverage. Please review.

Project coverage is 45.94%. Comparing base (1c83bb7) to head (77bac9c).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...import-services/critter/import-critters-service.ts 80.00% 12 Missing and 4 partials ⚠️
api/src/utils/csv-utils/csv-config-validation.ts 81.15% 4 Missing and 9 partials ⚠️
.../import-services/critter/critter-header-configs.ts 91.30% 3 Missing and 3 partials ⚠️
api/src/openapi/schemas/csv.ts 0.00% 1 Missing ⚠️
api/src/utils/csv-utils/csv-header-configs.ts 94.11% 0 Missing and 1 partial ⚠️
api/src/utils/nested-record.ts 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1438      +/-   ##
==========================================
+ Coverage   45.65%   45.94%   +0.28%     
==========================================
  Files         842      848       +6     
  Lines       22268    22444     +176     
  Branches     3300     3331      +31     
==========================================
+ Hits        10167    10312     +145     
- Misses      11504    11522      +18     
- Partials      597      610      +13     

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

@MacQSL MacQSL added the Early Feedback Welcome PR is not finished, but early review feedback is welcomed label Nov 28, 2024
@mauberti-bc
Copy link
Collaborator

mauberti-bc commented Dec 6, 2024

Looks great! It's just missing the ability to make headers optional - wildlife health ID and description should be optional when adding animals

  • Add ability to make certain headers optional
  • Sex should be nullable and optional (able to be omitted as a header)

Copy link
Collaborator

@mauberti-bc mauberti-bc left a comment

Choose a reason for hiding this comment

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

👍

Copy link

sonarqubecloud bot commented Dec 7, 2024

@MacQSL MacQSL merged commit 662ae2f into dev Dec 7, 2024
24 checks passed
@MacQSL MacQSL deleted the mdColumnValidator branch December 7, 2024 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Early Feedback Welcome PR is not finished, but early review feedback is welcomed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants