Opened 10 years ago
Last modified 10 years ago
#13121 closed enhancement
Upgrade sagenb to 0.10.x — at Version 53
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: | John Palmieri |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #11080, #9774, #11913, #12299 | Stopgaps: |
Description (last modified by )
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 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.1.spkg (a comparatively svelte 13 MB)
Instructions for installing this and its dependencies into >=sage-5.2.beta0 :
cd $SAGE_ROOT ./sage --hg -R local/bin qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/9774/trac_9774-scripts-mathjax.patch ./sage --hg -R local/bin qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/13121/trac_13121-scripts.patch ./sage --hg -R devel/sage qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/9774/trac_9774-mathjax-try6.patch ./sage --hg -R devel/sage qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/11913/trac_11913-sage.patch ./sage --hg -R devel/sage qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12299/trac_12299-all-in-one.patch ./sage --hg -R devel/sage qimport -P http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12299/trac_12299_headless_java.patch ./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg ./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p1.spkg ./sage -b
Change History (54)
comment:1 Changed 10 years ago by
- Description modified (diff)
- Milestone changed from sage-5.1 to sage-5.2
comment:2 Changed 10 years ago by
- Cc jhpalmieri added
comment:3 Changed 10 years ago by
- Description modified (diff)
comment:4 Changed 10 years ago by
- Dependencies changed from #11080 to #11080, #9774, #8473, #11913
- Description modified (diff)
comment:5 Changed 10 years ago by
- Dependencies changed from #11080, #9774, #8473, #11913 to #11080, #9774, #8473, #11913, #12299
- Description modified (diff)
comment:6 Changed 10 years ago by
- 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 10 years ago by
- 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 10 years ago by
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 () { 17 17 export CPATH="$CPATH""$SAGE_LOCAL"/include 18 18 export LIBRARY_PATH="$LIBRARY_PATH""$SAGE_LOCAL"/lib 19 19 20 export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS "20 export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS -D_XOPEN_SOURCE=500" 21 21 export LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS" 22 22 23 if [ -n $SAGE64]; then23 if [ $SAGE64 = "yes" ]; then 24 24 echo "Building with extra 64-bit flags for MacOS X and Open Solaris." 25 25 if [ -z $CFLAG64 ]; then 26 26 CFLAG64=-m64
(even better, with a comment explaining why CPPFLAGS has been changed)
comment:9 Changed 10 years ago by
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 10 years ago by
- Description modified (diff)
comment:11 Changed 10 years ago by
- 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 17 17 export CPATH="$CPATH""$SAGE_LOCAL"/include 18 18 export LIBRARY_PATH="$LIBRARY_PATH""$SAGE_LOCAL"/lib 19 19 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. 23 export CPPFLAGS="-I$SAGE_LOCAL/include -D_XOPEN_SOURCE=500 $CPPFLAGS" 21 24 export LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS" 22 25 23 if [ -n $SAGE64]; then26 if [ $SAGE64 = "yes" ]; then 24 27 echo "Building with extra 64-bit flags for MacOS X and Open Solaris." 25 28 if [ -z $CFLAG64 ]; then 26 29 CFLAG64=-m64
comment:12 Changed 10 years ago by
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 10 years ago by
comment:14 Changed 10 years ago by
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 10 years ago by
- 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.
comment:16 Changed 10 years ago by
- Summary changed from Upgrade sagenb to 0.10 to Upgrade sagenb to 0.10.0
comment:17 Changed 10 years ago by
- 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...
comment:18 Changed 10 years ago by
Okay, now a hard refresh is getting everything to work, on all three browsers. Now, is there any way to set it up to avoid the hard refresh? Otherwise users may be frustrated when they first switch to the new notebook.
comment:19 Changed 10 years ago by
- Description modified (diff)
I've attached a patch to put "webassets" into the .hgignore file.
comment:20 Changed 10 years ago by
Thanks for the .hgignore patch.
As for avoiding hard refreshes, it might be possible to make Flask set some HTTP headers to the date/time when the server was started, to advise client-side caching. I'm not sure of the details, but it's probably not a one-liner like the typo fix I just made was; I'd also consider it more of a feature than a bugfix, so probably it won't go into 0.10.
comment:21 Changed 10 years ago by
comment:22 Changed 10 years ago by
(I've set myself as the author since this ticket is just about making an SPKG - there are many more important contributors to the new version of sagenb than me, for the record.)
comment:23 follow-up: ↓ 28 Changed 10 years ago by
This is mostly working for me on OS X Lion, except issues with #8473. Otherwise, the spkg looks good to me. People should test it on other platforms.
comment:24 Changed 10 years ago by
- Priority changed from major to blocker
Any objections to making this a blocker for sage-5.2? It feels to me like sage-0.9.0 is a kind of "beta version" for sage-0.10.0, so I would really prefer to have sage-0.10.0 in the final release.
comment:25 Changed 10 years ago by
Actually, I think of 0.9.0 as sort of the stable, LTS release where we had a *long* feature freeze and concentrated on stability. 0.10.0 is like the release just after LTS stable release, where we merged in a bunch of new functionality that was put off during the long feature freeze. There are some important bugfixes in 0.10.0 (IIRC), but there is a lot of new functionality in 0.10 too.
comment:26 follow-up: ↓ 27 Changed 10 years ago by
That said, I would prefer 0.10 to be in 5.2, but I think it's probably more important to have 0.9 out by the time school starts.
There is still one or two rather frustrating known bugs in 0.9 (and 0.10): some sort of leak where worker processes don't get killed, and sometimes creating a new worksheet actually just gets an old worksheet. If we solve those in 0.10.1 or something, it would be great to have that as our before-semester release.
comment:27 in reply to: ↑ 26 Changed 10 years ago by
That said, I would prefer 0.10 to be in 5.2, but I think it's probably more important to have 0.9 out by the time school starts.
Correct.
comment:28 in reply to: ↑ 23 ; follow-up: ↓ 29 Changed 10 years ago by
Replying to jhpalmieri:
This is mostly working for me on OS X Lion, except issues with #8473. Otherwise, the spkg looks good to me. People should test it on other platforms.
Just for reference, this was (or will be, when it's merged) dealt with - see this pull request on sagenb.
comment:29 in reply to: ↑ 28 Changed 10 years ago by
Replying to kcrisman:
Replying to jhpalmieri:
This is mostly working for me on OS X Lion, except issues with #8473. Otherwise, the spkg looks good to me. People should test it on other platforms.
Just for reference, this was (or will be, when it's merged) dealt with - see this pull request on sagenb.
Right. Keshav, when you have a chance, could you make a new 0.10.0 spkg for us to test? Any notebook fans: can you positively review the last change at #11080 (the one which allows building on Solaris)?
comment:30 Changed 10 years ago by
To clarify for whoever makes the "final" spkg here - to make sure #8473 is a-ok, we would need this pull request and this one to fix the minor issues John mentioned.
comment:31 Changed 10 years ago by
I'm confused about the location of JMOL. It used to be (before #11080) part of sagenb. Now it isn't (or at least I don't see it anywhere). Does it need to be distributed as a separate spkg, and thus included in spkg/standard/deps? Or should the new JMOL spkg from #12299 be part of this spkg?
Oh, I see: it is now in spkg/standard/deps, and it needs to be included as a separate spkg.
comment:32 follow-up: ↓ 34 Changed 10 years ago by
comment:33 Changed 10 years ago by
The spkg here needs work: when it gets installed, SAGE_ROOT/devel
may not yet exist. So something like this:
-
spkg-install
diff --git a/spkg-install b/spkg-install
a b BASENAME=${BASENAME%.tar.gz} 53 53 #easy_install -H None -f src "sagenb" || die "Error installing sagenb !" 54 54 55 55 # Extract sagenb into $SAGE_ROOT/devel and set up the symlink 56 mkdir -p "$SAGE_ROOT/devel" 56 57 cd "$SAGE_ROOT/devel" 57 58 if [ -d "$SAGE_ROOT/devel/sagenb-main" ]; then 58 59 echo "Moving old SageNB package to '$SAGE_ROOT/devel/sagenb-main-old'..."
comment:34 in reply to: ↑ 32 Changed 10 years ago by
See #11503, where the deps file is patched to require the new JMOL spkg from #11503. For some reason #12299 seems to require a newer version of the SPKG, a version which is not on #11503 or anywhere else. I posted a comment on #11503 about it.
As far as I know, this is on purpose, because the newest Jmol at #12299 needs the many updates to Jmol there. In that sense #11503 is a 'hard' prereq for #11080 and hence this ticket. I am pretty sure Jonathan was careful about exactly which version of Jmol needed to be with which other patches.
comment:35 Changed 10 years ago by
OK, I see, thanks.
comment:36 Changed 10 years ago by
jhpalmieri or others:
When you ran into the problem with the evaluate button not working, did you find that other buttons also stopped working? For instance, the Stop and Archive buttons on the main worksheet list page. I must have done something wrong because even a hard refresh isn't getting things to work for me, but I wanted to ask if anyone had tried those.
comment:37 follow-up: ↓ 38 Changed 10 years ago by
For me, on some browsers, everything stopped working. A hard refresh did fix it (Firefox or Chrome: cmd-shift-r. Safari: hold the option key down while hitting the little "refresh" symbol at the right end of the address box).
comment:38 in reply to: ↑ 37 Changed 10 years ago by
For me, on some browsers, everything stopped working.
Ok.
A hard refresh did fix it (Firefox or Chrome: cmd-shift-r. Safari: hold the option key down while hitting the little "refresh" symbol at the right end of the address box).
Yup, that's what I tried, and that didn't work. But like I said on those commits in sagenb, maybe I just destroyed my installation anyway.
Edit: I did finally manage to get the upstream commit of the parenthesis fix in to make it work with the "hard refresh". That definitely needs some big warning somewhere... Strange that doing it "by hand" didn't work, but getting from upstream did.
comment:39 Changed 10 years ago by
- Description modified (diff)
comment:40 Changed 10 years ago by
- Status changed from needs_review to needs_work
- Work issues set to create SAGE_ROOT/devel
comment:41 Changed 10 years ago by
- Description modified (diff)
- Summary changed from Upgrade sagenb to 0.10.0 to Upgrade sagenb to 0.10.x
- Work issues changed from create SAGE_ROOT/devel to wait for 0.10.1
comment:42 Changed 10 years ago by
- Priority changed from blocker to major
comment:43 Changed 10 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
- Work issues wait for 0.10.1 deleted
Anything else?
comment:44 Changed 10 years ago by
- Reviewers set to John Palmieri
- Status changed from needs_review to positive_review
I think this looks good now. The main parts have already been positively reviewed (as parts of the prerequisite tickets). The spkg-install
script is in good shape, as is SPKG.txt
. Let's merge it to get MathJax into Sage.
comment:45 Changed 10 years ago by
- Dependencies changed from #11080, #9774, #8473, #11913, #12299 to #11080, #9774, #11913, #12299
comment:46 Changed 10 years ago by
Probably meaningless, but I do get the following weirdness on OS X PPC when upgrading from 5.2.alpha0 (not beta0!) by using just the latest 0.10.1 spkg.
Dasher-03:~/Desktop/sage-5.2.alpha0 student$ ./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg Calling sage-spkg on 'http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg' Attempting to download package sagenb-0.10.1 http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg --> sagenb-0.10.1.spkg [..................................................] sagenb-0.10.1 ==================================================== Extracting package /Users/student/Desktop/sage-5.2.alpha0/spkg/optional/sagenb-0.10.1.spkg -rw-r--r-- 1 student student 13506560 Jul 10 13:59 /Users/student/Desktop/sage-5.2.alpha0/spkg/optional/sagenb-0.10.1.spkg Finished extraction **************************************************** Host system: Darwin Dasher-03.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc **************************************************** C compiler: gcc C compiler version: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/Users/student/Desktop/sage-5.2.alpha0/local/libexec/gcc/powerpc-apple-darwin8.11.0/4.6.3/lto-wrapper Target: powerpc-apple-darwin8.11.0 Configured with: ../src/configure --prefix=/Users/student/Desktop/sage-5.2.alpha0/local --with-local-prefix=/Users/student/Desktop/sage-5.2.alpha0/local --with-gmp=/Users/student/Desktop/sage-5.2.alpha0/local --with-mpfr=/Users/student/Desktop/sage-5.2.alpha0/local --with-mpc=/Users/student/Desktop/sage-5.2.alpha0/local --with-system-zlib --disable-multilib Thread model: posix gcc version 4.6.3 (GCC) **************************************************** Processing Twisted-12.1.0.tar.bz2 Running Twisted-12.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-UaYpDr/Twisted-12.1.0/egg-dist-tmp-ywlzEJ conftest.c:1:23: fatal error: sys/epoll.h: No such file or directory compilation terminated. twisted/python/_initgroups.c: In function 'initgroups_initgroups': twisted/python/_initgroups.c:39:2: warning: implicit declaration of function 'initgroups' [-Wimplicit-function-declaration] twisted/python/sendmsg.c: In function 'sendmsg_sendmsg': twisted/python/sendmsg.c:243:13: warning: implicit declaration of function 'CMSG_SPACE' [-Wimplicit-function-declaration] twisted/python/sendmsg.c:306:13: warning: implicit declaration of function 'CMSG_LEN' [-Wimplicit-function-declaration] twisted/internet/_sigchld.c: In function 'got_signal': twisted/internet/_sigchld.c:15:9: warning: variable 'ignored_result' set but not used [-Wunused-but-set-variable] Removing Twisted 12.0.0 from easy-install.pth file Adding Twisted 12.1.0 to easy-install.pth file
after which all proceeds normally. It just looks a lot like comment:314:ticket:11080 so I wondered.
Edit:
./spkg-install: line 76: cd: sagenb: No such file or directory python: can't open file 'setup.py': [Errno 2] No such file or directory Error installing sagenb via setup.py develop real 11m4.240s user 3m0.371s sys 2m27.994s ************************************************************************ Error installing package sagenb-0.10.1 ************************************************************************
which is weird enough that I must have done something wrong. I'll try beta0 instead, sorry for the noise.
comment:47 Changed 10 years ago by
Incidentally, are the instructions in the description correct for 5.2.beta0? I assume not, based on the presence of 0.10.0 and not 0.10.1. Thanks.
comment:48 Changed 10 years ago by
Oops, sorry. Indeed, the instructions are not correct for 5.2.beta0, but not just because of 0.10.0 vs. 0.10.1 - I need to remove the parts about adding patches that are already merged in 5.2.beta0.
comment:49 Changed 10 years ago by
- Description modified (diff)
OK, the only remaining instructions should now be correct for 5.2.beta0... can you try again, kcrisman?
comment:50 Changed 10 years ago by
- Milestone changed from sage-5.2 to sage-pending
comment:52 Changed 10 years ago by
- Cc gutow added
comment:53 Changed 10 years ago by
- Description modified (diff)
The Jmol package has been updated to include more extensive version checking for the JVM.
See this comment on github pull request 64 to confirm that #12299 will be in 0.9.1.