The unique id of this executor.
Used for better tracing and to avoid duplicate entries for an executor (e.g. due to having multiple servers and therefore multiple addresses)
A map of the specifications of Jupyter kernels available on this machine.
The language for the current session.
Servers that will listen on behalf of this executor and pass on requests to it.
Maximum time that the process will run.
Seconds of inactivity after which the listener stops.
Begin running a Node
.
This method keeps a document "running", usually to allow it to react
to changes within it. Compare this to execute()
which will not wait
and will simply execute all nodes in the document.
The document will keep running until the end()
method is called on it.
Usually this method is called with a SoftwareSession
as the
node
argument. However, it could also be called with another Node
type, e.g. an Article
, in which case the executor may begin it's
session
property, or default session if that property is missing.
The node to run, usually but not necessarily, a SoftwareSession
The Claims
made for the call
The node, with updated properties, after it has begun running
Build a Node
.
The node to build
The build node
A fallback implementation of one of the above methods.
Since this base executor has no capabilities, this method
simply throws a CapabilityError
. Derived classes, may
override this method, and /or one of the methods above.
Provided so that derived classes such as Client
, Delegator
and Queuer
can override a single method to provide their
functionality instead of having to implement each of the above methods.
The name of the method
Values of parameters (i.e. arguments)
Cancel a previous request to call a method
The unique id of the request to be cancelled.
Whether or not the request was cancelled.
Compile a Node
.
The node to compile
The compiled node
Decode content to a Node
.
The source of the content to decode
The format of the content
The decoded node
Encode a Node
in a format.
The node to encode
The destination for the encoded content
The format to encode
The encoded content, or the destination of the content.
End running a Node
.
The running node, usually but not necessarily, a SoftwareSession
The Claims
made for the call
The node, with updated properties, after it has ended running
Find Jupyter kernels that are installed on this machine.
Receive a response message from the kernel on the IOPub
channel.
See https://jupyter-client.readthedocs.io/en/stable/messaging.html#messages-on-the-iopub-pub-sub-channel
Response message
Get the manifest of the executor.
Call a pipeline of methods passing the result of each call as the first argument of the next call.
This method is a "meta" method that is used to chain together calls to other methods. When using a remote executor, it is more efficient than chaining those calls together "by hand" because it only involves one round trip request to the executor.
The node to pipe through methods
A list of method, parameters tuples to pipe the node through
The node after it has been piped through the methods
Register this listener so that it can be discovered by other executors.
The path to the registration file.
Resolve a request if a reply has been received and state is idle.
Run this executor
Starts listening with graceful shutdown on SIGINT
or SIGTERM
,
and checking for timeout (if set).
Send a request message to the kernel on the shell
channel
Type of request e.g. 'execute_request'
Content of request message
Seconds before the request should resolve regardless on whether confirmation messages are received from the kernel.
Receive a response message from the kernel on the shell
channel.
Response message
Start listening by starting all servers.
Any additional servers to start.
Start a Jupyter kernel.
Convert a "MIME bundle" within a JMP message (e.g. a execute_result
or
display data
message) into a data node.
This method serves the same function, as decodeMimeBundle
in Encoda
https://github.com/stencila/encoda/blob/656d26f5387d14f0d3071614cdbf0403eb18be31/src/codecs/ipynb/index.ts#L675
but only deals with version 4 of the protocol and handles fewer MIME types.
Also, it preferentially extracts "richer" media types for the bundle (e.g. images before plain text representations of images).
A JMP MIME bundle
A Stencila Schema node
Generated using TypeDoc
Construct a Jupyter executor.
New Jupyter execution contexts can be constructed using the
language
option which will search for a kernel with a matching lowercasedlanguage
property:Alternatively, you can specify a kernel directly:
See https://github.com/jupyter/jupyter/wiki/Jupyter-kernels for a list of available Jupyter kernels.