broadinstitute/fiss

Address differences in Python 2 / 3 sort order of returned results

Opened this issue · 0 comments

For example, see attr_get:

python3 firecloud/fiss.py attr_get -w testattr -t pair -e PAIR-1
entity:pair_id pair_attr1 case_sample participant pair_attr2 control_sample
PAIR-1 pair_attr1_value1 S-1-TP PARTIC-1 pair_attr2_value1 S-1-NT

python firecloud/fiss.py attr_get -w testattr -t pair -e PAIR-1
entity:pair_id case_sample participant control_sample pair_attr2 pair_attr1
PAIR-1 S-1-TP PARTIC-1 S-1-NT pair_attr2_value1 pair_attr1_value1

Some have tried to make the case that we should not care whether the order of columns returned is consistent, but I disagree. Because, while its true that if one is coding in Python and using DictReader etc then the order won't matter, many other use cases DO matter (such as saving these results to TSV, parsing through them in BASH, or viewing in EXCEL, etc)

This discrepancy has been noted as a FIXME in both the FISSFC code proper as well as in the highlevel_tests.py script.