sagemath / sage

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

sage.geometry.polyhedron: More # optional - sage.rings.number_field #34195

Closed mkoeppe closed 1 year ago

mkoeppe commented 2 years ago

We also remove some module-level imports of AA etc.

Split out from #32432.

CC: @kliem @jplab @yuan-zhou @sheerluck

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: da3d534

Reviewer: Jonathan Kliem

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

mkoeppe commented 2 years ago

Branch: u/mkoeppe/sage_geometry_polyhedronmore__optionalsage_rings_number_field

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1 +1,4 @@
+We also remove some module-level imports of `AA` etc.

+Split out from #32432.
+
mkoeppe commented 2 years ago

Author: Matthias Koeppe

mkoeppe commented 2 years ago

New commits:

2d1d0e3Polyhedra_base._repr_base_ring: Factor out from ._repr_ambient_module, do not fail if AA cannot be imported
9a8ff00src/sage/geometry/polyhedron/parent.py: Mark doctests # optional - sage.rings.number_field
dcbb3b6sage.geometry: Remove module-level imports of AA, RR, PolynomialRing
f9222aesage.geometry: More # optional - sage.rings.number_field
mkoeppe commented 2 years ago

Commit: f9222ae

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from f9222ae to 278b93f

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9e6b7b2Polyhedra_base._repr_base_ring: Factor out from ._repr_ambient_module, do not fail if AA cannot be imported
22e4b7csrc/sage/geometry/polyhedron/parent.py: Mark doctests # optional - sage.rings.number_field
2a0c39asage.geometry: Remove module-level imports of AA, RR, PolynomialRing
278b93fsage.geometry: More # optional - sage.rings.number_field
kliem commented 1 year ago
comment:6

Please take care of the pyflakes errors. In particular you removed imports of ZZ, QQ also leading to doctest errors:

+src/sage/geometry/polyhedron/backend_normaliz.py:2480:20 undefined name 'PolynomialRing'
+src/sage/geometry/polyhedron/backend_normaliz.py:2480:35 undefined name 'QQbar'
+src/sage/geometry/polyhedron/backend_normaliz.py:2481:24 undefined name 'PolynomialRing'
+src/sage/geometry/polyhedron/base.py:54:1 'sage.rings.abc' imported but unused
+
+src/sage/geometry/polyhedron/base0.py:1369:36 undefined name 'ZZ'
+src/sage/geometry/polyhedron/base0.py:1369:62 undefined name 'QQ'
+src/sage/geometry/polyhedron/base0.py:1430:36 undefined name 'ZZ'
+src/sage/geometry/polyhedron/base0.py:1430:62 undefined name 'QQ'
+
+src/sage/geometry/polyhedron/base3.py:1865:17 'sage.graphs.graph' imported but unused
+
+src/sage/geometry/polyhedron/base6.py:701:17 'sage.graphs.graph' imported but unused
+
+src/sage/geometry/polyhedron/parent.py:178:13 local variable 'polymake_base_field' is assigned to but never used
+found 11 pyflakes errors in the modified files
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 278b93f to 0f12ac2

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

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

0f12ac2src/sage/geometry/polyhedron/base0.py: Restore lost imports
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

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

74bc04bsrc/sage/geometry/polyhedron/base{3,6}.py: Muffle pyflakes warnings about unused imports
7db47e1src/sage/geometry/polyhedron/parent.py: Muffle pyflakes warning
6dd4f07src/sage/geometry/polyhedron/base.py: Remove unused import
1ede214src/sage/geometry/polyhedron/backend_normaliz.py: Add missing imports
341475csrc/sage/geometry/polyhedron/base_ZZ.py: Replace .all import
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 0f12ac2 to 341475c

mkoeppe commented 1 year ago
comment:9

Thanks, this got damaged in the rebase

kliem commented 1 year ago
comment:11

LGTM.

kliem commented 1 year ago

Reviewer: Jonathan Kliem

mkoeppe commented 1 year ago
comment:12

Thank you!

vbraun commented 1 year ago
comment:13

Merge failure on top of:

9862c70756f Trac #34192: Remove imports from sage.rings.all in sage.calculus, functions, symbolic

