Skip to content

Gap 4.13 released, some doctest failures #37616

Closed

Description

@tornaria
----------------------------------------------------------------------
sage -t --warn-long 10.0 --random-seed=32031828330801998112684409287747815985 sage/groups/perm_gps/permgroup_named.py  # 3 doctests failed
sage -t --warn-long 10.0 --random-seed=32031828330801998112684409287747815985 sage/interfaces/gap.py  # 1 doctest failed
sage -t --warn-long 10.0 --random-seed=32031828330801998112684409287747815985 sage/categories/simplicial_sets.py  # 7 doctests failed
sage -t --warn-long 10.0 --random-seed=32031828330801998112684409287747815985 sage/groups/finitely_presented.py  # 5 doctests failed
sage -t --warn-long 10.0 --random-seed=32031828330801998112684409287747815985 sage/groups/libgap_wrapper.pyx  # 1 doctest failed
sage -t --warn-long 10.0 --random-seed=32031828330801998112684409287747815985 sage/interfaces/gap3.py  # 2 doctests failed
----------------------------------------------------------------------

Mostly seem to be due to changes in order of generators.

Activity

  1. dimpase commented on Mar 17, 2024

    @dimpase
    Member

    why is gap3 involved here?

    is it compared with gap4.13?

  2. tornaria commented on Mar 17, 2024

    @tornaria
    MemberAuthor
    sage -t --long --warn-long 30.0 --random-seed=136505318494519323046791635148959727560 sage/interfaces/gap3.py
    **********************************************************************
    File "sage/interfaces/gap3.py", line 756, in sage.interfaces.gap3.GAP3Element._latex_
    Failed example:
        s._latex_()
    Expected:
        '\\left(\\begin{array}{rr} 1&2\\\\ 3/4&\\frac{5}{6}\\\\ \\end{array}\\right)'
    Got:
        '[ [ 1, 2 ], [ 3/4, 5/6 ] ]' 
    **********************************************************************
    File "sage/interfaces/gap3.py", line 758, in sage.interfaces.gap3.GAP3Element._latex_
    Failed example:
        latex(s)
    Expected:
        \left(\begin{array}{rr} 1&2\\ 3/4&\frac{5}{6}\\ \end{array}\right)
    Got:
        [ [ 1, 2 ], [ 3/4, 5/6 ] ]
    **********************************************************************
    1 item had failures:
       2 of   4 in sage.interfaces.gap3.GAP3Element._latex_
        [11 tests, 2 failures, 0.16 s]
    
  3. tornaria commented on Mar 17, 2024

    @tornaria
    MemberAuthor
  4. dimpase commented on Mar 18, 2024

    @dimpase
    Member
    sage -t --long --warn-long 30.0 --random-seed=136505318494519323046791635148959727560 sage/interfaces/gap3.py
    **********************************************************************
    File "sage/interfaces/gap3.py", line 756, in sage.interfaces.gap3.GAP3Element._latex_
    Failed example:
        s._latex_()
    Expected:
        '\\left(\\begin{array}{rr} 1&2\\\\ 3/4&\\frac{5}{6}\\\\ \\end{array}\\right)'
    Got:
        '[ [ 1, 2 ], [ 3/4, 5/6 ] ]' 
    **********************************************************************
    File "sage/interfaces/gap3.py", line 758, in sage.interfaces.gap3.GAP3Element._latex_
    Failed example:
        latex(s)
    Expected:
        \left(\begin{array}{rr} 1&2\\ 3/4&\frac{5}{6}\\ \end{array}\right)
    Got:
        [ [ 1, 2 ], [ 3/4, 5/6 ] ]
    **********************************************************************
    1 item had failures:
       2 of   4 in sage.interfaces.gap3.GAP3Element._latex_
        [11 tests, 2 failures, 0.16 s]
    

    It's a bug in the tests there; obviously it should be using gap3 (as it otherwise does not test the implementation in this function!), not gap (i.e. gap4). So we should apply

    --- a/src/sage/interfaces/gap3.py
    +++ b/src/sage/interfaces/gap3.py
    @@ -752,7 +752,8 @@ class GAP3Element(GapElement_generic):
             r"""
             EXAMPLES::
     
    -            sage: s = gap("[[1,2], [3/4, 5/6]]")
    +            sage: # optional - gap3
    +            sage: s = gap3("[[1,2], [3/4, 5/6]]")
                 sage: s._latex_()
                 '\\left(\\begin{array}{rr} 1&2\\\\ 3/4&\\frac{5}{6}\\\\ \\end{array}\\right)'
                 sage: latex(s)

    Otherwise we merely testing what gap4 can do (and what you see is that gap4.13 is broken at this place).

    Unfortunately the diff above, with gap3 installed, gives

    File "src/sage/interfaces/gap3.py", line 757, in sage.interfaces.gap3.GAP3Element._latex_
    Failed example:
        s._latex_()
    Expected:
        '\\left(\\begin{array}{rr} 1&2\\\\ 3/4&\\frac{5}{6}\\\\ \\end{array}\\right)'
    Got:
        '1&2\\\\\\n\\frac34&\\frac56\\\\\\n'
    **********************************************************************
    File "src/sage/interfaces/gap3.py", line 759, in sage.interfaces.gap3.GAP3Element._latex_
    Failed example:
        latex(s)
    Expected:
        \left(\begin{array}{rr} 1&2\\ 3/4&\frac{5}{6}\\ \end{array}\right)
    Got:
        1&2\\\n\frac34&\frac56\\\n
    

    OTOH gap3 is an experimental package, so this is tolerable (without gap3 installed, there won't be a doctest failure here, after this patch is applied.

  5. dimpase commented on Mar 18, 2024

    @dimpase
    Member

    I've opened #37624 to fix this little thing - it's quite orthogonal to gap 4.13, so it deserves a separate PR. Please review/approve it.

  6. antonio-rojas commented on Mar 18, 2024

    @antonio-rojas
    Member

    There's one more failure with --long

    File "/usr/lib/python3.11/site-packages/sage/algebras/fusion_rings/fusion_double.py", line 134, in sage.algebras.fusion_rings.fusion_double.FusionDouble
    Failed example:
        b13^2 # long time (4s)
    Expected:
        b0 + b2 + b4 + b15 + b16 + b17 + b18 + b24 + b26 + b27
    Got:
        b0 + b3 + b4
    
  7. antonio-rojas commented on Mar 18, 2024

    @antonio-rojas
    Member

    LaTeX and LaTeXObj are gone in 4.13 (and there doesn't seem to be a replacement)

    gap-system/gap#5524

  8. dimpase commented on Mar 18, 2024

    @dimpase
    Member

    LaTeX and LaTeXObj are gone in 4.13 (and there doesn't seem to be a replacement)

    gap-system/gap#5524

    we can use https://gap-packages.github.io/typeset/ I presume

  9. added a commit that references this issue on Mar 30, 2024
  10. antonio-rojas commented on May 3, 2024

    @antonio-rojas
    Member

    There's one more failure that only manifests itself if bliss is installed

    sage -t --long --random-seed=192739335773734784141473037713226530622 /usr/lib/python3.12/site-packages/sage/graphs/generic_graph.py
    **********************************************************************
    File "/usr/lib/python3.12/site-packages/sage/graphs/generic_graph.py", line 23617, in sage.graphs.generic_graph.GenericGraph.?
    Failed example:
        G.is_isomorphic(H)
    Exception raised:
        Traceback (most recent call last):
          File "/usr/lib/python3.12/site-packages/sage/doctest/forker.py", line 714, in _run
            self.compile_and_execute(example, compiler, test.globs)
          File "/usr/lib/python3.12/site-packages/sage/doctest/forker.py", line 1146, in compile_and_execute
            exec(compiled, globs)
          File "<doctest sage.graphs.generic_graph.GenericGraph.?[14]>", line 1, in <module>
            G.is_isomorphic(H)
          File "/usr/lib/python3.12/site-packages/sage/groups/perm_gps/permgroup.py", line 4287, in is_isomorphic
            iso = self._libgap_().IsomorphismGroups(right)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "sage/libs/gap/element.pyx", line 2645, in sage.libs.gap.element.GapElement_MethodProxy.__call__ (build/cythonized/sage/libs/gap/element.c:27071)
            return GapElement_Function.__call__(self, * ([self.first_argument] + list(args)))
          File "sage/libs/gap/element.pyx", line 2514, in sage.libs.gap.element.GapElement_Function.__call__ (build/cythonized/sage/libs/gap/element.c:26326)
            sig_on()
        sage.libs.gap.util.GAPError: Error, no method found! Error, no 1st choice method found for `Representative' on 1 arguments
        The 1st argument is 'fail' which might point to an earlier problem
    **********************************************************************
    

    But it seems to be an upstream issue
    gap-system/gap#5708

  11. added a commit that references this issue on Jun 10, 2024
    0185e45
  12. orlitzky commented on Jan 19, 2025

    @orlitzky
    Contributor

    We upgraded to GAP 4.13.1 in October.

  13. dimpase commented on Jan 19, 2025

    @dimpase
    Member

    meanwhile GAP 4.14 is out

  14. tornaria commented on Jan 19, 2025

    @tornaria
    MemberAuthor

    meanwhile GAP 4.14 is out

    For me, it works fine without any further change in sagemath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions