-
-
Notifications
You must be signed in to change notification settings - Fork 657
Description
As a follow-up on #31296 and part of Meta-ticket #30818, we create Feature
s for gfan executables and use these features in sage.interfaces.gfan
.
This makes Sage become fully functional even when not being run from within sage-env
(which sets PATH
).
To test:
$ venv/bin/python3 -c 'from sage.all import PolynomialRing, QQ; R = PolynomialRing(QQ,["z1","zz1"]); z1,zz1 = R.gens(); print(R.ideal([z1**2*zz1-1,zz1-2]).groebner_fan().maximal_total_degree_of_a_groebner_basis())'
2
Following pycodestyle advice, we replace I
by input
and we add a deprecation message for it:
sage: _ = gfan(I='Q[x,y]{x^2-y-1,y^2-xy-2/3}', cmd='bases')
doctest:...:
DeprecationWarning: use the option 'input' instead of 'I'
See https://trac.sagemath.org/33468 for details.
Moreover, the format
argument was ignored, so we added a deprecation warning about it:
sage: _ = gfan(input='Q[x,y]{x^2-y-1,y^2-xy-2/3}', cmd='bases', format=True)
doctest:...:
DeprecationWarning: argument `format` is ignored in the code: it is now deprecated. Please update your code without this argument as it will be removed in a later version of SageMath.
See https://trac.sagemath.org/33468 for details.
We also added a deprecation for using the ignored format
argument in the gfan method as used here:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: gf = R.ideal([x^3-y,y^3-x-1]).groebner_fan()
sage: gf.gfan(format=True)
... DeprecationWarning: argument `format` is ignored in the code: it is now deprecated. Please update your code without this argument as it will be removed in a later version of SageMath.
See https://trac.sagemath.org/33468 for details.
gf.gfan(format=True)
'Q[x,y]\n{{\ny^9-1-y+3*y^3-3*y^6,\nx+1-y^3}\n,\n{\nx^3-y,\ny^3-1-x}\n,\n{\nx^9-1-x,\ny-x^3}\n}\n'
Depends on #31296
CC: @seblabbe
Component: refactoring
Author: Matthias Koeppe, Sébastien Labbé
Branch/Commit: 7fd1d61
Reviewer: Sébastien Labbé, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/33468