-
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
configure magic conversion is seamless #513
Comments
Hello @malayhm , thanks for reporting this. Now we could think of three ways of fixing this...
b) we add I just gave a try to c), and I am not so sure we want to do that... For instance, for %%time` I am not sure we want to comment out the content of the cell. What do you think? |
@mwouts Thanks for the quick response. Let me dig deeper and find out which one of the above solutions will bring the desired behavior. |
Sure! Keep us posted. Let us know if know if a) works for you. Also, if you want to try b) locally, that's easy, you just need to add |
Hello @mwouts, Here are my findings:
This produces the same output, hence it will not work.
It is part of sparkmagic, https://github.com/jupyter-incubator/sparkmagic
I think, jupytext should support There will be one more use case where someone implements custom magic, it will follow into the same category where handling has to be taken care of in the code. Considering all the above points, I think if we come up with an option to add new languages as a configuration option through command line or notebook configuration, that would solve the issue for What do you think? |
Hi @malayhm , yes I agree that adding new items to the list of cell magics would be great. I'll think about how to do that. Also, I think the continuation line approach (which is only a quick fix, I agree) should work. At least it does work in this unit test: 6b6317d. Would you like to give it a second try? Maybe in the notebook you should enter a single |
@mwouts The above approach will work when the input is controllable. I am trying to handle a case where I don't have control over the cell content hence this approach will fail. I think there will be two options for the smooth conversion:
I think option 1 will change the user input and the reverse conversion will not retain the actual data. What are your thoughts? |
Hi @malayhm , the next release (version 1.6.0) will have a new configuration option For instance, if you add
to your |
Thanks for the update @mwouts. |
%%configure magic code conversion is not seamless, for example:
gets transformed to python code & r code
and gets transformed to scala code
I think the conversion should be completely commented similar to SQL magic %%sql.
The text was updated successfully, but these errors were encountered: