Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit bd5c260

Browse files
lauragustafsonfacebook-github-bot
authored andcommitted
Fix version of nbconvert, and update ipynb to html script (#88)
Summary: Pull Request resolved: fairinternal/ClassyVision#88 Pull Request resolved: #662 Script to parse to ipynb into html for ClassyVision website was broken, as there was no longer a `div` with `id` `notebook-container`. Likely culprit is `nbconvert`, so fixed version in `setup.py` to hopefully prevent breakage in the future. Reviewed By: vreis Differential Revision: D25128504 fbshipit-source-id: f636d3f55d6ea0f50bac28f398d26a21ccaf405e
1 parent 40889ea commit bd5c260

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

scripts/parse_tutorials.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ def gen_tutorials(repo_dir: str) -> None:
6868

6969
# pull out html div for notebook
7070
soup = BeautifulSoup(html, "html.parser")
71-
nb_meat = soup.find("div", {"id": "notebook-container"})
72-
del nb_meat.attrs["id"]
71+
nb_meat = soup.find("body", {"class": "jp-Notebook"})
7372
nb_meat.attrs["class"] = ["notebook"]
7473
html_out = JS_SCRIPTS + str(nb_meat)
7574

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"sphinx",
5555
"isort==5.2.2",
5656
"bs4",
57-
"nbconvert",
57+
"nbconvert==6.0.7",
5858
"pre-commit",
5959
"parameterized",
6060
]

0 commit comments

Comments
 (0)