-
Notifications
You must be signed in to change notification settings - Fork 1
Read dropped study folder on the submission interface (proof of concept) #1442
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
Draft
hepcat72
wants to merge
6
commits into
main
Choose a base branch
from
read_dropped_folder_POC
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…anges. Files checked in: DataRepo/templates/submission/includes/1_start.html DataRepo/templates/submission/submission.html static/css/drop_area.css static/js/submission_start.js [skip ci]
… study folder and add mzXML files to the new MS Files tab and the mzXML File Name of the Peak Annotation Details sheet. Details: - Changes to submission_start.js - New functions: - getMzxmlsInDirectory - refreshMzxmlDisplayList - getParentMzxmlDirectories - getAllMzxmlDirectories - getAllMzxmlFilePaths - getMzxmlFileNamesString - refreshMzxmlMetadata - initMzxmlMetadataUploads - Renamed afterAddingFiles to afterAddingPeakAnnotFiles - Deleted commented code from clearPeakAnnotFiles - Renamed global variables to distinguish between ones associated with peak annotation files versus mzXML files - Added a DataTransfer argument to afterAddingPeakAnnotFiles to make it compatible with alternate methods called by handleFiles - Changed fileColumn ID to UnHideMe because there are multiple column that must be hidden and unhidden for the peak annotation file metadata inputs (sequence directory and scan subdirectory) - Changed other IDs and added global variables for the mzXML-related variables - Changes to file_list_drop_area.js - Make fileFunc optional, since there's nothing to do per file in the study folder addition. - Dropped files are now passed to postDropFunc - Added style elements for mzXML-related elements to drop_area.css - Changes to submission.py - Changed the metadata coming into BuildSubmissionView - Commented out code relating to self.annot_file_metadata - Added variables for new incoming metadata: - self.peak_annot_to_mzxml_metadata - self.sequence_metadata - self.mzxml_file_to_seq_dir - Added some initialization of the new metadata that is expected to come in - Added exception classes to exceptions.py: - MzxmlsWithoutSequences - SequencesWithoutMzxmls - Added calls to new initialization javascript methods (for elements related to mzXMLs) in submission.html - Changes to 1_start.html] - Added a study folder drop area and file upload button - Moved the sequence metadata fields to be next to the study folder drop area - Added new form fields - Changes to forms.py (BuildSubmissionForm - Changed peak_annotation_file to peak_annotation_files and made it a miltiple file input. - Added peak_annot_to_mzxml_metadata as a JSONField - Added mzxml_file_list as a JSONField with an array decoder - Added sequence_dir as a CharField. This will be associated with the sequence metadata - The peak_annot_to_mzxml_metadata will hold a sequence directory and scan subdirectory associated with each peak annotation file Files checked in: DataRepo/forms.py DataRepo/templates/submission/includes/1_start.html DataRepo/templates/submission/submission.html DataRepo/utils/exceptions.py DataRepo/views/upload/submission.py static/css/drop_area.css static/js/file_list_drop_area.js static/js/submission_start.js [skip ci]
Adding peak annotation files now updates a "hidden" multiple files input element (that's not currently hidden for debugging purposes) and adds a row with the peak annotation file name and 2 (currently empty) select list for the default sequence dir and the default scan dir. This work involved changing the drop area globals into a "dict" so that multiple drop areas could do different things. I also added an alert about skipped files with duplicate names. Files checked in: DataRepo/forms.py DataRepo/templates/submission/includes/1_start.html DataRepo/templates/submission/submission.html DataRepo/views/upload/submission.py static/js/file_list_drop_area.js static/js/submission_start.js [skip ci]
…om a dropped folder. This doesn't appear to be the same as the webkitRelativePath, so I'm not sure this will work with the file input element which uses that relative path... There's also an issue with promises. I'm not getting the paths back, but it took awhile to get to this point where SOMETHING works, so I am checking this in. Files checked in: DataRepo/forms.py DataRepo/templates/submission/includes/1_start.html static/js/file_list_drop_area.js static/js/submission_start.js [skip ci]
… the choose folder button and dropped folders and started work on the defaultSequenceDir and defaultScanDir select lists. Details: - added global variables to save extra data such as the name of the study directory and the paths of the possible peak annotation files. Also saved possible study docs in the root directory. - Renamed getAllMzxmlFilePaths to getStudyMetadata and returned a list of variables with all of the parsed data. - Renamed clearPeakAnnotFiles to clearSubmissionForm and consolidated its functions (removing calls from the html template. - renamed refreshMzxmlMetadata to refreshStudyMetadata - Added method updateAnnotSelectLists - added method arraysEqual - Added method getFilePath - Renamed disablePeakAnnotForm to disableSubmissionForm - Renamed enablePeakAnnotForm to enableSubmissionForm - Renamed initMzxmlMetadataUploads to initStudyMetadataUploads - Added global variables: - possibleAnnotPaths - peakAnnotHash - sequenceDirsHash - Added methods to the drop area code: - setResults - readEntryContentAsync - readEntriesPromise - readAllDirectoryEntries - getAllFileEntries - getAllFileEntries - onDropItems - supportsWebkitGetAsEntry - supportsFileSystemAccessAPI - Added CSS for ID: sequence_dir_input_id - Temporarily changed form field widgets from hidden to another type for debugging Files checked in: DataRepo/forms.py DataRepo/templates/submission/includes/1_start.html DataRepo/templates/submission/includes/3_validate.html DataRepo/templates/submission/submission.html static/css/drop_area.css static/js/file_list_drop_area.js static/js/submission_start.js [skip ci]
…scan directories. Details: - I added code to gray out and present a popup about folder processing, but it doesn't work as intended. That should either be ripped out or made to work. The intention is that it takes some time to process the files and it's possible that if the user does something during that processing, it will silently fail. - I should update the code to look at directory entries instead of looping through actual files, because that's what takes time. - Added the ability to account for multiple peak annotation files with the same name in the folder, and to only auto-select sequence directories when they exist in a sequence directory. - Added a non-selection for each select list that tells the user to select a sequence/scan folder. - Added change event listeners to update all fields. Files checked in: DataRepo/forms.py DataRepo/templates/submission/includes/1_start.html DataRepo/templates/submission/submission.html static/css/drop_area.css static/js/file_list_drop_area.js static/js/submission_start.js [skip ci]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component:submission
Submission process page and logic
effort:2-over1wk
This is a complex effort involving about a week or more of focussed effort
priority:2-high
Must be implemented in order to meet release goals
status:wait:WIP
Do not review. Issue/PR content is in flux.
type:feature
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary Change Description
Proof of concept, to show that it's possible to drop and read a study folder and associate peak annotation files with sequence and scan directories.
@mneinast - This code is live for your testing on http://tracebase-dev.princeton.edu
Testing Notes
For usage, please see the screen recording I made.
Development Notes
MS Files
sheet will be added and schema changedAffected Issues/Pull Requests
Reviewer Notes/Requests
See comments in-line.
Checklist
This pull request will be merged once the following requirements are met. The
author and/or reviewers should uncheck any unmet requirements:
CHANGELOG.md
Unreleased section