Closed joerowell closed 3 years ago
Ace. Could we add a test to make sure codes.py
doesn't break in the future?
Ace. Could we add a test to make sure
codes.py
doesn't break in the future?
It's probably unfair to say that codes.py
broke - it just wasn't updated to Python 3.
We could write some KATs, but it seems pretty non-deterministic to me: a better solution might be "If the code generated is above this quality threshold". Is this what you had it mind?
Even it not crashing would be a start
Is this one ready or shall I wait for some rudimentary tests?
You may as well merge it: I've added an "exit if less than 6" check, but I don't know if I'll have time any time soon to add anything more robust.
I think I may be the only person who has ever used this script, but that doesn't mean it shouldn't be Python 3.
This PR:
This PR converts codes.py to Python 3. I also
blackened
the source file to make sure it's all nicely formatted etc.I also fixed the
launch_all
file: briefly, the first few commands would lead to the commands not terminating (we check the permutation inrandom_sparse_codes
but for small values of n this leads to an infinite loop). It now starts at 6, which seems to be where this issue stops.