Hello, I’m a data scientist, and am looking for some guidance on my first jupyterlab extension.
I’m looking to create a new command (called restart-kernel-and-run-all-and-git-add) that would save me a few clicks by combining a few steps together in a single menu item.
Then in your shiny new package, you want your activate function to look something like:
activate: (app: JupyterFrontEnd) => {
const {commands} = app;
app.commands.register("restart-kernel-and-run-all-and-git-add", {
execute: async (args) => {
await commands.execute('runmenu:restart-and-run-all');
//... wait for the kernel to be idle... kinda tricky!
//... find the right command, or use `fetch`
},
});
};
A quick look didn’t reveal anything in jupyterlab-git on the client side… but maybe you can ask!
Going a little deeper: I think a user-serviceable macro system would be lovely. It’s probably a (needfully) loose JSON schema. This is a thing I’ve never actually sat down to write, but have wanted so many times. Even had a clever name in mind, comacho…
I’ve got a 3 point plan that’s going to fix EVERYTHING.