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

[instrument_manager] Parse Instrument Data from CSV file #9472

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jeffersoncasimir
Copy link
Contributor

Preview - not yet ready for review

Closes #9341

Brief summary of changes

Contains a new CSVParser class, extended by an InstrumentDataParser class.

A template file with the expected headers for the selected instrument can be downloaded from the new "Upload Instrument Data" panel's form in the Upload tab of the Instrument Manager module.

The uploaded .csv file's headers must match the selected instrument's expected headers.

For each row, an instrument is created using the NDB_BVL_Instrument::factory and is then saved to the database.

If an error is detected, the database transaction will be rolled back, and the list of errors will be returned to the user.

  • Documentation updated (not yet)

Testing instructions

  1. Select an instrument from the dropdown
  2. Download the headers template
  3. Manually add rows to the template and upload it

Screenshots:
Screenshot 2024-11-15 at 1 27 47 PM
Screenshot 2024-11-15 at 1 41 47 PM
Screenshot 2024-11-15 at 3 49 45 PM
Screenshot 2024-11-15 at 1 23 44 PM

Coming soon:

  • Offer one or more alternative for selecting Examiner(s) [discussion required]
  • Unit tests for InstrumentDataParser class
  • Updated TestPlan.md

Potential changes:

  • Separate POST endpoint for uploading instrument data
  • Different location for form
  • Migration of utility functions
  • More rugged integration tests for module's upload tab

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.

Generalized CSV importer for instrument data
1 participant