Skip to content
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

Add Fixes for Post-Interrupt Hook Feature #1234

Merged
merged 7 commits into from
Aug 21, 2023

Conversation

piiteraq
Copy link
Contributor

@piiteraq piiteraq commented Aug 13, 2023

This is a rework of #1186 to make the post-interrupt hook feature work as intended:

  • Added abstract functions to ‘JupyterApi.scala’ to make interface visible to Ammonite kernel object
  • Added API usage examples to ‘api-jupyter.md’
  • Added convenience functions for facilitating JupyterApi instance access,
    since it is hard to pass around through function/method calls. In case at
    hand, we need to access it from methods ‘interruptible’ and ‘interrupt’ in
    class ‘Execute’
  • Added a label field to each registered hook, since Scala lambda functions
    are not easy to print in human readable form
  • Did local testing of API both when sending interrupt messages via SIGINT or via
    zeromq message, i.e. without/with '--interrupt-via-message’)

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

Peter Christensen and others added 7 commits August 13, 2023 06:28
@alexarchambault
Copy link
Member

alexarchambault commented Aug 18, 2023

@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
Copy link
Contributor Author

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 --

@alexarchambault alexarchambault merged commit ba66f15 into almond-sh:main Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants