-
Notifications
You must be signed in to change notification settings - Fork 24
Resolved #107 -- Added support for line & cell magics by subclassing MetaKernel #109
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
base: master
Are you sure you want to change the base?
Conversation
a-apple1234
commented
May 23, 2025
- Subclassed MetaKernel to implement custom line and cell magic commands
- Updated output methods to follow MetaKernel’s conventions
- Adjusted execution logic to align with MetaKernel's do_execute function
|
Thanks for the PR. You can add the MetaKernel requirement at: dyalog-jupyter-kernel/setup.py Lines 23 to 25 in ef152d3
|
80342d9 to
f3cebc6
Compare
|
done |
|
Try squashing the remove import commit: https://youtu.be/42392W7SgnE?t=334 |
f3cebc6 to
a402e3d
Compare
|
done |
|
There's an extra commit by @martanit. You can delete that commit in |
a402e3d to
719b48d
Compare
|
done |
|
done |
bdbe457 to
b26bc21
Compare
|
My notebook hangs when I try to run a cell. Is there a working demo I can try? `jupyter notebook` output |
|
Entering the following commands into Terminal on macOS successfully set up the kernel for me:
If you are using just a kernel.py and kernel.json file to test this locally, the error might occur if you aren't starting the kernel using |
|
Still the same problem. I'm on Linux (NixOS). However it works when I tried it on Windows. |
|
Could you send the output from this command: |
|
The main branch displays the same `jupyter console --kernel=dyalog_apl --debug` |
@xpqz can you see if it works on your end? Thanks |
|
Works for me on Windows 👍! |
|
It would be good to see an outline of the consequences of switching from ipykernel.kernelbase to MetaKernel as the baseclass. Whilst convenient, are there any implications or future limitations we should be aware of? |
|
Hi @MaxCan-Code and @dwijy-piggy, I successfully installed the kernel on a Ubuntu VM (by following more or less https://github.com/Dyalog/dyalog-jupyter-kernel/blob/master/DEVELOPMENT.md and testing it locally). @MaxCan-Code did you managed to install it on your OS? Anyway, before a merge, it would be nice to have more details on advantages/disadvantages of using MetaKernel, as @xpqz is asking. Thanks! |
|
I'm still getting the same problem on my end: #109 (comment). |
|
Got it to work by bypassing all magic by adding def register_magics(self, magic_klass):
return []to the DyalogKernel class in kernel.py as described in Calysto/metakernel#287. Looks like an upstream issue related to Nix. |
…ssing MetaKernel - Subclassed MetaKernel to implement custom line and cell magic commands - Updated output methods to follow MetaKernel’s conventions - Adjusted execution logic to align with MetaKernel's do_execute function
b26bc21 to
232a283
Compare
Never mind. The .inputrc1 file I'm using was messing with the shell magic setup. Everything worked as expected after moving that elsewhere. Footnotes |
@xpqz MetaKernel is actively maintained and is used by several other kernels. It essentially just checks for and executes any magic commands before deferring to the code defined in the |

