-
Notifications
You must be signed in to change notification settings - Fork 506
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
Feat: support script files #330
Feat: support script files #330
Conversation
fe5795d
to
6d8039e
Compare
6d8039e
to
1dd4300
Compare
Example usage:
Now you can access:
The tree handler and the voila handler (both the standalone and server extension) will serve and show The final step would be to document this We might also want an |
67949e6
to
94ed231
Compare
That would remove one level of indirection, but I guess having both |
We can also consider adding aliases for these options if they tend to be used often. |
'name': kernel_name | ||
} | ||
}, | ||
cells=[nbformat.v4.new_code_cell(model['content'])], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe later after adding support for the progressive rendering (#133) there could be more than one cell created, from cell delimiters such as %%
or # In[1]:
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this could again be a configurable, mapping from file extension to regex. I'd say not now right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed let's do that later (we can open an issue to track it).
Co-Authored-By: Jeremy Tuloup <jeremy.tuloup@gmail.com>
Depends on #309 (alternative to #328)
Now we can do:
It works by injecting the script code into an in-memory single-cell notebook, which means the last expression is printed out. If for some reasons one needs more output, you can use
display(expression)
, or use jupytext (which should also be supported with this PR).