Skip to content
Snippets Groups Projects
Forked from Dragoon / Komodo
Source project has a limited visibility.
  • STEVAN Antoine's avatar
    94b544af
    test all shard permutations in the CLI test (dragoon/komodo!14) · 94b544af
    STEVAN Antoine authored
    related to
    - dragoon/komodo!13
    
    ## description
    in dragoon/komodo!13, 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](https://gitlab.isae-supaero.fr/dragoon/komodo/-/jobs/11281#L1120) 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 `math` module to `tests/cli.nu` which defines
      - `choose` which computes all the sets of $k$ choose $n$ in $[|0, ..., n - 1|]$
      - `perm` which computes all the permutations on $[|0, ..., n - 1|]$
      - see the inline `_test_choose` and `_test_perm` commands 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.md` to `examples/cli.nu`
    
    > **Note**  
    > also removes the newline added to the stdout of `komodo` commands, so that the output is prettier, without spurious empty lines
    94b544af
    History
    test all shard permutations in the CLI test (dragoon/komodo!14)
    STEVAN Antoine authored
    related to
    - dragoon/komodo!13
    
    ## description
    in dragoon/komodo!13, 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](https://gitlab.isae-supaero.fr/dragoon/komodo/-/jobs/11281#L1120) 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 `math` module to `tests/cli.nu` which defines
      - `choose` which computes all the sets of $k$ choose $n$ in $[|0, ..., n - 1|]$
      - `perm` which computes all the permutations on $[|0, ..., n - 1|]$
      - see the inline `_test_choose` and `_test_perm` commands 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.md` to `examples/cli.nu`
    
    > **Note**  
    > also removes the newline added to the stdout of `komodo` commands, so that the output is prettier, without spurious empty lines
Code owners
Assign users and groups as approvers for specific file changes. Learn more.