[IPython-dev] Some new cell types for describing data analyses in IPy. Notebook

Brian Granger ellisonbg at gmail.com
Wed Jul 10 14:55:17 EDT 2013


On Wed, Jul 10, 2013 at 11:25 AM, Gabriel Becker <gmbecker at ucdavis.edu> wrote:
> Stefan,
> First off I love that other people are joining the conversion. The more
> ideas are thrown around the better we all will be!
> Using git (or version control in general) for branching is an interesting
> idea. I had/have/am considering it but for historical comparisons, which I
> view as somewhat conceptually different than alternatives based branching.
> I.e. I have reimplemented the *same* code, lets run both versions and
> inspect the differences (or hopefully lack thereof!). This is partially
> branching, but also partially QA.
> git is a Good Thing, and seems to be considered the Right Way (tm) of using
> IPython notebook according to the devs. I don't disagree with this; code
> belongs in version control and notebooks are code with extra bits attached.
> That having been said, there is a far cry between git being the place that
> the devs think notebooks *should* live and not having notebooks in git being
> unsupported. I would argue building actual application features on git
> brings us pretty firmly into the latter category.

I don't think the notebook will ever require git, but we have plans on
adding in depth integration with git.

> Without wanting to put words in his mouth, Min seems to agree. According to
> my reading of the autosave IPEP he balked at basing the autosave feature
> explicitly on git based similar concerns. I feel he made the right choice,
> but the same reasoning applied in this case would lead to the same result I
> think (not basing features explicitly on git).

While git support was not in the initial autosave work, it was
designed with git in mind.  The idea is that git could be plugged in
to track the checkpoints rather than our .ipynb_checkpoints directory.
 We haven't figured out how checkpoints would exactly be mapped onto
git concepts (is a checkpoint a commit?), but this is really important
to us and will be happening.  But there will come a day when clicking
"Save and checkpoint" in the notebook will invoke git if the notebook
is in a git repo...



> He is of course perfectly capable of talking for himself however, so I'll
> stop (sorry Min!) and simply speak for myself. I think it would be a mistake
> to move from strongly encouraging users to use git or other version control
> with their notebooks to actually basing major features* of the application
> directly on the assumption that the notebook lives in git with a specific
> set of tags/branches/whatever that IPython is going to programmatically
> interpret in a certain way.
> *Note this is different than things like a "check in my changes" button if a
> notebook can tell it is version controlled somehow. At least in my opinion.
> ~G
> On Wed, Jul 10, 2013 at 9:23 AM, Brian Granger <ellisonbg at gmail.com> wrote:
>> Nice idea - some of the branching could be built using git...
>> On Wed, Jul 10, 2013 at 1:40 AM, Stéfan van der Walt <stefan at sun.ac.za>
>> wrote:
>> >
>> > On 10 Jul 2013 04:33, "Brian Granger" <ellisonbg at gmail.com> wrote:
>> >> It would be nice to write a long notebook and then add metadata to the
>> >> notebook that indicates that some variables are to be treated as
>> >> "templated" variables.  Then we would create tools that would enable a
>> >> user to run a notebook over a range of templates:
>> >>
>> >> for x in xvars:
>> >>   for y in yvars:
>> >>     for algo in myalgos
>> >>     run_notebook('MyCoolCode', x, y, algo)
>> >
>> > I think it would be feasible to build git-like cell revision tracking on
>> > top
>> > of the linear notebook, especially once widgets are in place. Imagine a
>> > per-cell and per-notebook check-in that allows you to swap out different
>> > versions of a cell, or different notebook configurations. This can be
>> > done
>> > with a very lightweight abstraction that does not interfere with the
>> > underlying notebook structure at all (in fact, I'd just use git as the
>> > actual backend, and then have a layer on top that knows how to pick out
>> > tagged cells from a nb).
>> >
>> > Stéfan
>> >
>> >
>> > _______________________________________________
>> > IPython-dev mailing list
>> > IPython-dev at scipy.org
>> > http://mail.scipy.org/mailman/listinfo/ipython-dev
>> >
>> --
>> Brian E. Granger
>> Cal Poly State University, San Luis Obispo
>> bgranger at calpoly.edu and ellisonbg at gmail.com
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
> --
> Gabriel Becker
> Graduate Student
> Statistics Department
> University of California, Davis
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com

More information about the IPython-dev mailing list