eBay / tsv-utils

eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.
https://ebay.github.io/tsv-utils/
Boost Software License 1.0
1.43k stars 80 forks source link

tsv-sample named field support #292

Closed jondegenhardt closed 4 years ago

jondegenhardt commented 4 years ago

This PR is a follow-on to the named field PR series start with PR #284. It adds named field support to tsv-uniq. It works the same way as the support added to tsv-select, see PR #284 for more info.

Named field support is backward compatible with numeric fields. As with the other tools, this support is not documented yet, even in the help text. Documentation will be added prior to performing release.

This PR also adds some additional header field variation matches to the tsv-select tests. Mainly tests for field names requiring escapes. This is well tested at the unit test level, but its also useful to have some tests at the executable level.

With completion of this PR, all the tools taking fields as command line arguments have basic support for named fields. Documentation needs to be done (include help text), and there's a certain amount of cleanup to do in command line argument processing code for several tools.

This is a step towards enhancement request #25.

codecov-commenter commented 4 years ago

Codecov Report

Merging #292 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #292   +/-   ##
=======================================
  Coverage   99.33%   99.34%           
=======================================
  Files          18       18           
  Lines        6657     6697   +40     
=======================================
+ Hits         6613     6653   +40     
  Misses         44       44           
Impacted Files Coverage Δ
tsv-split/src/tsv_utils/tsv-split.d 98.48% <ø> (ø)
tsv-sample/src/tsv_utils/tsv-sample.d 99.45% <100.00%> (+0.02%) :arrow_up: