Make matrix doctests ready for random seeds
Closed this issue · 20 comments
This ticket makes
sage -t --long --random-seed=n src/sage/matrix/
pass for n more general than just 0.
Depends on #29962
CC: @slel
Component: doctest framework
Keywords: random_seed, fuzz
Author: Jonathan Kliem
Branch/Commit: 4fceeae
Reviewer: Samuel Lelièvre
Issue created by migration from https://trac.sagemath.org/ticket/29976
I have a very partial fix. But even after that the following still need to be taken care of
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_cyclo_dense.pyx # 3 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_generic_dense.pyx # 1 doctest failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_gf2e_dense.pyx # 67 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_integer_dense_saturation.py # 2 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_integer_dense.pyx # 3 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_modn_dense_double.pyx # 13 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_modn_dense_float.pyx # 12 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_modn_dense_template.pxi # 77 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_modn_sparse.pyx # 3 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_rational_dense.pyx # 4 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_space.py # 5 doctests failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix_sparse.pyx # 1 doctest failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/matrix1.pyx # 1 doctest failed
sage -t --long --random-seed=151058820726654196682836430928254760259 src/sage/matrix/special.py # 37 doctests failed
Branch: public/29976
Commit: 9daa68b
Branch pushed to git repo; I updated commit sha1. New commits:
da1c6be | start from a "random" random seed for doctesting |
b7b836d | make random seed reproducible |
eedbe5e | document random_seed |
998b1b9 | default random seed 0 for now |
1d7b00e | dash instead of underscore for command line options |
9daa68b | partially make matrix fuzz ready |
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
Description changed:
---
+++
@@ -3,5 +3,4 @@
```
sage -t --long --random-seed=n src/sage/matrix/
```
-pass for different values `n` than just `0`.
-
+pass for n more general than just 0. Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
bf7fd3b | fix for matrix2 and matrix_mod2_dense |
Changed branch from public/29976 to public/29976-reb
Author: Jonathan Kliem
Changed keywords from none to random_seed, fuzz
Reviewer: Samuel Lelièvre
A typo in src/sage/matrix/matrix_rational_dense.pyx
prevents the HTML documentation from building.
To fix it, change this in the docstring of randomize:
- The default density is ``6/9`::
+ The default density is `6/9`::
After fixing that, success doctesting src/sage/matrix
be it with the random seed in the ticket description
or with a few extra random ones.
Instead of using l (lowercase L) to name a list,
in many cases a more descriptive name can be used
and is less confusing; for a list of matrix entries,
why not call it entries for example?
Branch pushed to git repo; I updated commit sha1. New commits:
4fceeae | fix documentation build |
Minor improvements such as renaming a list
from l to entries can be done later.
Thank you.
Changed branch from public/29976-reb to 4fceeae