Opened 11 years ago

Closed 11 years ago

#11496 closed task (duplicate)

Add jmol script in SAGE_ROOT/local/bin to hg and update

Reported by: Jonathan Gutow Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: distribution Keywords: command line jmol
Cc: Mike Hansen Merged in:
Authors: Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jonathan Gutow)

ONLY TO BE APPLIED IF YOU USE THE FLASK NOTEBOOK WITH THE NEW JMOL .SPKG (#11503). BOTH ARE REQUIRED.

With the change to the Flask notebook jmol is moving to the directory SAGE_LOCAL/share. This requires changes to the script that launches Jmol from the command line. Attached is a trac_11496_add_jmol_script.patch that adds the updated file to the hg repository for the local/bin directory. Don't know why it wasn't tracked in the past.

NOTE: If you get errors upon trying to apply this patch.  Simply replace the jmol script file with the contents of this patch.  There seem to be issues depending upon whether your installation is tracking this file or not.  It should be added to the Hg repository in the next release.

Related & Referring tickets:

Attachments (1)

trac_11496_add_jmol_script.patch (920 bytes) - added by Jonathan Gutow 11 years ago.
jmol script into hg repository to go with flask changes

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by Jonathan Gutow

jmol script into hg repository to go with flask changes

comment:1 Changed 11 years ago by Jonathan Gutow

Cc: Mike Hansen added
Description: modified (diff)
Status: newneeds_review

comment:2 Changed 11 years ago by Jonathan Gutow

Description: modified (diff)

comment:3 Changed 11 years ago by Mariah Lennox

Status: needs_reviewneeds_info

When I tried to apply the patch to sage-4.7.1.alpha1 with hg_scripts.apply() it failed:

sage: hg_scripts.apply("/home/mariah/trac_11496_add_jmol_script.patch")
cd "/home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin" && hg status
cd "/home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin" && hg status
cd "/home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin" && hg import   "/home/mariah/trac_11496_add_jmol_script.patch"
applying /home/mariah/trac_11496_add_jmol_script.patch
file jmol already exists
1 out of 1 hunks FAILED -- saving rejects to file jmol.rej
abort: patch failed to apply
sage:

Am I misunderstanding something?

comment:4 in reply to:  3 Changed 11 years ago by Jonathan Gutow

Status: needs_infoneeds_review

It appears that this change may already be in 4.7.1.alpha2...check manually that the script is there and matches what is in the patch. Replying to mariah:

When I tried to apply the patch to sage-4.7.1.alpha1 with hg_scripts.apply() it failed:

sage: hg_scripts.apply("/home/mariah/trac_11496_add_jmol_script.patch")
cd "/home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin" && hg status
cd "/home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin" && hg status
cd "/home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin" && hg import   "/home/mariah/trac_11496_add_jmol_script.patch"
applying /home/mariah/trac_11496_add_jmol_script.patch
file jmol already exists
1 out of 1 hunks FAILED -- saving rejects to file jmol.rej
abort: patch failed to apply
sage:

Am I misunderstanding something?

comment:5 Changed 11 years ago by Mariah Lennox

Status: needs_reviewneeds_work

They differ slightly (myjmol is the code in the patch):

eno% pwd
/home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin
eno% diff jmol ~/myjmol
3c3
< JMOL_HOME="`"$SAGE_LOCAL"/bin/sage-pypkg-location sagenb`""/sagenb/data/jmol"
---
> JMOL_HOME="$SAGE_LOCAL/share/jmol"
eno%

comment:6 in reply to:  5 Changed 11 years ago by Jonathan Gutow

I'm not quite sure how to respond.  As of 4.7 (the last official release) that script was not included in the mercurial repository.  Am I expected to modify my patches to keep up with test releases?  

That said, If you are setting up to use the Flask notebook and the new release of Jmol, you need to have the version in my patch not the one that points to sagenb/data/jmol as that directory no longer exists.

I suggest patching by hand.

Replying to mariah:

They differ slightly (myjmol is the code in the patch): {{{ eno% pwd /home/mariah/sage/sage-4.7.1.alpha2-x86_64-Linux-core2-fc/local/bin eno% diff jmol ~/myjmol 3c3 < JMOL_HOME=""$SAGE_LOCAL"/bin/sage-pypkg-location sagenb""/sagenb/data/jmol" ---

JMOL_HOME="$SAGE_LOCAL/share/jmol"

eno% }}}

comment:7 Changed 11 years ago by Jonathan Gutow

Description: modified (diff)

comment:8 Changed 11 years ago by Jonathan Gutow

Status: needs_workneeds_review

comment:9 Changed 11 years ago by John Palmieri

Status: needs_reviewneeds_info

I think that this isn't implemented correctly. First, the reason that the jmol script is not tracked in the scripts repo is that it is installed there by the sagenb spkg. So I think that the jmol script should be installed either by the sagenb spkg, or, even better, by the new jmol spkg from #11503. In fact, it looks like the script is already part of that spkg; you just have to write it to the correct place in the spkg-install file.

I may be confused, though, so if you have a different opinion, please let me know.

comment:10 in reply to:  9 Changed 11 years ago by Jonathan Gutow

I believe this is a good idea.  As soon as I've changed the .spkg (see #11503) this ticket should be closed.

Replying to jhpalmieri:

I think that this isn't implemented correctly. First, the reason that the jmol script is not tracked in the scripts repo is that it is installed there by the sagenb spkg. So I think that the jmol script should be installed either by the sagenb spkg, or, even better, by the new jmol spkg from #11503. In fact, it looks like the script is already part of that spkg; you just have to write it to the correct place in the spkg-install file. I may be confused, though, so if you have a different opinion, please let me know.

comment:11 Changed 11 years ago by Jonathan Gutow

Status: needs_infoneeds_review

Should be closed because this is now subsumed by #11503...

comment:12 Changed 11 years ago by John Palmieri

Status: needs_reviewpositive_review

To the release manager: please close this as a duplicate of #11503.

comment:13 Changed 11 years ago by Jeroen Demeyer

Authors: gutow
Milestone: sage-4.7.1sage-duplicate/invalid/wontfix
Reviewers: John Palmieri

comment:14 Changed 11 years ago by Jeroen Demeyer

Resolution: duplicate
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.