course-starter-python icon indicating copy to clipboard operation
course-starter-python copied to clipboard

Resuse binder session across snippets

Open NixBiks opened this issue 5 years ago • 3 comments

Is it possible to use the same binder session for multiple snippets? For some exercises I want to continue on previous solutions.

NixBiks avatar May 27 '19 13:05 NixBiks

Yes, this is the isolateCells setting here, which is true by default (new session for each cell, i.e. code block):

https://github.com/ines/course-starter-python/blob/57d8b1ac80caddcdb921e6794b4f6666344cc48e/src/components/juniper.js#L23

Out-of-the-box, this is a global setting, though, so you have to decide if you want isolated cells for the whole course, or not. It might be possible to just add this as an attribute to <codeblock>, which passes it down to the Juniper component... but I'm not sure, it might have unintended side-effects.

ines avatar May 27 '19 13:05 ines

Cool but it doesn't seem to work?

I just did a = 2 in one session and then a was not recognized in another window.

I get Launching Docker container on mybinder.org... each time I run code in a new codeblock which takes ~20 sec. No chance to have it faster?

NixBiks avatar May 27 '19 17:05 NixBiks

Sorry @ines, I also tried this changing isolateCells: true in src/components/juniper.js and I am still not having follow up cells a retaining the variables in the previous cell's environment. Is there anywhere I should look to debug this? I think this feature could be really useful especially for importing modules and data.

hfboyce avatar Mar 02 '20 18:03 hfboyce