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

[RFE] databooks run #55

Open
frenzymadness opened this issue Nov 8, 2022 · 3 comments
Open

[RFE] databooks run #55

frenzymadness opened this issue Nov 8, 2022 · 3 comments

Comments

@frenzymadness
Copy link
Contributor

I like the way databooks is able to show the content of the notebook. It might make sense to implement a run command which can run all cells in a notebook and show the progress in the CLI interface cell by cell. We don't need to implement the execution because it can be done by nbconvert or nbclient packages.

What do you think?

@murilo-cunha
Copy link
Member

Glad you like it!!

I had thought about that, but in the end I dropped it because indeed there are other tools that can do exactly that (nbconvert and nbclient), and the only "gain" I see is that we could see the outputs for each cell "interactively" - we could run this separately and run databooks show to see the outputs no?

I'm also not a super big fan of adding a new dependency just for one feature - do you see more follow up features?

If I were to go forward I'd probably try to implement this with the stdlib (exec, eval and whatnot), but it may get hacky as well (not sure how I'd do it)

All in all, it feels like it's a bit far from databooks' JSON-centric fuctionalities.. however, I was also toying with the idea of a jupyterminal app - basically a textual app that runs Jupyter on your terminal, which I think that this run functionality would fit really well there.

What do you think?

@frenzymadness
Copy link
Contributor Author

If it means that the dependency tree would grow significantly, we can make it an optional feature. Like, if you want to use databooks run install databooks[run] which would install nbclient/nbconvert or something else. I don't think we are able to implement the functionality just by using eval and or exec.

I took a look at dependencies around nbclient/nbconvert and it seems that Jupyter notebook already depends on nbconvert so people working with notebooks would not need to install anything new but the truth is that this will probably change with notebook 7 which is now in alpha.

@murilo-cunha
Copy link
Member

we can make it an optional feature

Yeah that's true. After some thought I'm inclined to give it a go! 🚀

would not need to install anything new

Do you think that's a big issue? If we make it optional I don't think it's a big big deal. I'm more thinking of conflicting dependencies (for people using jupyter and databooks).

It feels like nbclient would be the way to go? From the docs it feels like a subset of nbconvert? nbclient doesn't seem to release breaking changes often, do you think we would generate dependency conflicts?

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

No branches or pull requests

2 participants