-
Notifications
You must be signed in to change notification settings - Fork 391
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
Sage support #727
Comments
Hi @frcl , thank you reaching out! Well that part of the documentation could be improved, for sure. What I meant is that you can have code cells in another language than the main notebook language (often Python) if there is an official magic command for that language (like In your case it seems that the main language for your notebook is Sage. You're right, Sage is not currently supported by Jupytext - but that should be a very easy pull request. You have provided already a sample notebook, that's great, could you please confirm what is the most common file extension for Sage files? Is that simply |
Thanks of the help. I will provide a notebook with |
Thanks @frcl for the sample notebook. I am quite surprised to see Python rather than Sage in the language info of the sample notebook, could you please confirm that this is the case for all your Sage notebooks? If so, we will have to make an adjustment on the way the script extension (should be |
Well, sage is just a thin wrapper around python with some snytaxtic sugar added with a preparser and lots of libraries. In general sage code will not execute when called directly with python, so the ambiguous extension The |
Hi @frcl , thanks for the information! I have added a fix to take this specificity into account. Would you like to give a try to the development version? You can install it with
(prefix that with |
Works fine. Thank you very much! This is a huge improvement for me. |
I noticed that when I pair a notebook with a sagemath kernel with a markdown file, code blocks are not converted to code cells. Here is a minimal example:
After converting with
jupytext --to ipynb exmplae.md
the code block ends up in a markdown cell. With a python kernel and a python code block the conversion works as expected, resulting in a code cell.The documentation states that
But sage is supported by Jupyter. Maybe what is meant here is that the language must be supported by Jupytext? Since sage is not listed under supported languages. I would be grateful for a clarification.
The text was updated successfully, but these errors were encountered: