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-587 API: Bulk Captures #1324

Merged
merged 38 commits into from
Jul 31, 2024
Merged

SIMSBIOHUB-587 API: Bulk Captures #1324

merged 38 commits into from
Jul 31, 2024

Conversation

MacQSL
Copy link
Collaborator

@MacQSL MacQSL commented Jul 17, 2024

Links to Jira Tickets

Description of Changes (only backend)

  • Bulk import Critterbase captures via CSV
  • importCSV strategy function
  • updated columnValidator spec
  • import services now implement shared interface (to be injected into importCSV)
  • column validator now handles optional properties

Testing Notes

  • Should be able to import capture CSV file with postman

@MacQSL MacQSL added Do Not Merge PR should not be merged Not Ready For Review Addressing feedback and/or refactoring labels Jul 17, 2024
@NickPhura NickPhura marked this pull request as draft July 22, 2024 17:29
@MacQSL MacQSL changed the title SIMSBIOHUB-587 Bulk Captures / Measurements / Markings SIMSBIOHUB-587 Bulk Captures Jul 23, 2024
@MacQSL MacQSL changed the title SIMSBIOHUB-587 Bulk Captures SIMSBIOHUB-587 API: Bulk Captures Jul 23, 2024
@MacQSL MacQSL changed the title SIMSBIOHUB-587 API: Bulk Captures SIMSBIOHUB-587 Bulk Captures - Backend Jul 23, 2024
@MacQSL MacQSL changed the title SIMSBIOHUB-587 Bulk Captures - Backend SIMSBIOHUB-587-Backend: Bulk Captures Jul 23, 2024
@MacQSL MacQSL changed the title SIMSBIOHUB-587-Backend: Bulk Captures SIMSBIOHUB-587 API: Bulk Captures Jul 23, 2024
@MacQSL MacQSL added Ready For Review PR is ready for review and removed Do Not Merge PR should not be merged Not Ready For Review Addressing feedback and/or refactoring labels Jul 30, 2024
@NickPhura
Copy link
Collaborator

NickPhura commented Jul 30, 2024

Regarding the csvFileSchema allowed mime types enum [text/csv]:

I'm encountering an interesting issue, where the mime type, despite the extension being .csv, is parsed as application/vnd.ms-excel.

This blog post actually mentions the same issue: https://christianwood.net/posts/csv-file-upload-validation/

Their conclusion that they just have to add more mime types to the allowed list.

The issue doesn't seem to happen through postman.

(Everything else downstream works, I just had to add that extra mime type to the openapi schema)

@MacQSL MacQSL marked this pull request as ready for review July 31, 2024 17:06
@MacQSL
Copy link
Collaborator Author

MacQSL commented Jul 31, 2024

Regarding the csvFileSchema allowed mime types enum [text/csv]:

I'm encountering an interesting issue, where the mime type, despite the extension being .csv, is parsed as application/vnd.ms-excel.

This blog post actually mentions the same issue: https://christianwood.net/posts/csv-file-upload-validation/

Their conclusion that they just have to add more mime types to the allowed list.

The issue doesn't seem to happen through postman.

(Everything else downstream works, I just had to add that extra mime type to the openapi schema)

I have updated the file schema to include all of these. I can remove some if we think they are not needed.

Copy link
Collaborator

@NickPhura NickPhura left a comment

Choose a reason for hiding this comment

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

Looks great

Copy link

sonarcloud bot commented Jul 31, 2024

@MacQSL MacQSL merged commit 76fd32f into dev Jul 31, 2024
20 checks passed
@MacQSL MacQSL deleted the SIMSBIOHUB-587-Bulk-Captures branch July 31, 2024 22:29
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