sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

py3: new doctest failures in homology #26966

Closed jhpalmieri closed 5 years ago

jhpalmieri commented 5 years ago

With Python 3, before #26931:

sage -t src/sage/homology/simplicial_complex.py  # 22 doctests failed
sage -t src/sage/homology/examples.py  # 7 doctests failed

After #26931:

sage -t src/sage/homology/examples.py  # 14 doctests failed
sage -t src/sage/homology/simplicial_complex.py  # 35 doctests failed
sage -t src/sage/homology/simplicial_set.py  # 6 doctests failed
sage -t src/sage/homology/delta_complex.py  # 3 doctests failed
sage -t src/sage/homology/simplicial_complexes_catalog.py  # 3 doctests failed

After this branch:

sage -t src/sage/homology/simplicial_complex.py  # 10 doctests failed
sage -t src/sage/homology/examples.py  # 1 doctest failed

Component: python3

Author: John Palmieri

Branch/Commit: 3da1d0f

Reviewer: Jeroen Demeyer, Travis Scrimshaw

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

tscrim commented 5 years ago
comment:44

Two additional things; everything else LGTM.

jhpalmieri commented 5 years ago
comment:45

Replying to @tscrim:

Two additional things; everything else LGTM.

  • return tuple(self._vertex_to_index.keys()) is better as return tuple(self._vertex_to_index)

Sure, sounds good.

  • In product, is there some way we can avoid creating two simplicial complexes? I imagine it is slower to do it twice. Why not for the first case return the simplicial complex and for the second use the facets?

Yes. I think when I first wrote this, I was going to use something produced by the __init__ method and so I was constructing the simplicial complex to avoid code duplication. That doesn't seem to be the case any more, so you're right, I can just use facets in the second case.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Changed commit from 95f6026 to 3da1d0f

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

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

3da1d0ftrac 26966: following reviewer suggestions to simplify a little code.
tscrim commented 5 years ago
comment:47

Thanks.

tscrim commented 5 years ago

Reviewer: Jeroen Demeyer, Travis Scrimshaw

jhpalmieri commented 5 years ago
comment:48

Great, thanks for reviewing!

vbraun commented 5 years ago

Changed branch from u/jhpalmieri/sorting-simplicial-complexes to 3da1d0f