CLI tool to "davos-enhance" a Jupyter notebook
- Dominant language
- TeX
- Stars
- 37
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
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 install`s and `import`s `davos`
- parses the code in the notebook and replaces all `import` statements with equivalent `smuggle` statements
- adds onion comments next to each `smuggle` statement 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 first `smuggle` statement
- 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.` options before smuggling packages
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.