rsgain icon indicating copy to clipboard operation
rsgain copied to clipboard

Change scan log file extension to tsv

Open ctem opened this issue 2 years ago • 2 comments

This extension accurately represents the format of the file, which is TSV (tab-separated values) as opposed to CSV (comma-separated values).

It seems likely that this would address #56 without the need for 6402b2b.

ctem avatar Oct 12 '23 14:10 ctem

This would be a breaking change. Currently, I'm only allowing changes to the program that are backwards compatible with previous versions.

One way to implement this while maintaining backwards compatibility would be to add another mode for the -O option.

complexlogic avatar Oct 16 '23 05:10 complexlogic

This would be a breaking change. Currently, I'm only allowing changes to the program that are backwards compatible with previous versions.

I agree that this is something to tag or otherwise consider for a major release.

One way to implement this while maintaining backwards compatibility would be to add another mode for the -O option.

That could be helpful. As evidenced by #56, the issue the program is currently facing is that it applies an erroneous extension to the log files it outputs, leading to misinterpretation both by users and applications. Maybe a strategy like the following would make sense:

  1. Non-breaking changes:
    • Add one of the following modes—choose the one that is intended to be later replaced by the amended -O:
      • -Oc: output a CSV file with extension .csv
        • To account for mode chaining, -Ocs would add redundant separator header sep=, to the CSV file.
      • -Ot: output a TSV file with extension .tsv
        • To account for mode chaining, -Ots would add redundant separator header sep=\t to the TSV file.
    • Add a warning in the readme that -O currently outputs a TSV file with extension .csv, noting that it will be amended in the next major release.
  2. Breaking changes (e.g., for v4.0):
    • Amend -O such that its behavior conforms to the new mode (-Oc or -Ot). Note that this PR currently assumes the -Ot behavior for simplicity's sake.
    • Deprecate/remove the no-longer-needed new mode (-Oc or -Ot).
    • Optionally deprecate/remove the -Os mode as correcting the file extension renders the separator header redundant.

Edit: simplified strategy—the previous revision detailed adding both of the new modes, which would be practical only if the intention is to expose output format specification as an option.

ctem avatar Oct 18 '23 07:10 ctem