n-riesco / ijavascript

IJavascript is a javascript kernel for the Jupyter notebook
Other
2.19k stars 185 forks source link

Executing ijavascript kernels with nbconvert #62

Closed jhamrick closed 8 years ago

jhamrick commented 8 years ago

I believe this is somewhat related to the discussion happening in #58 , but I figured it warranted its own issue. Currently, the fact that the "idle" message gets sent before the output messages causes problems with nbconvert, which assumes the cell is done executing once it receives the idle message. Thus, you currently cannot execute a notebook using the ijavascript kernel and have the outputs saved back out to the notebook.

Perhaps this is a bad assumption on nbconvert's part, but at least for the moment I think that's the only way it can reasonably work. @minrk @takluyver maybe have further thoughts on this?

rgbkrk commented 8 years ago

In the case of IJavascript, the execute_result message should happen before the status message comes with execution_state of idle. After that though, I'd say it's fair game for stream, display_data, etc. to all come back after the idle.

n-riesco commented 8 years ago

@jhamrick It is a bug in the Ijavascript kernel. I've fixed it in the async-stdio branch.

Although the async-stdio branch is working, I haven't released yet, because I want to update the documentation and clean up some bits and bobs.

If this issue is urgent for you. I could release the branch as it is.

n-riesco commented 8 years ago

@jhamrick I've decided to make a pre-release. Please, could you confirm it fixes this issue with nbconvert?

jhamrick commented 8 years ago

I tested it from the async-stdio branch and it does indeed seem to fix it! Thanks!

n-riesco commented 8 years ago

On 05/03/16 14:33, Jessica B. Hamrick wrote:

I tested it from the async-stdio branch and it does indeed seem to fix it! Thanks!

Thanks for the confirmation.

rgbkrk commented 8 years ago

Yay! Thanks @jhamrick and @n-riesco