-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support xlsx upload for measurement metadata registration #803
Support xlsx upload for measurement metadata registration #803
Conversation
…measurement-metadata-registration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good 👍 Great job.
Some minor remarks I would like you to address
user-interface/src/main/java/life/qbic/datamanager/parser/MetadataConverter.java
Outdated
Show resolved
Hide resolved
user-interface/src/main/java/life/qbic/datamanager/parser/xlsx/TSVParser.java
Outdated
Show resolved
Hide resolved
user-interface/src/main/java/life/qbic/datamanager/parser/xlsx/TSVParser.java
Outdated
Show resolved
Hide resolved
user-interface/src/main/java/life/qbic/datamanager/parser/xlsx/TSVParser.java
Outdated
Show resolved
Hide resolved
user-interface/src/main/java/life/qbic/datamanager/parser/xlsx/TSVParser.java
Outdated
Show resolved
Hide resolved
* @since 1.4.0 | ||
*/ | ||
static Optional<NGSMeasurementProperty> fromStringTrailingIgnored(String value) { | ||
var trimmedValue = value.trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String:trim
will remove all trailing AND all leading whitespace. Is this intended here? From the method name I would expect the leading whitespace to not be removed and only the trailing to be handled.
*/ | ||
public record ParsingResult(Map<String, Integer> keys, List<List<String>> values) { | ||
|
||
public Stream<List<String>> rows() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about public Stream<Row> rows()
return values.stream(); | ||
} | ||
|
||
public Iterator<List<String>> iterator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about public Iterator<Row> iterator()
return values.iterator(); | ||
} | ||
|
||
public List<String> getRow(int row) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about public Row getRow(int rowIndex)
...fe/qbic/datamanager/views/projects/project/measurements/MeasurementMetadataUploadDialog.java
Show resolved
Hide resolved
...life/qbic/datamanager/views/projects/project/measurements/MeasurementValidationExecutor.java
Outdated
Show resolved
Hide resolved
user-interface/src/main/java/life/qbic/datamanager/parser/MetadataConverter.java
Show resolved
Hide resolved
…measurement-metadata-registration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice adjustments. I like the switch to the Row record. Increases readability a lot.
One minor thing when readin cell values and one question regarding measurement editing.
Regarding measurement editing:
I followed the steps detailled in the documentation. However when I
- Download the measurement metadata
- Clear rows at the end by selecting them and pressing backspace on my keyboard
- Save the XLSX file
- Upload the edited XLSX file
Then I get the error that at least one sample id is missing. This happens for both XLSX and TXT (UTF-16 tab separated)
return rows.get(rowIndex).values; | ||
} | ||
|
||
public record Row(List<String> values) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it
@@ -828,12 +526,12 @@ public UploadItemsDisplay(Upload upload) { | |||
uploadSectionTitle.addClassName("section-title"); | |||
|
|||
var saveYourFileInfo = new InfoBox().setInfoText( | |||
"Please save your excel file as UTF-16 Unicode Text (*.txt) before uploading.") | |||
"Please save your Excel file as UTF-16 Unicode Text (*.txt) before uploading.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue that this is no longer the only way as you can upload xlsx as well now.
user-interface/src/main/java/life/qbic/datamanager/parser/xlsx/XLSXParser.java
Outdated
Show resolved
Hide resolved
…measurement-metadata-registration
…ta-registration' of github.com:qbicsoftware/data-manager-app into feature/#677-support-xlsx-upload-for-measurement-metadata-registration
Quality Gate passedIssues Measures |
I was able to reproduce it and included another method for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job!
Solves #677