-
Notifications
You must be signed in to change notification settings - Fork 347
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 call engine julia
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 |
@cscheid bump :) |
One more bump :) |
About this one, @cscheid, let me recap what my current thinking is here:
|
(Thanks for bumping) Proposal: I actually think Context:
So what about the following? We add a new The main engineering complication is that this potentially propagates the Cliffy dependency into |
The |
090ad2e
to
650e89d
Compare
I'm marking this "ready for review" now because I'm generally happy with the functionality. However, the CI script still pulls in this PR PumasAI/QuartoNotebookRunner.jl#229 which probably only makes sense to merge after this PR here was ok'ed, as they belong together. I have changed the interface to No docs have been written, yet, I will do so once this PR passes review. |
This is great, and we'll get a lot of mileage out of Could you add an entry to the changelog? Just use the number of this pull request as reference, and use the "Other Fixes and Improvements" section (you'll see examples) |
All right, I have added two entries, one more focused on the julia commands and one on the new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to approve this. With that said, unless I'm missing something, we should consider adding a description()
to src/command/call/cmd.ts
engineSubcommand | ||
.description( | ||
`Access functionality specific to the ${name} rendering engine.`, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. I think that we should let engines have a method to build a response, but that can happen in a different PR.
All right, I've released QNR 0.15 and changed compat to that version so that I could remove the special branch from CI again. I've also added a description to |
🎉 |
Thank you @jkrumbiegel ! |
Thank you for merging, I'll write up some docs next week |
Description
This PR adds CLI commands to interact with or diagnose the native julia engine. It adds a new subcommand
call engine julia
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
andclose [--force]
.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.The
close
command can be used to close workers that are currently idle. To close workers that are currently computing something, the--force
flag can be added which adds a way to recover from hanging or long-running worker processes.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. 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.