Closed g1eb closed 3 years ago
Here's a picture of what the result looks like with the additional empty cells added to the annotation blocks:
@abhinav-kumar-thakur
I am looking at this issue. @g1eb could you also share the annotation file with me. I will use the same for my testing. Till then, I will create my own annotations and try to reproduce the bug.
@abhinav-kumar-thakur would it be possible to remove/trim the empty lines at the end of the new annotations in the picture?
Here is the zip folder of both original input file and the saved .t2wmlz
project file that I used to upload/copy the annotations from. You can try this on our live demo https://t2wml.isi.edu/ by uploading the original file first and then uploading the annotations via the project menu in the top left of the screen.
FYI we are going to rename the Upload Annotations
button to Apply Annotations
in #582
Okay @g1eb, As per the implementation of copy_annotations it should ignore any row/column which is completely empty. Let me check and get back on why this issue is happening.
thank you!
copy_annotation
function expects both the source and target Dataframe to have the empty cells represented by NaN. So, that it can ignore them while copying the annotations.
While debugging I found that the expectation is met by the source_df argument to thecopy_annotation
function.
But, the target_df has the empty cells as a blank string i.e. ""
.
We can make target_df as same as source_df to fix this issue.
Updated on our live demo to include this PR ^ https://t2wml.isi.edu/
To reproduce this issue upload a regular file first, add annotations and save the results by downloading the
.t2wmlz
file.Step 2 is to upload the same original file again, select
Upload Annotations
from the project menu in the top-left corner, now drag-and-drop (or click and upload) the.t2wmlz
project file from the previous step.The result is that the annotations have exactly 3 more annotated cells than before.
(PS. Uploading the saved
.t2wmlz
file straight up from the start works just fine, this issue occurs only when you select theUpload Annotations
option from the project menu)Here is the original
.xlsx
file that I was testing with: annotation_example.xlsx