Hi!

I just came across ticket #5994, that I had opened when I was a lot
younger (22 months ago). It is about the following strangeness:

sage: singular.version()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call
last)
...
RuntimeError: Singular error:
   ? cannot open `help.cnf`
...
Available HelpBrowsers: dummy, emacs,
Current HelpBrowser: dummy
   ? error occurred in or before STDIN line 19: `system("--version");`
sage: singular.version()
'Singular for x86_64-Linux version 3-1-1 (3114-2010111304)  Nov 13
2010 04:54:57\nwith\n\tfactory(@(#) factoryVersion =
3.1.1),libfac(3.1.1,Feb 2010),\n\tGMP(4.2),NTL(5.4.2),64bit,static
readline,Plural,DBM,\n\tdynamic modules,dynamic
p_Procs,OM_CHECK=0,OM_TRACK=0,random=1299586390\n\tCC= gcc -O3 -g -
fPIC -pipe -DNDEBUG -DOM_NDEBUG -Dx86_64_Linux -DHAVE_CONFIG_H,\n
\tCXX= g++ -O3 -g -fPIC -pipe -DNDEBUG -DOM_NDEBUG -Dx86_64_Linux -
DHAVE_CONFIG_H (4.2.4 (Ubuntu 4.2.4-1ubuntu4))\nargv[0]   :
\tSingular-3-1-1\nSearchPath:\t/usr/local/sage/local/share/singular:/
usr/local/sage/local/LIB\nSingular  :\t/usr/local/sage/local/bin/
Singular\nBinDir    :\t/usr/local/sage/local/bin\nRootDir   :\t/usr/
local/sage/local\nDefaultDir:\t/usr/local/sage/local\nInfoFile  :\t
\nIdxFile   :\t\nHtmlDir   :\t\nManualUrl :\thttp://www.singular.uni-
kl.de/Manual/3-1-1\nExDir     :\t\nPath      :\t/usr/local/sage/local/
bin:/usr/local/sage:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
sbin:/bin:/usr/games\nEmacsDir  :\t\nAvailable HelpBrowsers: dummy,
emacs, \nCurrent HelpBrowser: dummy '


Hence:
1. calling singular.version() for the first time results in an error
2. calling singular.version() another time yields a string with very
detailed information, that is perhaps not what one would expect (I,
for one, expected to get a tuple of integers, namely (3,1,1,4) in this
case).

Ticket #5994 ends with a question (needs info) 8 months ago:
Doctesting singular.version() is very likely to result in a doc test
that needs to be changed whenever the singular version changes. Do we
want such "doctests with expiry date"?

But I think it would be good to invest a bit more work into #5994
anyway. Before I start, let me ask you some questions:
1. I guess it is no problem to ask for a specific version number in
the doc tests, since, after all, an upgrade of Singular rarely occurs.
Agreed?
2. Do you like the idea that singular.version() returns a tuple of
integers? But then, there should perhaps be another method like
singular.version_string(), returning the lengthy version information
above?
3. Or should it be the other way around: singular.version() returns a
string (but please no error!), similar to
  sage: version()
  'Sage Version 4.6, Release Date: 2010-10-30'
and there is another method singular.version_number() returning an
integer tuple?

Best regards,
Simon

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to