Skip to content

Commit

Permalink
Fix version of nbconvert, and update ipynb to html script (facebookre…
Browse files Browse the repository at this point in the history
…search#88)

Summary:
Pull Request resolved: fairinternal/ClassyVision#88

Pull Request resolved: facebookresearch#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
  • Loading branch information
lauragustafson authored and facebook-github-bot committed Nov 20, 2020
1 parent 40889ea commit bd5c260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions scripts/parse_tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ def gen_tutorials(repo_dir: str) -> None:

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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"sphinx",
"isort==5.2.2",
"bs4",
"nbconvert",
"nbconvert==6.0.7",
"pre-commit",
"parameterized",
]
Expand Down

0 comments on commit bd5c260

Please sign in to comment.