Closed meffmadd closed 6 months ago
Idea:
glob.glob
returns the list of notebooks to convert based on the given pattern. This function accepts a booelan flag "recursive" which when set to true, let the pattern **
match any files and zero or more directories and sub-directories. Setting the default pattern to **/*.ipynb
and including a recursive=True
should convert all notebooks in current dir and subdirs.
baseapp.py
file_pattern = Unicode("**/*.ipynb", allow_none=False).tag(config=True)
init_notebooks
in base.py
def init_notebooks(self) -> None:
self.notebooks = []
notebook_glob = self._format_source()
self.notebooks = glob.glob(notebook_glob, recursive=True) # Change
if len(self.notebooks) == 0:
self.log.warning("No notebooks were matched by '%s'", notebook_glob)
Is your feature request related to a problem? Please describe. Right now we only convert notebooks in the current directory by using
*.ipynb
as the glob pattern.Describe the solution you'd like The default pattern should be changed to
**/*.ipynb
so that notebooks in subdirectories are also converted. This is also necessary for grader-labextension if it does explicitly overwrite the default.