Closed ntluong95 closed 1 year ago
I am not getting any of the issues that you posted for 0.1.12
. Did you restart your IDE after the plugin install?
Also, consider posting your .ipynb file.
Hi, you can find the sample dataset here: https://github.com/ntluong95/data/blob/main/smartexecute.ipynb https://github.com/ntluong95/data/blob/main/smartexecute.py
Let me guide you to reproduce the problem
1a Put your cursor at any line in the file, run action "Execute cell in console", there is nothing happen with this file. But for another .py file, this give me the above error (it seems running all codes in the file). In version 0.1.11, running this action can run exactly the code block, which is unexpected but very useful 1b Now put your curse in line 8 to run the list my_cols with action "Execute selection in console", it runs correctly and the curse move to line 10 (blank line before the comments). My expectation is it can jump directly to next code block in line 17
I am using Window 11, Python 3.11 and DataSpell EAP 2023.2
For 1a, you can use the DataSpell built-in "Execute Cell in Console" ctrl
+enter
. I will also make my plugin do the same as the built-in for easier use.
1b is implementable but needs some effort. Also, we have to consider users who may not want that behavior.
For 1a, I didn't mean run the whole cell. Assume in the cell you have 2 code block, so if you put your cursor at any line in the second block and run action "Execute cell in console" from your plugin, it will send only this code block to the console.
A code block can be nested (indented), so I will need to assume you mean the top level (non indented) code block?
yes taking this example, it should recognize the highest level, here is the monthly_summary function
Just test and think the feature works well now. Close the issue. Thank you for always prompt in help
Skip over comments and blanks. https://github.com/guoci/pycharm-smart-execute/releases/tag/0.2.1
In versions 0.1.11, the introduction of "Execute and send cell code to the console" works very well with .ipynb, and coming with an expected feature that in .py file, you can put your cursor at anywhere in the code block and execute the action
Now in ver 0.1.12, this was broken. You have to highlight the whole code block. See the error I got