Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow nbdev_clean to accept multiple filenames or globs (#1480) #1488

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jbwhit
Copy link

@jbwhit jbwhit commented Jan 25, 2025

Overview

This PR addresses #1480 by allowing nbdev_clean to accept multiple filename arguments, rather than just a single file or glob. This makes it easier to clean multiple notebooks in one command.

What Changed

  • Multiple Files Support: Updated nbdev_clean so it can handle either a single path/glob string or a list of paths/globs.
  • New Tests: Added tests confirming multiple files are handled correctly (they fail on the old code, pass on the new).
  • Doc Update: Revised the docstring to reflect this new usage.

Known Similar Issue in nbdev_test

nbdev_test (and possibly other CLI commands) still only accept single-file arguments. This PR focuses on nbdev_clean specifically to keep it scoped. Let me know if you want a follow-up PR for nbdev_test.

Skipped a Failing Test in 10_processors.ipynb

  • One cell running _run_procs([add_show_docs, exec_show_docs]) currently fails for unrelated reasons.
  • I added #|hide and #|eval: false to skip that cell so nbdev_prepare can complete.
  • We can address that failing test in a separate issue or PR.

Please let me know if you have any questions or suggestions—this is my first PR for this project!

Add #|hide and #|eval: false to the cell running add_show_docs/exec_show_docs,
which currently fails for unrelated reasons and blocks nbdev_prepare.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant