Closed turbomam closed 2 years ago
Thank you for the quick reasoning as to why the original error message was showing up @turbomam.
If you look within main.js, specifically at L#246, i.e., the line that computes min_cols
is what's causing the makes the #unmapped-headers-list
div to become visible incorrectly.
You can add this statement on the next line:
console.log(min_cols)
And if you open the console section on your browser's Developer Tools, you'll see that the app stops logging after 0
, meaning it's taking the sections with one column in them, subtracting 1, making it zero, and hence executing the logic which makes the #unmapped-headers-list
div visible.
Change L#246 to:
let min_cols = parent.children.length;
cc: @turbomam @ddooley
Yes I think that's right, although line 260 then needs an adjustment to pad remainder of first row columns with empty values. I've added that and its now on master (but not in release yet). If you could test in your error triggering situations that would be appreciated. I tested it and it seems to work ok with 1 section, 1 field scenario. Also I improved display of template vs. imported file fields.
Thank you the fixes @ddooley. I checked, and the file now gets loaded into the system without any parsing problems. This issue is ready to be closed @turbomam.
This issue is ready to be closed @turbomam.
Thanks guys, you're the best.
I merged your fix into our master branch and have pushed a new build of the NMDC DataHarmonizer, which appears to be visible at https://microbiomedata.github.io/DataHarmonizer/main.html?template=dev already.
Sample data file: https://raw.githubusercontent.com/microbiomedata/DataHarmonizer/master/docs/template/dev/exampleInput/valid_jgi_gen_emsl.tsv
It appears that DH won't tolerate a section that has only one column, even though it says "section with no columns'
See https://github.com/microbiomedata/DataHarmonizer/issues/79
We will elaborate today or tomorrow