-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kernel path for thebelab #189
Conversation
woot! this looks nice - let's give it a whirl once the new thebelab is up! |
Just a note on this - it looks like 0.4 is now on unpkg so can we test this? |
I think 0.4.0 has been out for a while now and it doesn't include the changes yet...we need to wait for the next version >0.4.0 |
ok, 0.5.1 is now out, so this should have fixed things! I fixed conflicts and updated the code a bit to be cleaner...but it should work now, can somebody confirm? |
I will check next week! |
Ok, so I tested this on my site (how would you unit-test this?), and the generated html looks good: <script type="text/x-thebe-config">
{
requestKernel: true,
binderOptions: {
repo: 'joergbrech/Modellbildung-und-Simulation',
ref: '2-thebelab-directory',
},
codeMirrorConfig: {
theme: "abcdef"
},
kernelOptions: {
name: 'octave',
path: "content/00_einleitung"
}
}
</script> Running thebelab uses the specified path, so this seems to work well, but there is still a problem:
|
interesting - so for unit testing, that's a great question :-) I have struggled with "how to unit test javascript + html" since the beginning of jupyter book. I think there are frameworks for doing this but none that I've had the time to learn and implement |
Seems like it. When pressing the thebelab button, the console prints
and when opening the url at [{"id": "4bbd8147-e749-46ff-9775-231c4ebb1b32", "name": "python3", "last_activity": "2019-11-05T06:12:15.829162Z", "execution_state": "idle", "connections": 1}] So apparently a python3 kernel is started. And since thebelab is running with a python kernel instead of an octave kernel, I can copy import os
print(os.getcwd()) into any of the code cells to verify that binder is running in the correct path. I will try and dig deeper, but this new(ish) kernel issue might be unrelated to #107 and this PR... |
for jupyterlab sessions API addresses executablebooks#107
Found it! It turns out we should use
I am not sure why this test fails? |
This LGTM, thanks very much for the fix @joergbrech !! |
This should hopefully fix #107, now that executablebooks/thebe#114 is fixed.
It doesn't really make sense to merge this until a new Thebelab version (>0.4.0) is released and this can be tested, so I added a [WIP] label to the PR name for now.