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

LIMS-1188: Create web-based CSV importer #714

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Jan 19, 2024

JIRA ticket: LIMS-1188

Summary:

The current Diamond CSV importer requires SSH or NX access to Diamond, followed by a special Bash script. Authentication then relies on putting the file in a particular location within a visit.
This importer is web-based, so can be done without SSH or NX, and uses the ISPyB authorisation to check your proposal.
The original code is from #239, but with a bunch of changes to make it work for Diamond. (IMCA csv files do seem to still work, although it no longer creates proteins that don't exist.) Different sites can create different CSV 'formats'.

Changes:

  • Define CSV profiles for Diamond and IMCA
  • Add button on shipment page, and routing to go to the CSV importer
  • Add CSV importer page html
  • Javascript file browser and file drop location to get the CSV file
  • Javascript logic to process the CSV file
  • Some extra restrictions on energy and on screening methods/parameters
  • Add ability to get all existing samples from a shipment
  • Add ability to set sublocation and observed resolution on a sample

To test:

  • Test creating a shipment, puck and samples without using CSV importer
  • Using proposal mx23694 and csv_profile of "diamond", test uploading this file mx23694.csv
  • Using proposal mx23694 and csv_profile of "imca", test uploading this file csv_imca.csv
  • Modify the mx23694.csv file so that the protein acronym is different (eg RFH3zxcvbnm), or location is not 1-16, or multiple rows have the same location, or mulitple rows have the same protein and sample name, or screening method is something invalid. Upload should be rejected without populating the form.
  • Modify the mx23694.csv file so that some other field is invalid, eg unit cell using letters, upload should be accepted but fields in the form should be red and the import shouldn't be allowed.

image
image
image

@ndg63276 ndg63276 marked this pull request as draft January 25, 2024 12:44
@ndg63276
Copy link
Collaborator Author

After discussion with James and Karl, the conclusion was to wait for some new API endpoints, so converting to draft for now.

@ndg63276 ndg63276 marked this pull request as ready for review May 3, 2024 11:42
@ndg63276
Copy link
Collaborator Author

ndg63276 commented May 3, 2024

After further thought, this is not the place to put new API functionality. I've done a little tidying, happy for this to be initially disabled by not setting the csv_profile parameter.

@ndg63276 ndg63276 changed the base branch from prerelease to master June 24, 2024 09:36
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.

1 participant