On Sat, Mar 7, 2009 at 11:07 AM, Rob Beezer <[email protected]> wrote:
>
> William and Michael,
>
> 1.  Its not clear from discussion around the topic that  user_conf.py
> is applicable to newly created notebooks, so that explanation is very
> helpful.  Thanks.
>
> 2.  I think it might also be very helpful to have a configurable
> maximum number of snapshots - like the configurable maximum number of
> backups.  I'm not sure how to implement that.  Should I create an
> enhancement ticket?

Yes, definitely.  That's a good idea.  Better though would be rolling
snapshots, i.e.,  maybe hourly snapshots, then daily, then weekly, and
only save the daily ones up to a week, the weekly ones up to a month,
etc.   Hourly only for the last 24 hours.

> 3.  I am getting identical snapshots (confirmed with diff) on
> unchanged worksheets.  This is in 3.4rc0, and was fixed in 3.3 with
> http://trac.sagemath.org/sage_trac/ticket/5291
> I've confirmed this fix in the source of my install.
>
> It'd be nice to have confirmation/denial from somebody else to
> determine if this is a real bug or just a local problem.

That strongly suggests that Timothy Clemans fix for this bug doesn't
work.   I'm surprised since I refereed it and verified it did work for
me.  However, it wasn't a very optimal fix anyways, so whenever (2)
gets done, then a better fix will get done for this.

> 4.  Worksheet code suggests saves are based on per-user time
> intervals, but my testing seems to suggest it is a notebook-wide
> setting that prevails.  Consider
>
> sage: nb = load('/home/rob/.sage/sage_notebook/nb.sobj',
> compress=False)
> sage: nb.user("rob-test")['autosave_interval']
> 3600
> sage: nb.user("fcla")['autosave_interval']
> 180
> sage: nb.user("admin")['autosave_interval']
> 540
> sage: nb.conf()['save_interval']
> 60
>
> With this configuration, running as "admin" I get 60-second saves.  At
> first the 540 looked unfamiliar, but I think that came from a drop-
> down box in the Settings area of the notebook interface (1,3,5,7,9
> minute choices, IIRC).

Interesting.  That must be a bug -- you should make a trac ticket for it.

>
>
> 5.  I'm going to work up a patch right now for
>
> http://trac.sagemath.org/sage_trac/ticket/5371
>
> I'll change the defaults in user_conf.py as proposed/discussed, but
> mostly I'll document that this is the wrong place to adjust an extant
> notebook.  So its here for others who come later, I'll describe the
> process below, and include some of this in the documentation of
> user_conf.py.  Timothy Clemans had a proposal in Summer 2008 on sage-
> devel to make some of this configurable via the notebook interface
> itself.  That'd be nice/desirable for users not willing to run at the
> command line.  ;-)

Certainly.  Thanks for working on the above!!

>
> 6.  Here is a transcript at the sage command-line for adjusting
> existing notebook.  Don't forget to save the changes!
> See documentation/source for
>
> sage.server.notebook.notebook.Notebook
> sage.server.notebook.server_conf
>
> sage: nb = load('/home/rob/.sage/sage_notebook/nb.sobj',
> compress=False)
> sage: type(nb)
> <class 'sage.server.notebook.notebook.Notebook'>
> sage: print nb.conf()
> Configuration: {'number_of_backups': 3, 'doc_pool_size': 128,
> 'save_interval': 30, 'idle_timeout': 0, 'word_wrap_cols': 72,
> 'email': False, 'idle_check_interval': 30}
> sage: nb.conf()['save_interval']=int(3600)
> sage: nb.conf()['number_of_backups']=int(2)
> sage: nb.conf()['max_history_length']=int(100)
> sage: nb.conf()
> Configuration: {'number_of_backups': 2, 'doc_pool_size': 128,
> 'save_interval': 3600, 'idle_timeout': 0, 'max_history_length': 100,
> 'word_wrap_cols': 72, 'email': False, 'idle_check_interval': 30}
> nb.save()

It couldn't hurt to add that to a docstring for user_conf.py while you're at it.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to