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

[Feature Requests] What about making nbdev_separate to automatically separate imports and codes? #1468

Open
2catycm opened this issue Nov 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@2catycm
Copy link

2catycm commented Nov 18, 2024

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.

@2catycm 2catycm added the bug Something isn't working label Nov 18, 2024
@2catycm 2catycm changed the title Why not automatically separate imports and codes? [Feature Requests] What about making nbdev_separate to automatically separate imports and codes? Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant