almond-sh / almond

A Scala kernel for Jupyter
https://almond.sh
BSD 3-Clause "New" or "Revised" License
1.59k stars 239 forks source link

Add Fixes for Post-Interrupt Hook Feature #1234

Closed piiteraq closed 1 year ago

piiteraq commented 1 year ago

This is a rework of https://github.com/almond-sh/almond/pull/1186 to make the post-interrupt hook feature work as intended:

Note: Contrary to execution hooks, interrupt hooks do not at present funnel output from one hook into the input of the next in the chain.

Please find screenshots from local testing attached below.

Screenshot 2023-08-13 at 6 55 27 AM Screenshot 2023-08-13 at 6 54 09 AM Screenshot 2023-08-13 at 6 56 10 AM
alexarchambault commented 1 year ago

@piiteraq Going to merge and cut a release before the end of the day Europe time. Just tell me if you have an opinion about the extra commits I pushed.

piiteraq commented 1 year ago

Hi @alexarchambault - Thank you so much for the review and the fixes - I agree on all of them. I had difficulties figuring out how to pass the JupyterApi instance down through the call chain through normal parameter passing, so added the instance setter/getter and thought you might have a better idea, which indeed turned out to be the case. Also, you fixed the problem I had with accessing the logger in the proper location. Thus, please proceed with the release. Thx --