Opened 4 years ago

Closed 4 years ago

#18407 closed defect (fixed)

Fix standard_packages(), optional_packages(), and experimental_packages()

Reported by: ncohen Owned by:
Priority: major Milestone: sage-6.7
Component: distribution Keywords:
Cc: vdelecroix, vbraun, leif Merged in:
Authors: Nathann Cohen Reviewers: Leif Leonhardy
Report Upstream: N/A Work issues:
Branch: dd02493 (Commits) Commit: dd02493ece30213f99687945eb01bb16302bf76d
Dependencies: Stopgaps:

Description

Those functions are broken (and not doctested) in the latest beta. This branches fixes it.

Change History (22)

comment:1 Changed 4 years ago by ncohen

  • Branch set to public/18407
  • Status changed from new to needs_review

comment:2 Changed 4 years ago by git

  • Commit set to c400ee6b177b5de2bee7a4467011fa3a75110f27

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

c400ee6trac #18407: Fix standard_packages(), optional_packages(), and experimental_packages()

comment:3 follow-up: Changed 4 years ago by vdelecroix

Is it disjoint from the bash scripts that we have

$ sage -standard
Using Sage Server http://www.sagemath.org/packages

Standard packages:

atlas-3.10.1.p7 ........................ installed version: 3.10.2
boehm_gc-7.2d.p0 ....................... already installed
boost_cropped-1.52.0 ................... already installed
...
tachyon-0.98.9.p5 ...................... already installed
zlib-1.2.8.p0 .......................... already installed
zn_poly-0.9.p11 ........................ already installed

$ sage -optional
Using Sage Server http://www.sagemath.org/packages

Optional packages:

4ti2-1.6.2 ............................. not installed
PyQt_x11-4.9.1.p0 ...................... not installed
TOPCOM-0.17.4 .......................... not installed
autotools-20121217 ..................... not installed
...
trac-0.11.5.p0 ......................... not installed
valgrind-3.8.1.p0 ...................... not installed
zeromq-3.2.0.p0 ........................ installed version: 4.0.5
Last edited 4 years ago by vdelecroix (previous) (diff)

comment:4 follow-up: Changed 4 years ago by leif

