You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a SSSOM/TSV file containing an embedded YAML metadata header is modified in a standard spreadsheet editor (e.g. LibreOffice Calc, Microsoft Excel, or Apple Numbers), the editor, obviously unaware that lines starting with a # are comments, may treat the commented header lines as if they were normal data lines that merely happen to have only one cell. This means that, when writing the file back, the editor will insert trailing tabs at the end of the header lines (so that those lines have the same number of “columns” than the subsequent real data lines).
This behaviour has been observed with all three aforementioned spreadsheet editors.
Those extra tabs make the YAML metadata block invalid as per the YAML syntax rules, and therefore make the entire file an invalid SSSOM/TSV file. This, in turn, makes it impossible to use a standard spreadsheet software to edit a SSSOM mapping set.
I think SSSOM tools could implement a quick and almost painless workaround here, to still accept those files despite them being, strictly speaking, invalid. All that is needed is to strip any trailing tabs in the header lines before passing the lines to the YAML parser.
The text was updated successfully, but these errors were encountered:
When a SSSOM/TSV file containing an embedded YAML metadata header is modified in a standard spreadsheet editor (e.g. LibreOffice Calc, Microsoft Excel, or Apple Numbers), the editor, obviously unaware that lines starting with a
#
are comments, may treat the commented header lines as if they were normal data lines that merely happen to have only one cell. This means that, when writing the file back, the editor will insert trailing tabs at the end of the header lines (so that those lines have the same number of “columns” than the subsequent real data lines).For example, a file like this one:
is “seen“ by the spreadsheet editor as
and will be written back as (extra tabs rendered as “➪” to make them visible):
This behaviour has been observed with all three aforementioned spreadsheet editors.
Those extra tabs make the YAML metadata block invalid as per the YAML syntax rules, and therefore make the entire file an invalid SSSOM/TSV file. This, in turn, makes it impossible to use a standard spreadsheet software to edit a SSSOM mapping set.
I think SSSOM tools could implement a quick and almost painless workaround here, to still accept those files despite them being, strictly speaking, invalid. All that is needed is to strip any trailing tabs in the header lines before passing the lines to the YAML parser.
The text was updated successfully, but these errors were encountered: