sagemath/sage

sage.geometry.polyhedron: Mark doctests # optional - sage.rings.number_field

Closed this issue · 19 comments

(cherry-picked from #32432)

Depends on #32614

CC: @kliem @tscrim

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 1400654

Reviewer: Jonathan Kliem

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

Author: Matthias Koeppe

Dependencies: #32614

Description changed:

--- 
+++ 
@@ -1 +1 @@
-
+(cherry-picked from #32432)

Commit: b84efa5

Last 10 new commits:

654d09csage.features.sagemath: Change sage_optional_tags to sage_features
f63a7d0src/sage/features/: Move features depending on optional packages to separate files
be9e715Merge #32614
c0e73d8src/sage/geometry/polyhedron/double_description.py: Add # optional - sage.rings.number_field
49658e0src/sage/geometry/polyhedron/backend_normaliz.py: Mark non-rational examples # optional - sage.rings.number_field
a47c25bsrc/sage/geometry/polyhedron/constructor.py: Mark doctests # optional - sage.rings.number_field
9ab8040src/sage/geometry/polyhedron/backend_field.py: Mark doctests # optional - sage.rings.number_field
ce90678src/sage/geometry/polyhedron/base_ZZ.py: Mark a doctest # optional - sage.rings.number_field
607598asrc/sage/geometry/polyhedron/base.py: Mark more doctests # optional - sage.rings.number_field
b84efa5src/sage/geometry/polyhedron/base.py: Mark more doctests # optional - sage.rings.number_field

Changed commit from b84efa5 to 1dee580

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

1dee580src/sage/geometry/polyhedron/{base,backend_field}.py: Add some missing # optional
kliem commented
comment:5

Does sage.symbolic imply sage.rings.number_field?

-    sage: Polyhedron([(0,0), (1,0), (1/2, sqrt(3)/2)])
+    sage: Polyhedron([(0,0), (1,0), (1/2, sqrt(3)/2)])                          # optional - sage.symbolic
     Traceback (most recent call last):
     ...
     ValueError: no default backend for computations with Symbolic Ring
 
-    sage: SR.is_exact()
+    sage: SR.is_exact()                                                         # optional - sage.symbolic
     False
kliem commented

Reviewer: Jonathan Kliem

comment:7

Replying to @kliem:

Does sage.symbolic imply sage.rings.number_field?

No, but number fields are not used in this example

comment:8

Although here:

--- a/src/sage/geometry/polyhedron/constructor.py
+++ b/src/sage/geometry/polyhedron/constructor.py
@@ -177,8 +177,8 @@ equilateral triangle whose vertex coordinates involve `\sqrt{3}`. An
 exact way to work with roots in Sage is the :mod:`Algebraic Real Field
 <sage.rings.qqbar>` ::
 
-    sage: triangle = Polyhedron([(0,0), (1,0), (1/2, sqrt(3)/2)], base_ring=AA)
-    sage: triangle.Hrepresentation()
+    sage: triangle = Polyhedron([(0,0), (1,0), (1/2, sqrt(3)/2)], base_ring=AA) # optional - sage.rings.number_field
+    sage: triangle.Hrepresentation()                                            # optional - sage.rings.number_field
     (An inequality (-1, -0.5773502691896258?) x + 1 >= 0,
      An inequality (1, -0.5773502691896258?) x + 0 >= 0,
      An inequality (0, 1.154700538379252?) x + 0 >= 0)

I should have marked it optional - sage.rings.number_field sage.symbolic

Changed commit from 1dee580 to 1bb9d96

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

1bb9d96src/sage/geometry/polyhedron/constructor.py: More # optional - sage.symbolic
kliem commented
comment:10

LGTM.

comment:11

Thank you!

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

4558791Merge tag '9.5.beta3' into t/32614/features_and_optional_tags_for_sage_subset_distributions
1400654Merge #32614

Changed commit from 1bb9d96 to 1400654