Opened 9 years ago

Last modified 9 years ago

#13121 closed enhancement

Upgrade sagenb to 0.10.0 — at Version 17

Reported by: kini Owned by: jason, mpatel, was
Priority: major Milestone: sage-5.4
Component: notebook Keywords: sagenb
Cc: jhpalmieri, gutow, jyeo, rbeezer Merged in:
Authors: Keshav kini Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #11080, #9774, #8473, #11913, #12299 Stopgaps:

Status badges

Description (last modified by kini)

This is a followup to #11080. During the review process of #11080, which stretched for quite a while, at some point we decided to have a feature freeze on the version of sagenb 0.9.x associated with #11080, just to simplify the review process. The purpose of this ticket is to incorporate some new features, bugfixes, code refactoring, etc. into the version of sagenb shipped with Sage, beyond what was reviewed in #11080. sagenb 0.10.0 contains the following (among other things):

  • refactoring of the startup code, uWSGI and Tornado added as possible WSGI servers
  • code allowing .sws files to be uploaded by supplying a URL pointing to the .sws as an argument to the upload page's URL
  • new dependency on webassets for js/css autominification (not currently used in the master branch)
  • the mathjax branch, and a doctest fix in sphinxify.py (#9774 depends on and contributed to this)
  • support for uploading .sws files from the local disk via the command line (#8473 basically is this)
  • refactoring of sageinspect to not have a duplication of code between the notebook and the Sage library (#11913 depends on this)
  • Upgrading Jmol again and allowing for advanced interactive features more easily, solve some memory issues (#12299)

Changes not in sagenb itself but in how sagenb is incorporated into sage:

  • No repository will be installed with sagenb - developers will need to clone sagenb themselves and install the new clone into their Sage installation manually (which is not difficult).

SPKG: http://wstein.org/home/keshav/files/sagenb-0.10.0.spkg (a comparatively svelte 13 MB)

cd $SAGE_ROOT
hg -R local/bin qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/9774/trac_9774-scripts-mathjax.patch
hg -R devel/sage qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/9774/trac_9774-mathjax-try6.patch
hg -R devel/sage qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/11913/trac_11913-sage.patch
hg -R devel/sage qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12299/trac_12299-all-in-one.patch
./sage -b

Change History (17)

comment:1 Changed 9 years ago by kini

  • Description modified (diff)
  • Milestone changed from sage-5.1 to sage-5.2

comment:2 Changed 9 years ago by jhpalmieri

  • Cc jhpalmieri added

comment:3 Changed 9 years ago by kini

  • Description modified (diff)

comment:4 Changed 9 years ago by kini

  • Dependencies changed from #11080 to #11080, #9774, #8473, #11913
  • Description modified (diff)

comment:5 Changed 9 years ago by kcrisman

  • Dependencies changed from #11080, #9774, #8473, #11913 to #11080, #9774, #8473, #11913, #12299
  • Description modified (diff)

See this comment on github pull request 64 to confirm that #12299 will be in 0.9.1.

comment:6 Changed 9 years ago by kini

  • Description modified (diff)
  • Status changed from new to needs_review

I've released 0.9.1. The SPKG is here. Please test and review!

comment:7 Changed 9 years ago by jhpalmieri

  • Status changed from needs_review to needs_work

In spkg-install, the check

if [ -n $SAGE64 ]; then

needs to take into account that $SAGE64 may be set to "no". According to SAGE_ROOT/spkg/bin/sage-arch-env, it should be unset, "no", or "yes", so you should test that it's set to "yes".

comment:8 Changed 9 years ago by jhpalmieri

You should also take this possible change to CPPFLAGS into account. For example:

  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b die () { 
    1717export CPATH="$CPATH""$SAGE_LOCAL"/include
    1818export LIBRARY_PATH="$LIBRARY_PATH""$SAGE_LOCAL"/lib
    1919
    20 export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"
     20export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS -D_XOPEN_SOURCE=500"
    2121export LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS"
    2222
    23 if [ -n $SAGE64 ]; then
     23if [ $SAGE64 = "yes" ]; then
    2424    echo "Building with extra 64-bit flags for MacOS X and Open Solaris."
    2525    if [ -z $CFLAG64 ]; then
    2626        CFLAG64=-m64

(even better, with a comment explaining why CPPFLAGS has been changed)

Last edited 9 years ago by jhpalmieri (previous) (diff)

comment:9 Changed 9 years ago by jhpalmieri

With these changes, this spkg builds on OS X Lion, sage.math, hawk, and skynet machines mark (after installing the openssl spkg from #13126), cicero, iras (with openssl), silius (with openssl), and taurus. So it's looking good to me.

comment:10 Changed 9 years ago by jason

  • Description modified (diff)

comment:11 Changed 9 years ago by kini

  • Status changed from needs_work to needs_review

SPKG updated with your changes, more or less:

  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    1717export CPATH="$CPATH""$SAGE_LOCAL"/include
    1818export LIBRARY_PATH="$LIBRARY_PATH""$SAGE_LOCAL"/lib
    1919
    20 export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"
     20# note: the -D_XOPEN_SOURCE=500 is to fix build errors in Twisted 12.1 on
     21# Solaris. See http://trac.sagemath.org/sage_trac/ticket/11080#comment:314 and
     22# the subsequent few comments.
     23export CPPFLAGS="-I$SAGE_LOCAL/include -D_XOPEN_SOURCE=500 $CPPFLAGS"
    2124export LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS"
    2225
    23 if [ -n $SAGE64 ]; then
     26if [ $SAGE64 = "yes" ]; then
    2427    echo "Building with extra 64-bit flags for MacOS X and Open Solaris."
    2528    if [ -z $CFLAG64 ]; then
    2629        CFLAG64=-m64

comment:12 Changed 9 years ago by jhpalmieri

On my Mac (OS X 10.7), I can't get worksheets to actually evaluate anything. With Chrome, Firefox, and Safari, I see an evaluate button, but clicking on it does nothing. Hitting 'shift-enter' either does nothing (Firefox) or gives me a new line in the current cell (Chrome and Safari), and does not evaluate anything. Hitting 'Save & quit' does nothing (Chrome and Safari) or actually quits the current worksheet (Firefox).

I think I see some of the same behavior with 0.9.0, but not as severe: it works in Firefox, but not in Chrome or Safari. I'm not sure about that, though; I'm not sure my 0.9.0 install was clean, or whether I corrupted it with 0.9.1 related things.

Does it matter that there is no directory for this version of sagenb in SAGE_LOCAL/lib/python/site-packages/? After installing 0.9.0 and then 0.9.1, I see

  drwxr-xr-x    4 palmieri  admin    136 Jun 19 11:13 sagenb-0.8.29-py2.7.egg
  drwxr-xr-x    4 palmieri  admin    136 Jun 21 16:47 sagenb-0.9.0-py2.7.egg
  -rw-r--r--    1 palmieri  admin     26 Jun 21 16:59 sagenb.egg-link

comment:13 Changed 9 years ago by kini

I was able to duplicate this on linux. The problem went away when I did a hard refresh of the page, forcing my browser to reload all javascript. The problem is probably caused by this or this.

Does a hard refresh solve the problem on your end too?

comment:14 Changed 9 years ago by jhpalmieri

A hard refresh helps to get 0.9.0 to work, but not 0.9.1.

By the way, when the notebook is running, how can I tell which version is running? I would suggest having a variable, or displaying it somewhere when the notebook opens.

comment:15 Changed 9 years ago by kini

  • Description modified (diff)
  • Status changed from needs_review to needs_work
  • Summary changed from Upgrade sagenb to 0.9.1 to Upgrade sagenb to 0.10
  • Work issues set to fix js typo, make new spkg

Um, wow. Silly typo in this commit. I'll fix this, and actually I think I'm going to call this 0.10. Our version numbers are moving too slowly. Adding mathjax is a lot more substantial of a change than a bump to the patch level should cause a user to expect.

Last edited 9 years ago by kini (previous) (diff)

comment:16 Changed 9 years ago by kini

  • Summary changed from Upgrade sagenb to 0.10 to Upgrade sagenb to 0.10.0

comment:17 Changed 9 years ago by kini

  • Authors set to Keshav kini
  • Description modified (diff)
  • Report Upstream changed from Fixed upstream, but not in a stable release. to N/A
  • Status changed from needs_work to needs_review
  • Work issues fix js typo, make new spkg deleted

OK, new SPKG is up.

By the way, when the notebook is running, how can I tell which version is running? I would suggest having a variable, or displaying it somewhere when the notebook opens.

sagenb.misc.misc.SAGENB_VERSION should tell you that, but it's sort of a hack. I probably could have changed that in the packaging rewrite...

Note: See TracTickets for help on using tickets.