Hmmm,

  • that's only part of the problem,
  • I was going to rather fix it by adding a --machine-readable (say) option to sage-list-packages (at #16759, but I haven't written any code yet, also because of #15642).

comment:5 in reply to: ↑ 3 Changed 4 years ago by ncohen

Is it disjoint from the bash scripts that we have

No, it parses the output.

comment:6 in reply to: ↑ 4 Changed 4 years ago by ncohen

  • that's only part of the problem,
  • I was going to rather fix it by adding a --machine-readable (say) option to sage-list-packages (at #16759, but I haven't written any code yet, also because of #15642).

Well, that branch fixes the old function, and has the nice property of being ready and implemented. We will still need those functions in the long run, so it is not incompatible with what you plan on doing anyway. I really have nothing against seeing this parsing code rewritten in the future.

I am writing a doc patch at the moment, which uses these functions to make sure that all packages appear in our doc.

Nathann

comment:7 Changed 4 years ago by leif

Hmmm ok, although it now exposes the brokenness of the shell script in Python as well... ;-)

One tiny thing:

        print("Standard package list (shown above) appears to be currently")

=>

        print("List of %s packages (shown above) appears to be currently" % package_type)

comment:8 follow-up: Changed 4 years ago by ncohen

Can you add a commit? I am working on another patch at the moment.

comment:9 Changed 4 years ago by git

  • Commit changed from c400ee6b177b5de2bee7a4467011fa3a75110f27 to 10933bcb96942d89073c9bb48b4bb9d52fcf63a7

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

10933bcFix exception message of _package_lists_from_sage_output() (#18407)

comment:10 Changed 4 years ago by ncohen

Thanks !! I am almost done with my other patch which lists all packages in the doc. I also noticed some problem in the output of this one, which I will fix real soon ;-)

comment:11 in reply to: ↑ 8 Changed 4 years ago by leif

  • Status changed from needs_review to needs_work

Replying to ncohen:

Can you add a commit? I am working on another patch at the moment.

Done, but

$ ./sage -c 'print optional_packages()'
(['4ti2', 'git', 'pyzmq', 'zeromq'], ['PyQt_x11', 'TOPCOM', 'autotools', 'beautifulsoup', 'benzene', 'biopython', 'brian', 'buckygen', 'cbc', 'ccache', 'chomp', 'cluster_seed', 'coxeter3', 'cryptominisat', 'cunningham_tables', 'database_cremona_ellcurve', 'database_gap', 'database_jones_numfield', 'database_kohel', 'database_odlyzko_zeta .................. not installe', 'database_pari', 'database_stein_watkins_mini.p0 ......... not installe', 'database_symbolic_data', 'dot2tex', 'extra_docs', 'gap_packages', 'gcc', 'gdbm', 'ginv-1.9', 'gnuplotpy', 'guppy', 'java3d', 'kash3-2008-07', 'knoboo', 'libogg', 'libtheora', 'lie', 'lrs', 'mpi4py', 'nauty', 'normaliz', 'nose', 'nzmath', 'openmpi', 'openssl', 'ore_algebra', 'p_group_cohomology', 'patchbot', 'phc', 'pybtex', 'pycryptoplus-20100809', 'pyx', 'qhull', 'sage_mode', 'sip', 'trac', 'valgrind'])
$ ./sage -c 'print experimental_packages()'
(['pexpect'], ['PyQt4', 'PyVTK', 'QScintilla2', 'asymptote', 'bison', 'boost_1_34_1 ........................... not installe', 'cadabra', 'clapack', 'clisp', 'cmake', 'csdp', 'dvipng', 'ets', 'fes', 'flex', 'gcc', 'gdb', 'gnofract4d', 'gnuplot', 'graphviz', 'latte_int', 'libcprops', 'libjpeg', 'libsigsegv', 'macaulay2-1.1', 'mayavi_2.2.1 ........................... not installe', 'meataxe', 'modglue', 'mpich2', 'numarray', 'numeric', 'openopt', 'pcre', 'phcpack', 'polymake', 'processing', 'pygame', 'pygsl', 'pygtk', 'pynifti', 'pyqt', 'pyrexembed-0.1.1', 'qasm', 'qepcad', 'quantlib', 'quantlib_swig', 'reallib3-linux', 'sandpile', 'scitools++ ............................. not installe', 'semigroupe-2.0', 'simpqs', 'sip', 'soya', 'soya_cvs', 'superlu', 'surf', 'vtk_meta', 'wxPython', 'yafray', 'yassl'])

comment:12 follow-up: Changed 4 years ago by leif

Seems you already noticed the pas installé(?)

comment:13 Changed 4 years ago by git

  • Commit changed from 10933bcb96942d89073c9bb48b4bb9d52fcf63a7 to cc0230454137f31663816e3da5034bdcc40c7c30

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

cc02304trac #18407: better parsing of package name

comment:14 in reply to: ↑ 12 ; follow-up: Changed 4 years ago by ncohen

  • Status changed from needs_work to needs_review

Seems you already noticed the pas installé(?)

Indeed. But come on, that's written in french on my console too ;-)

Nathann

comment:15 in reply to: ↑ 14 ; follow-up: Changed 4 years ago by leif

  • Reviewers set to Leif Leonhardy
  • Status changed from needs_review to positive_review

Replying to ncohen:

Seems you already noticed the pas installé(?)

Indeed. But come on, that's written in french on my console too ;-)

I thought you'd just s/not/pas/...


And I won't complain about removing lambda I love so much, nor efficiency w.r.t. using in and .rfind(). ;-)

comment:16 in reply to: ↑ 15 Changed 4 years ago by ncohen

And I won't complain about removing lambda I love so much, nor efficiency w.r.t. using in and .rfind(). ;-)

I would have loved to do it with lambda functions only, but I really needed to define a variable here :-P

Thank you very much for the review. The list of packages is built by #18408 :-)

Nathann

comment:17 follow-up: Changed 4 years ago by leif

Hmmm, may I revert the status or do we have to open a follow-up? XD

We have to s/# internet/# optional -- internet/ I think...

Sorry, tested but missed that somehow.

comment:18 in reply to: ↑ 17 Changed 4 years ago by ncohen

  • Status changed from positive_review to needs_work

Hmmm, may I revert the status or do we have to open a follow-up? XD

Oh True, True :-/

Just a second.

Nathann

comment:19 Changed 4 years ago by git

  • Commit changed from cc0230454137f31663816e3da5034bdcc40c7c30 to dd02493ece30213f99687945eb01bb16302bf76d

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

dd02493trac #18407: 'internet' -> 'optional internet'

comment:20 Changed 4 years ago by ncohen

  • Status changed from needs_work to needs_review

comment:21 Changed 4 years ago by leif

  • Status changed from needs_review to positive_review

comment:22 Changed 4 years ago by vbraun

  • Branch changed from public/18407 to dd02493ece30213f99687945eb01bb16302bf76d
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.