sagemath / sage

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

sage.geometry: More # optional for test with examples that need sage.combinat, sage.rings.number_field, sage.plot #32732

Closed mkoeppe closed 2 years ago

mkoeppe commented 2 years ago

cherry-picked from #32432.

We also fix up sage.features.sagemath.

CC: @kliem

Component: refactoring

Author: Matthias Koeppe

Branch: b846c0a

Reviewer: Dima Pasechnik

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

mkoeppe commented 2 years ago

Branch: u/mkoeppe/sage_geometry_polyhedron__more___optional_for_test_with_examples_that_need_sage_combinatetc

mkoeppe commented 2 years ago

Commit: 03ea96d

mkoeppe commented 2 years ago

Last 10 new commits:

7094aabsage.geometry.polyedron.combinatorial_polyhedron: Mark more doctests # optional - sage.combinat
7ff2f74src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx: Some more # optional
6baf055src/sage/geometry/polyhedron/base.py: Some more # optional
7c73a01src/sage/geometry/polyhedron/base.py: Some more # optional
5a3dbf4src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx: Mark doctests # optional - sage.rings.number_field or sage.combinat
e236b52src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx: More # optional
d892e34git grep -l 'sage:.*plot' src/sage/geometry/ | xargs sed -i.bak '/sage: .*plot(/s/$/ # optional - sage.plot/'
2fd3fdfsrc/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx: Add '# optional - sage.combinat' for tests using combinatorial examples
59246d4src/sage/geometry/polyhedron/representation.py: Add '# optional - sage.rings.number_field' in doctests
03ea96dsrc/sage/geometry/polyhedron/backend_polymake.py: Add # optional - sage.rings.number_field
mkoeppe commented 2 years ago

Author: Matthias Koeppe

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

Changed commit from 03ea96d to c97428e

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

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

c97428esrc/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx: fix typo
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1 +1 @@
-
+cherry-picked from #32432
dimpase commented 2 years ago

Reviewer: Dima Pasechnik

dimpase commented 2 years ago
comment:6

lgtm

mkoeppe commented 2 years ago
comment:7

Thanks!

mkoeppe commented 2 years ago
comment:8

Except the patchbot indicates some failures

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

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

d77eb85sage.geometry: Add missing # optional tags
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from c97428e to d77eb85

mkoeppe commented 2 years ago
comment:10

But there's something else wrong: The log indicates Using --optional=argcomplete,build,ccache,debian,dochtml,pip,sage,sage.rings.real_double,sage_spkg ... lots of the components such as sage.plot are missing

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

Changed commit from d77eb85 to 7755df9

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

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

905ead9sage.features.PythonModule: Record the exception message as part of the reason
7755df9sage.doctest.control, sage.features.sagemath: If --verbose is used, log the feature test results and reasons
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1 +1,3 @@
-cherry-picked from #32432
+cherry-picked from #32432.
+
+We also fix up `sage.features.sagemath`.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 7755df9 to f32b992

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

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

f32b992src/sage/features/sagemath.py (sage.combinat): Fix the name of the tested PythonModule
mkoeppe commented 2 years ago
comment:14

With the new diagnostic messages issued with sage -t --verbose, we see:

FeatureTestResult('sage.combinat.combination', False), reason: Failed to import `sage.combinat.combination`: cannot import name complex_mpfr
FeatureTestResult('sage.graphs.graph', False), reason: Failed to import `sage.graphs.graph`: cannot import name complex_mpfr
FeatureTestResult('sage.plot.plot', False), reason: Failed to import `sage.plot.plot`: cannot import name complex_mpfr
FeatureTestResult('sage.rings.number_field.number_field_element', False), reason: Failed to import `sage.rings.number_field.number_field_element`: cannot import name complex_mpfr
FeatureTestResult('sage.rings.real_double', True), reason: Successfully imported `sage.rings.real_double`.
FeatureTestResult('sage.symbolic.expression', False), reason: Failed to import `sage.symbolic.expression`: cannot import name complex_mpfr

So some cyclic import business is happening here

mkoeppe commented 2 years ago
comment:16

Fixing the imports, or alternatively running the sagemath feature tests after sage.all has been imported, will be done in a follow-up ticket.

Let's see what the patchbot says now.

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

Changed commit from f32b992 to 30eee2e

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

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

30eee2esrc/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py: Add another missing # optional - sage.plot
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 30eee2e to c1b1d93

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

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

c1b1d93src/sage/geometry/polyhedron/plot.py: Add more # optional - sage.plot
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from c1b1d93 to 98522e0

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

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

eb31b22src/sage/geometry/voronoi_diagram.py: Add # optional - sage.rings.number_field
d1b3bcasrc/sage/geometry/integral_points.pyx: Add # optional - sage.rings.number_field
98522e0src/sage/numerical: Add # optional - sage.rings.number_field
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 98522e0 to b846c0a

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

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

b846c0asrc/sage/numerical/backends/interactivelp_backend.pyx: Add missing # optional
dimpase commented 2 years ago
comment:22

lgtm

mkoeppe commented 2 years ago
comment:23

Thanks!

vbraun commented 2 years ago

Changed branch from u/mkoeppe/sage_geometry_polyhedron__more___optional_for_test_with_examples_that_need_sage_combinatetc to b846c0a

antonio-rojas commented 2 years ago
comment:25

Is there a ticket to fix the imports already? Lots of tests are being skipped in beta6 because of this.

antonio-rojas commented 2 years ago

Changed commit from b846c0a to none

mkoeppe commented 2 years ago
comment:26

Help is welcome on tickets