8f685a4cefb Trac #34191: Remove imports from sage.rings.all in sage.modular

f8203dc3037 Trac #34190: Remove imports from sage.rings.all in sage.schemes

45224c914eb Trac #34128: Improve symbolic operators documentation

f4f200cb706 Trac #34075: pycodestyle cleanup in 5 files of src/sage/graphs/

caf3ef9b5db Trac #34074: pycodestyle cleanup in src/sage/graphs/graph_generators.py

36aa214c169 Trac #34054: Update documentation for EnumeratedFamily

7e8dc2caa7e Trac #33972: Another error in height_difference_bound

287293822d9 Trac #33953: Add some methods to projective morphisms (rational maps)

f927079fb4f Trac #33900: small enhancements to generic discrete logs

98fac39c5fd Trac #34425: configure vscode pycodestyle linter

57d6905ee40 Trac #34424: Common base class for FiniteRankFreeModule and TensorFreeModule

60421de93df Trac #34407: Refactor lazy series code so that it works over any graded ring

6ddea258611 Trac #34401: some details about MZV

78854caa4f0 Trac #34400: EnumeratedSets: Add method 'tuple', avoid making copies

60e10d2bf7d Trac #34393: add method "tensor_factors" to tensor products

9c80ec3d625 Trac #34377: Improvements to ImageSet

d83fb880415 Trac #34376: Set_object_enumerated should be in FiniteEnumeratedSets()

f84d7a4402d Trac #34374: Use cantor_product for Cartesian products of infinite enumerated sets

1749b85ad9d Trac #34373: Implement multimajor index for permutations

85b5ab977f2 Trac #34372: Make is_integral_domain() have the same signature

e874714965a Trac #34371: support factoring polynomials modulo prime powers

8a12a20563e Trac #34370: Add examples to Schubert polynomials documentation

a313529389d Trac #33671: Add devcontainer.json for development with VS Code in a Docker container

8a41fd62faa Trac #32324: Lazy Taylor Series

ae8a36d1191 Trac #32887: update sagetex to version 3.6.1

a41531c2417 Trac #34355: avoid constructing list of all base-field elements in QuaternionAlgebra_ab.modp_splitting_data()

b56e1c9dbf8 Trac #34352: Add comma in vscode.json config file

ad0536886ec Trac #34343: Speed up computing outside corners of partition

420bbe2527b Trac #34341: Fix bool(expr1 != expr2) for nontrivially equal expressions

5114e87c4cb Trac #34339: Speedup adding horizontal and vertical border strips

efc1cd01a1a Trac #34330: bug in LaurentPolynomial_univariate.quo_rem

d23fe5dd391 Trac #34326: ConvexSet_base.representative_point, Polyhedron_base.an_affine_basis for unbounded polyhedra

5a0647fc2bf Trac #34308: use libgap for abelian subgroups

87ea5fb3524 Trac #34306: Better use of graphs in src/sage/geometry/hyperplane_arrangement/library.py

9005c089e86 Trac #34303: Îlu algorithm: asymptotically faster elliptic-curve isogenies

4495944a9b7 Trac #34296: GH Actions: Upload wheels to PyPI

6b373e66d8d Trac #34292: Group algebra bug

42beee41cec Trac #34283: Prevent circular import of matrix space

cb618a34343 Trac #34281: defer primality and irreducibility testing in GF constructor until after caching

456c8fb7855 Trac #34261: Allow multiplication of a left and right noncommutative ideal

86ae68f849f Trac #34222: polymake: Upgrade to 4.7, remove deprecated Polymake_expect interface

cba438f7cac Trac #34219: Document that SageTeX is now in SAGE_ROOT/venv/share

0175f5a2c5c Trac #34186: Problem translating Fricas special function ellipticF to Sagemath

8f6d1ac645d Trac #33950: Add free and multigraded free resolutions with libSingular backend

894a2969311 Trac #23075: copy(CombinatorialFreeModule.Element) broken by #22632

163f7153798 Trac #33851: Script package _develop; improve installation instructions in the manual

fe976b3f0bb Trac #34301: Remove claims that Cygwin is supported

