Bug 837857 - RFE: Make gfan more friendly to sagemath and better install and subpackage layout
Summary: RFE: Make gfan more friendly to sagemath and better install and subpackage la...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gfan
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Conrad Meyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-05 15:28 UTC by Paulo Andrade
Modified: 2012-07-06 17:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-06 17:39:27 UTC
Type: Bug


Attachments (Terms of Use)

Description Paulo Andrade 2012-07-05 15:28:59 UTC
Added a gfan-permissive.patch to avoid it failing if called as just "gfan" instead of "gfan_bases", what was ok in previous versions.

Made a -doc subpackage to install the examples subdir and also install the homepage subdir as %doc (in the -doc package), as it contains a lot of useful information.

Enable back %check

Use the gfan command itself to create it's symlinks, now all in %{_bindir}

Previously:

---%<---%<---%<---
sage -t  -force_lib "devel/doc/en/tutorial/tour_advanced.rst"
[?1034h**********************************************************************
File "/usr/share/sagemath/devel/doc/en/tutorial/tour_advanced.rst", line 66:
    sage: F.reduced_groebner_bases ()
Exception raised:
    Traceback (most recent call last):
      File "/usr/share/sagemath/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/usr/share/sagemath/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/usr/share/sagemath/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_1[5]>", line 1, in <module>
        F.reduced_groebner_bases ()###line 66:
    sage: F.reduced_groebner_bases ()
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/groebner_fan.py", line 693, in reduced_groebner_bases
        G = self._gfan_reduced_groebner_bases()
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/groebner_fan.py", line 644, in _gfan_reduced_groebner_bases
        B = self.gfan()
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/groebner_fan.py", line 752, in gfan
        s = gfan(I, cmd, verbose=self.__verbose, format=format)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/gfan.py", line 66, in __call__
        raise RuntimeError, err
    RuntimeError: This is the Gfan program for computing Groebner fans and tropical varieties.
    Use the command "gfan list" to view all subcommands.
    The command "gfan" is deprecate for computing all Groebner bases of an ideal.
    Please use subcommand "gfan _bases" instead. Awaiting input. <Ctrl>-D to end.
    LP algorithm being used: "cddgmp".

**********************************************************************
File "/usr/share/sagemath/devel/doc/en/tutorial/tour_advanced.rst", line 75:
    sage: F.polyhedralfan()
Exception raised:
    Traceback (most recent call last):
      File "/usr/share/sagemath/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/usr/share/sagemath/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/usr/share/sagemath/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_1[6]>", line 1, in <module>
        F.polyhedralfan()###line 75:
    sage: F.polyhedralfan()
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/groebner_fan.py", line 827, in polyhedralfan
        f = self.gfan(cmd='topolyhedralfan', I=self._gfan_reduced_groebner_bases())
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/groebner_fan.py", line 644, in _gfan_reduced_groebner_bases
        B = self.gfan()
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/groebner_fan.py", line 752, in gfan
        s = gfan(I, cmd, verbose=self.__verbose, format=format)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/gfan.py", line 66, in __call__
        raise RuntimeError, err
    RuntimeError: This is the Gfan program for computing Groebner fans and tropical varieties.
    Use the command "gfan list" to view all subcommands.
    The command "gfan" is deprecate for computing all Groebner bases of an ideal.
    Please use subcommand "gfan _bases" instead. Awaiting input. <Ctrl>-D to end.
    LP algorithm being used: "cddgmp".

**********************************************************************
1 items had failures:
   2 of   8 in __main__.example_1
***Test Failed*** 2 failures.
For whitespace errors, see the file /home/pcpa/.sage//tmp/tour_advanced_24227.py
	 [3.0 s]
---%<---%<---%<---

and now:

---%<---%<---%<---
$ sage -t  -force_lib "devel/doc/en/tutorial/tour_advanced.rst"
sage -t -force_lib "devel/doc/en/tutorial/tour_advanced.rst"
**********************************************************************
File "/usr/share/sagemath/devel/doc/en/tutorial/tour_advanced.rst", line 66:
    sage: F.reduced_groebner_bases ()
Expected:
    [[-c^2 + b*d, -b*c + a*d, -b^2 + a*c],
     [c^2 - b*d, -b*c + a*d, -b^2 + a*c],
     [c^2 - b*d, b*c - a*d, -b^2 + a*c, -b^3 + a^2*d],
     [c^2 - b*d, b*c - a*d, b^3 - a^2*d, -b^2 + a*c],
     [c^2 - b*d, b*c - a*d, b^2 - a*c],
     [-c^2 + b*d, b^2 - a*c, -b*c + a*d],
     [-c^2 + b*d, b*c - a*d, b^2 - a*c, -c^3 + a*d^2],
     [c^3 - a*d^2, -c^2 + b*d, b*c - a*d, b^2 - a*c]]
Got:
    [[-c^2 + b*d, -b*c + a*d, -b^2 + a*c], [-c^2 + b*d, b^2 - a*c, -b*c + a*d], [-c^2 + b*d, b*c - a*d, b^2 - a*c, -c^3 + a*d^2], [c^3 - a*d^2, -c^2 + b*d, b*c - a*d, b^2 - a*c], [c^2 - b*d, -b*c + a*d, -b^2 + a*c], [c^2 - b*d, b*c - a*d, -b^2 + a*c, -b^3 + a^2*d], [c^2 - b*d, b*c - a*d, b^3 - a^2*d, -b^2 + a*c], [c^2 - b*d, b*c - a*d, b^2 - a*c]]
**********************************************************************
1 items had failures:
   1 of   8 in __main__.example_1
***Test Failed*** 1 failures.
For whitespace errors, see the file /home/pcpa/.sage//tmp/tour_advanced_19053.py
         [5.8 s]
 
----------------------------------------------------------------------
The following tests failed:


        sage -t -force_lib "devel/doc/en/tutorial/tour_advanced.rst"
Total time for all tests: 5.8 seconds
---%<---%<---%<---

  I will make a sagemath bug report about this specific failure, to ensure if the new result in that specific test is also valid or if there is a bug somewhere, i.e. after adjusting spaces, the diff is:

---%<---
$ diff -u ~/{old,new}
--- /home/pcpa/old      2012-07-05 12:27:50.823418301 -0400
+++ /home/pcpa/new      2012-07-05 12:27:56.591418588 -0400
@@ -1,8 +1,8 @@
     [[-c^2 + b*d, -b*c + a*d, -b^2 + a*c],
+     [-c^2 + b*d, b^2 - a*c, -b*c + a*d],
+     [-c^2 + b*d, b*c - a*d, b^2 - a*c, -c^3 + a*d^2],
+     [c^3 - a*d^2, -c^2 + b*d, b*c - a*d, b^2 - a*c],
      [c^2 - b*d, -b*c + a*d, -b^2 + a*c],
      [c^2 - b*d, b*c - a*d, -b^2 + a*c, -b^3 + a^2*d],
      [c^2 - b*d, b*c - a*d, b^3 - a^2*d, -b^2 + a*c],
-     [c^2 - b*d, b*c - a*d, b^2 - a*c],
-     [-c^2 + b*d, b^2 - a*c, -b*c + a*d],
-     [-c^2 + b*d, b*c - a*d, b^2 - a*c, -c^3 + a*d^2],
-     [c^3 - a*d^2, -c^2 + b*d, b*c - a*d, b^2 - a*c]]
+     [c^2 - b*d, b*c - a*d, b^2 - a*c]]
---%<---

Suggested new package:
Spec URL: http://fedorapeople.org/~pcpa/gfan.spec
SRPM URL: http://fedorapeople.org/~pcpa/gfan-0.5-4.fc18.src.rpm

Comment 1 Paulo Andrade 2012-07-05 15:41:43 UTC
Sagemath ticket at http://trac.sagemath.org/sage_trac/ticket/13207

Comment 2 Conrad Meyer 2012-07-06 02:03:56 UTC
I don't have much time or particular interest in the Sagemath packages anymore. Do you want to take co- or full maintainership of gfan and just fix it? Thanks!

Comment 3 Paulo Andrade 2012-07-06 14:40:24 UTC
Ok, just asked for commit access.

Comment 4 Paulo Andrade 2012-07-06 17:39:27 UTC
Problem corrected in latest rawhide gfan build.


Note You need to log in before you can comment on or make changes to this bug.