Ticket #11078 (closed defect: fixed)

Opened 2 years ago

Last modified 10 months ago

jmol in the flask notebook

Reported by: jason Owned by: jason, mpatel, was
Priority: major Milestone: sage-5.2
Component: notebook Keywords: sd31 sd35.5
Cc: rkirov, mhansen, kcrisman Work issues:
Report Upstream: N/A Reviewers: Jason Grout
Authors: William Stein, Jonathan Gutow Merged in: sage-5.2.beta0
Dependencies: #11080 Stopgaps:

Description (last modified by jason) (diff)

The attached patch solves an issue with jmol finding the right .jmol.zip file in the new flask notebook. This patch should only be applied *after* the notebook is moved to a flask notebook.

The patch should replace the following line in sage/plot/plot3d/base.pyx

f.write('set defaultdirectory "%s"\n' % archive_name)

with

import sagenb
f.write('set defaultdirectory "cells/%s/%s"\n' % (sagenb.notebook.interact.SAGE_CELL_ID, archive_name))

Attachments

trac_11078.patch Download (886 bytes) - added by jason 17 months ago.

Change History

comment:1 Changed 2 years ago by kcrisman

  • Cc kcrisman added

comment:2 Changed 2 years ago by jason

  • Description modified (diff)

comment:3 Changed 2 years ago by was

  • Keywords sd31 added

comment:4 Changed 22 months ago by slabbe

This week, I compiled sage-4.7.1.rc0 and installed the new flask Sage notebook following instructions from :  http://code.google.com/r/rkirov-flask/. I also followed the section Adding stock Jmol plus the patch trac_11078.patch. This made Jmol to work from the notebook : Great!

But, from the command line, with the patch trac_11078.patch a command like sphere() opens Jmol but Jmol stays all black. I had to mimic the modifications done in #11503 on the same file sage/plot/plot3d/base.pyx to make Jmol works properly from the command line.

Sébastien

comment:5 Changed 17 months ago by jdemeyer

  • Milestone changed from sage-4.8 to sage-5.0

comment:6 Changed 17 months ago by jason

  • Description modified (diff)

Changed 17 months ago by jason

comment:7 Changed 17 months ago by jason

  • Status changed from new to needs_review
  • Reviewers set to Jason Grout
  • Authors set to William Stein, Jonathan Gutow

I updated the patch with the changes from #11503. With the flask notebook, sphere() works both from the command line and from the notebook.

I'm setting as needs review to have one other person double-check this patch works as intended, though I guess I might qualify as the only needed reviewer. Basically, what I did here was just rebase the patch at #11503.

comment:8 Changed 17 months ago by was

  • Status changed from needs_review to positive_review

This looks great to me!

comment:9 Changed 17 months ago by jdemeyer

  • Dependencies set to #11080

comment:10 Changed 17 months ago by jason

  • Keywords sd31, sd35.5 added; sd31 removed

comment:11 Changed 17 months ago by jason

  • Keywords sd31 added; sd31, removed

comment:12 Changed 16 months ago by jdemeyer

  • Milestone changed from sage-5.0 to sage-pending

comment:13 Changed 14 months ago by jdemeyer

  • Milestone changed from sage-pending to sage-5.1

comment:14 Changed 12 months ago by jdemeyer

  • Milestone changed from sage-5.1 to sage-pending

comment:15 Changed 12 months ago by jdemeyer

  • Milestone changed from sage-pending to sage-5.2

comment:16 Changed 11 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-5.2.beta0

comment:17 Changed 10 months ago by jdemeyer

  • Status changed from closed to new
  • Resolution fixed deleted
  • Merged in sage-5.2.beta0 deleted
  • Milestone changed from sage-5.2 to sage-pending

Unmerging this from sage-5.2 due to the serious security issue at #13270.

comment:18 Changed 10 months ago by jdemeyer

  • Status changed from new to needs_review

comment:19 Changed 10 months ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:20 Changed 10 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-5.2.beta0
  • Milestone changed from sage-pending to sage-5.2
Note: See TracTickets for help on using tickets.