ea2758f6b1d Trac #34211: Fix bug due to a call to SSLContext() in src/sage/graphs/isgci.py

e96e201a66b Trac #34188: provide hash for decorated permutations

6f0dbf92b17 Trac #34138: Groebner bases for exterior algebras native to Sage

8a4672c14dc Trac #34116: add exact division of power series by coefficient

75d9213d64e Trac #32992: update ninja_build to 1.11.0, make it standard, add lower version bound

1c178e0b7f2 Trac #32369: Rewrite Clifford and exterior algebras to have a basis indexed by integers

2c4005d2cab Trac #31276: Tensor Product Method for FiniteRankFreeModule

3091ae98ae8 Trac #30300: sage.tensor.modules.free_module_basis: Make Basis_abstract a subclass of AbstractFamily

3f624d59f31 Trac #30235: Add construction methods to FiniteRankFreeModule, CombinatorialFreeModule and Cartesian products

a4442412904 Trac #29717: Cubic Hecke Algebras

ee070f20cd4 Trac #34442: Set version upper bound for setuptools: <64.0

24a6ab4b654 Trac #34367: README.md, installation guide: Mention cocalc Docker image instead of sagemath/sagemath image

0b2cecce13f Trac #34324: Fix deprecated import of instancedoc

758ce2c8bce Trac #30787: package modular_resolution: Split out from p_group_cohomology

a5bf7100496 Trac #34421: Fix timeout in jupyter_jsmol installation

bed45ffacc2 Trac #34360: curl configure --without-libmetalink no longer works

fb050b1204e Trac #34298: conda: 3d graphics do not show

20d7f182a25 Trac #34273: opensuse-tumbleweed: python3 build fails because of openssl

696bf78075d Trac #34270: .gitpod.yml: Do not hardcode the workspace name as sagetrac-mirror

5b7fc7e1d17 Trac #25675: Crosslinks to poset catalog, add documentation of sage.geometry.polyhedron.base* and combinatorial_polyhedron

4285f3c06e5 Trac #34295: Followup to #33627: fix documentation that mentions sage-gdb-commands

08b5040887f Trac #34294: SimplicialComplex: Add method is_subcomplex

9b5044a9347 Trac #34289: minor tweaks in the doc

75ae420b63b Trac #34288: some rst fixes in pyx files in coding, graphs and groups

2f94ddf09d3 Trac #34293: rubiks: Work around build failure with XCode

945c339e11b Trac #34291: Downgrade some optional packages to experimental in Sage 9.7

a965858a628 Trac #34157: Meta ticket: fix docstring markups

e9304778c6f Trac #34147: Implement the quantum Clifford algebra at a root of unity

75aaf289973 Trac #33596: PolyhedralComplex.plot(explosion_factor=1)

e9efc9c6349 Trac #33586: Triangulation.polyhedral_complex, boundary_simplicial_complex, boundary_polyhedral_complex

5247961337f Trac #34221: Backport PEP420 namespace package support from Cython 3

12be2d94c86 Updated SageMath version to 9.7.beta8

merge was not clean: conflicts in src/sage/geometry/polyhedron/parent.py

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

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

dd87ab9Merge tag '9.7.rc0' into t/34195/sage_geometry_polyhedron__more___optional___sage_rings_number_field
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 341475c to dd87ab9

mkoeppe commented 1 year ago
comment:16

#34479 comment:10

yuan-zhou commented 1 year ago

Changed branch from u/mkoeppe/sage_geometry_polyhedronmore__optionalsage_rings_number_field to u/yzh/sage_geometry_polyhedronmore__optionalsage_rings_number_field

mkoeppe commented 1 year ago

New commits:

da3d534assert isinstance(polymake_base_field, PolymakeElement) to muffle pyflakes and keep polymake tests
mkoeppe commented 1 year ago

Changed commit from dd87ab9 to da3d534

sheerluck commented 1 year ago
comment:20

positive review for already positive reviewed ticket after small fix

mkoeppe commented 1 year ago
comment:21

Thanks!

vbraun commented 1 year ago

Changed branch from u/yzh/sage_geometry_polyhedronmore__optionalsage_rings_number_field to da3d534