-
Notifications
You must be signed in to change notification settings - Fork 334
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
Julia engine commands #11803
base: main
Are you sure you want to change the base?
Julia engine commands #11803
Conversation
I want to give a little bit of further thought to the
|
I completely understand, which is why I wanted to get your feedback early :)
I see, that didn't occur to me before. Not sure about |
@cscheid do you want me to go ahead and switch this PR to |
Description
This PR adds CLI commands to interact with or diagnose the native julia engine. It adds a new subcommand
engine
for this purpose:Implementation
The PR adds a new optional field
populateCommand
to theExecutionEngine
interface which only the julia engine currently sets, but others could potentially as well. This field takes a function that adds its own cliffy subcommands under its key, in the julia engine's casejulia
.Julia commands
The subcommands for a given engine can be inspected as well. In this PR I've added
status
,kill
andlog
.The
status
command can be used to print out information about the currently running server process. For example, ifquarto render scratch/test.qmd
has just been started the output is:or when some notebooks are idling and waiting to be rerun:
Before, there was no way to check what had gone wrong if the server didn't respond anymore. Now, the julia process writes to a log file which can be inspected with the
log
command:If nothing helps or if the server should be restarted for some other reason, the
kill
command sendsSIGTERM
to thepid
that's saved in the transport file.Trying this PR
This PR depends on unreleased changes to QuartoNotebookRunner.jl. You can clone the repository and check out PR 229. Then you can run quarto with
QUARTO_JULIA_PROJECT=path/to/cloned/repo
.Summary
This PR adds julia-engine specific commands to the quarto CLI interface. Having such an
engine
namespace was discussed earlier with @cscheid but this PR is the first specific proposal how that logic could look. Other than creating the means for other engines to hook in their own commands, this PR does not add any functionality for non-julia engines.At the current stage I would first like to get maintainer approval for the general mechanism I introduced here. Comments about the interface for the actual commands is appreciated as well. I will probably also need a little help once the PR goes into the test writing stage, as I have only interacted with the notebook rendering test infrastructure so far, not the general tests for the CLI.