jupytext icon indicating copy to clipboard operation
jupytext copied to clipboard

PyCharm plugin for Jupytext

Open mwouts opened this issue 6 years ago • 5 comments

The VIM plugin for jupytext is great! With that plugin, one can edit the ipynb represented as text, directly in VIM. Can we have a similar plugin for PyCharm?

mwouts avatar Jan 04 '19 13:01 mwouts

The big question here is whether a PyCharm plugin can run python code. I've asked this question on the PyCharm issue tracker.

mwouts avatar Jan 04 '19 13:01 mwouts

Good suggestion! I have observed at least 2 open sourced plugin that supports running code in REPL, these are:

https://github.com/julienr/pycharm-cellmode

https://github.com/donkirkby/live-py-plugin

Your case is a bit different, as a jupyter-notebook server has to be set up with the IDE's file panel, then any command that triggers a cell run should be redirected to that server, which will refresh the web page in the IDE's right panel. This is definitely doable, probably not hard if not considering device & environment compatibility.

The problem at the moment is that JetBrain promised to upgrade their suppot for ipynb file and release an alpha in PyCharm 2019EAP1, so everybody is kind of sitting there and observing. If it is not released (or if it still sucks) I believe they will act immediately on your proposal.

tribbloid avatar Jan 22 '19 02:01 tribbloid

Thanks @tribbloid for the references - that's exactly what I was looking for.

Yes I agree that we should wait and see what PyCharm delivers in their next release. Indeed, they answered PY-33389 with the mention:

we are working on the same system right now, the current ETA for Jupyter redesign is 2019.1.

mwouts avatar Jan 22 '19 21:01 mwouts

For what it's worth, I would love this. Super tired of using Jupyter Lab for notebooks then PyCharm for everything else. I'd also really prefer not to have .ipynb files anywhere or to have to manage syncing them. .py files only but with native pycharm notebook support would be grand!

patricksheehan avatar Oct 08 '21 00:10 patricksheehan

Hi @patricksheehan , well this is an old issue, maybe I can give a few updates

  • As far as I know it is possible to open .py files as notebooks in VS Code, but not in PyCharm. My notes on the subject date back to Jan 2020, see this paragraph.
  • I see that you don't want to sync .py and .ipynb files, but still if you decided to take that direction, I think you have two options
    1. Our pre-commit hook is probably the way to go if you want to sync the files at commit time
    2. If you want to sync the files at save time, maybe you could use PyCharm's FileWatchers as suggested in this comment. If you decide to give them a try I'd be curious to know how that goes!

mwouts avatar Oct 10 '21 13:10 mwouts