AnswerDotAI / AnswerDotAI/nbdev
[Feature Requests] What about making `nbdev_separate` to automatically separate imports and codes?
- Dominant language
- Jupyter Notebook
- Stars
- 5.3k
- Forks
- 513
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 8
Description
https://nbdev.fast.ai/getting_started.html#q-what-is-the-warning-found-a-cell-containing-mix-of-imports-and-computations.-please-use-separate-cells
This is a strong limitations to the usability of nbdev.
Every time I try to export docs, I spend hours cleaning up my code to sepearte imports and codes, reading tedious and annoying error messages from `nbdev_docs`.
We definitely have the ability to do this automatically. (since nbdev can produce warning messages about the situation)
Why not provide a simple tool like `nbdev_separate`, to automatically detect import lines in a cell and reformat them to a new cell above the original cell.
Contributor guide
Assessment
This issue has not been assessed yet.