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

Feat: Enable d2l default tab even if few notebooks have missing default #51

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions d2lbook/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ def merge(self):
updated_notebooks = get_updated_files(notebooks, default_eval_dir,
self.config.eval_dir, 'ipynb',
'ipynb')
tab_dirs = [
default_eval_dir + '_' + tab for tab in self.config.tabs[1:]]
# All tab notebooks need to be verified with file size for skipping
tab_dirs = [default_eval_dir]
for tab in self.config.tabs[1:]:
tab_dirs.append(default_eval_dir + '_' + tab)
for default, merged in updated_notebooks:
src_notebooks = [default]
src_notebooks = []
for tab_dir in tab_dirs:
fname = os.path.join(
tab_dir, os.path.relpath(default, default_eval_dir))
Expand Down