nbdev icon indicating copy to clipboard operation
nbdev copied to clipboard

Feature: add support for .py files in py:percent format

Open lukastk opened this issue 1 year ago • 2 comments

  • Introduces the ability to handle .py files as py:percent files within nbdev.
    • Does this by converting .py files to .ipynb format as an intermediate step in NBProcessor.__init__
  • Added example of usage in 'nbs/api/04_export.ipynb'.

Can export all *.py files by running nbdev_export --file_glob '*.py'

See https://jupytext.readthedocs.io/en/latest/formats-scripts.html for info on the py:percent format.

lukastk avatar Aug 22 '24 15:08 lukastk

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Related issue: https://github.com/fastai/nbdev/issues/1437

lukastk avatar Aug 22 '24 16:08 lukastk

This is a great feature! But I don't want to add these additional deps to nbdev. Could we make it an extension or some other kind of separate project? Or alternatively only enable these new features if these deps are installed (but not make them requirements)?

jph00 avatar Aug 27 '24 02:08 jph00