[ 
https://issues.apache.org/jira/browse/TOREE-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15300106#comment-15300106
 ] 

Chip Senkbeil commented on TOREE-316:
-------------------------------------

[~lbustelo], is this to be embedded in the kernel.json? Or is this part of the 
kernel info request message that is made when first connecting to the kernel? 
Either way, can't we just have hard-coded metadata for whatever the default 
interpreter is? If it's Scala, return that language info. Do the same for other 
languages we support based on the specified default interpreter (either when 
installing kernel.json files or when getting the kernel info request). If it 
needs to be in a message sent by the kernel, we can have a plugin per language 
that provides that information and just ask for the kernel information from 
whatever the default is? I'm doing something similar when converting 
interpreters to plugins.

> Generate Scala file from Jupyter Notebook
> -----------------------------------------
>
>                 Key: TOREE-316
>                 URL: https://issues.apache.org/jira/browse/TOREE-316
>             Project: TOREE
>          Issue Type: New Feature
>         Environment: Toree 0.1.0.dev7
> Jupyter Notebook 4.2
> Scala 2.10
> Python 3.5.1
>            Reporter: Leonardo Noleto
>            Priority: Minor
>             Fix For: 0.1.0
>
>
> Hello all,
> I am unable to generate a Scala file from a Jupyter Notebook with the good 
> file extension (.scala) through NbConvert:
> {noformat}
> jupyter nbconvert --to script MyScalaNotebook.ipynb
> {noformat}
> It's not a big deal as it generates the code but with .txt extension.
> The fix seems quite easy (the notebook metadata is not full jupyter 
> compliant).
> Here goes an example of metadata created by Toree: 
> {code:javascript}
> {
>   "kernelspec": {
>     "name": "scala_no_sparkcontext_scala",
>     "display_name": "Scala with SparkContext - Scala",
>     "language": "scala"
>   },
>   "language_info": {
>     "name": "scala"
>   }
> }
> {code}
> Now, for a modified version enabling good generation (with .scala extension):
> {code:javascript}
> {
>   "kernelspec": {
>     "name": "scala_no_sparkcontext_scala",
>     "display_name": "Scala with SparkContext - Scala",
>     "language": "scala"
>   },
>   "language_info": {
>     "name": "scala",
>    "file_extension": ".scala"
>   }
> }
> {code}
> The modified code solves the "Download as" with the good extension.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to