test all shard permutations in the CLI test
related to
description
in !13 (merged), i noticed that decoding can be pretty sensitive to the order of the shards...
this is why i thought testing all possible permutations of the shards could be beneficial
see the run attached to this MR to see all the combinations of shards used in the tests, e.g. [0, 2, 3] means that shards 0, 2 and 3 have been used and shards 1 and 4 have been "lost"
changelog
this MR
- adds an inline
mathmodule totests/cli.nuwhich defines-
choosewhich computes all the sets of k choose n in [|0, ..., n - 1|] -
permwhich computes all the permutations on [|0, ..., n - 1|] - see the inline
_test_chooseand_test_permcommands for concrete examples of their behaviours
-
- compute all the permutation of k' choose n shards, where k' ranges from k to n
- run the reconstruction test on all these cases
- moves the CLI example from
README.mdtoexamples/cli.nu
Note
also removes the newline added to the stdout ofkomodocommands, so that the output is prettier, without spurious empty lines
Edited by STEVAN Antoine