-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'd love to write a script that could be integrated into Davos as a CLI entrypoint, and provide a tool that people could use to "davos-enhance" a notebook automatically.
The use case I'm imagining is you have a Jupyter notebook you want to share with someone, and you want to turn it into a "davos-enhanced notebook" to more easily share it in a reproducible way. So you open a terminal and run davos enhance path/to/notebook.ipynb. The script then:
- adds a new cell at the top of the notebook that
%pip installs andimportsdavos - parses the code in the notebook and replaces all
importstatements with equivalentsmugglestatements - adds onion comments next to each
smugglestatement that specify the package versions installed in your environment
The davos enhance command could support various options to do things like:
- add a
davos.require_python()call before the firstsmugglestatement - not add onion comments for certain (or any) packages
- create a copy of the notebook rather than modifying the original
- enable or set various
davos.<foo>options before smuggling packages
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request