-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[WIP] OWPythonScript: Rewrite #4402
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4402 +/- ##
==========================================
+ Coverage 84.24% 87.45% +3.20%
==========================================
Files 283 405 +122
Lines 57873 74084 +16211
==========================================
+ Hits 48756 64787 +16031
- Misses 9117 9297 +180 |
96dc73d
to
aaa8a20
Compare
aaa8a20
to
74ccd9a
Compare
b1b3876
to
2151845
Compare
cf7fce8
to
aaf31c8
Compare
6c7ca4b
to
a1ebfca
Compare
a1ebfca
to
a203c2b
Compare
a203c2b
to
c97d377
Compare
c97d377
to
2e18284
Compare
…on qtconsole - Introduce OrangeIPythonKernel for script running functionality
- For nicer error messages
- Modelled after Jupyter lab - Editor is styled with Qutepart's built-in highlighter - Console is styled with pygments
The subclassed widget uses a lot of super protected methods, mostly in manipulating prompt appearance -- any bugs which arise are likely to be purely cosmetic. Still, I'm constraining the required version to the current latest version. - Implement kernel interrupt on new run_script request or ctrl+C
by adding a fake function signature and return statement, whose variables are bolded on in_ signal connection/out_ variable collection. - Removed info box - TODO add tooltips to parameters
d5f2b5a
to
8b61ad5
Compare
9f1ca66
to
3f4ad36
Compare
This is pretty much finished, just documentation left. ... Except, tests show @ales-erjavec, could you take a look to see if I didn't royally screw something up? Also, if anyone wants any specific keyboard shortcuts in the widget, let me know! The editor already supports stuff like moving lines (Alt+Up/Down), see the WIP documentation for more. |
ae55728
to
703f65a
Compare
I've gone ahead and added completions in the editor as well, modeled after spyder-ide. What's left is tooltips, like in the console, but I'm leaving that for some other time. The only issue left is performance. The kernel starts up slowly; it takes at least a couple of seconds each time. Launching qtconsole as |
Closed in favor of biolab/orange3-prototypes#219. |
Description of changes
The code editor (a QPlainTextEdit) is replaced with Qutepart (a QPlainTextEdit subclass). The source code for this was copied into Orange.
The console is replaced with a jupyter qtconsole, which runs a customized IPython kernel.
The main process and kernel process communicate in JSON, so variables are pickled, base64 encoded, sent, decoded, unpickled. This is very space inefficient. Perhaps something like https://jsonpickle.github.io/ could alleviate the issue?
The library stores files in a real folder, allowing users to import from their other scripts. Scripts aren't saved by default.
Includes