sagemath/sage

Feature for sage.groups

Closed this issue · 17 comments

Most substantial code in sage.groups depends on libgap, so sage.groups will not be used in small distributions such as sagemath-categories and sagemath-polyhedra.

We introduce a Feature for use in # optional annotations for doctests that use groups as examples.

We add these annotations in some modules of sage.structure and sage.graphs.

Depends on #32174

CC: @dimpase @tscrim @dcoudert @kwankyu @seblabbe

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 678ffc8

Reviewer: Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/32888

Dependencies: #32174

Last 10 new commits:

b8f0a10src/sage/features/normaliz.py: Add all_features
944bb74src/sage/features/interfaces.py: Add doctests
2463e1eMerge #32866
91f0bccsrc/sage/doctest: Update doctest outputs
12f7c98src/sage/features/polymake.py: Add all_features
c9312dbsrc/sage/features: Add more all_features functions
230d135src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py: Fix doctest markup
873aaf8Merge #32174
b6674c9src/sage/features/sagemath.py: Add feature for sage.groups
4c7620asrc/sage/structure: Mark doctests # optional - sage.groups

Author: Matthias Koeppe

Commit: 4c7620a

Description changed:

--- 
+++ 
@@ -1,4 +1,5 @@
-Most substantial code in `sage.groups` depends on libgap.
+Most substantial code in `sage.groups` depends on `libgap`, so `sage.groups` will not be used in small distributions such as **sagemath-categories** and **sagemath-polyhedra**.
 
 We introduce a `Feature` for use in `# optional` annotations for doctests that use groups as examples.
 
+We add these annotations in some modules of `sage.structure`.

Branch pushed to git repo; I updated commit sha1. New commits:

b7e82d6src/sage/graphs/generic_graph.py: Mark some doctests # optional - sage.groups
9123f4aMerge tag '9.5.beta7' into t/32888/feature_for_sage_groups

Changed commit from 4c7620a to 9123f4a

Changed commit from 9123f4a to 678ffc8

Branch pushed to git repo; I updated commit sha1. New commits:

678ffc8src/sage/graphs: Mark some doctests # optional - sage.groups

Description changed:

--- 
+++ 
@@ -2,4 +2,4 @@
 
 We introduce a `Feature` for use in `# optional` annotations for doctests that use groups as examples.
 
-We add these annotations in some modules of `sage.structure`.
+We add these annotations in some modules of `sage.structure` and `sage.graphs`.
comment:8

The doctest failure:

sage -t --long --random-seed=257599788962651427029619322486358476773 src/sage/tests/cmdline.py
**********************************************************************
File "src/sage/tests/cmdline.py", line 732, in sage.tests.cmdline.test_executable
Failed example:
    print(open(output, 'r').read() == t)          # optional - pandoc
Expected:
    True
Got:
    False

is not from this ticket.

comment:12

copy pasting the command to test modified files here:

sage -tp --show-skipped --long src/sage/features/sagemath.py src/sage/graphs/generators/families.py src/sage/graphs/generic_graph.py src/sage/graphs/graph.py src/sage/structure/coerce.pyx src/sage/structure/coerce_actions.pyx src/sage/structure/element.pyx
comment:13

Looks good:

Doctesting 7 files using 8 threads.
sage -t --long --random-seed=38653494100888138766420548794182203547 src/sage/features/sagemath.py
    0 tests not run because we ran out of time
    [34 tests, 0.02 s]
sage -t --long --random-seed=38653494100888138766420548794182203547 src/sage/structure/coerce_actions.pyx
    0 tests not run because we ran out of time
    [150 tests, 0.72 s]
sage -t --long --random-seed=38653494100888138766420548794182203547 src/sage/structure/coerce.pyx
    0 tests not run because we ran out of time
    [352 tests, 1.48 s]
sage -t --long --random-seed=38653494100888138766420548794182203547 src/sage/structure/element.pyx
    9 magma tests not run
    1 test for not implemented functionality not run
    0 tests not run because we ran out of time
    [728 tests, 17.81 s]
sage -t --long --random-seed=38653494100888138766420548794182203547 src/sage/graphs/generators/families.py
    2 not tested tests not run
    0 tests not run because we ran out of time
    [426 tests, 20.27 s]
sage -t --long --random-seed=38653494100888138766420548794182203547 src/sage/graphs/graph.py
    2 mcqd tests not run
    2 not tested tests not run
    13 python_igraph tests not run
    0 tests not run because we ran out of time
    [1216 tests, 25.89 s]
sage -t --long --random-seed=38653494100888138766420548794182203547 src/sage/graphs/generic_graph.py
    6 not tested tests not run
    39 python_igraph tests not run
    0 tests not run because we ran out of time
    [3656 tests, 40.70 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 41.4 seconds
    cpu time: 93.7 seconds
    cumulative wall time: 106.9 seconds
Features detected for doctesting: graphviz,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.plot,sage.rings.number_field,sage.rings.real_double,sage.symbolic

I observe that sage.groups appear in the list of detected features.

Patchbot is totally green.

Reviewer: Sébastien Labbé

comment:14

Thanks!