Skip to content

Commit 78b9641

Browse files
committed
prints
1 parent ebede35 commit 78b9641

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

deployment/installtutorials.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,22 @@ def process_repo(repo, destination_directory):
5454

5555
repo = Path(tmp)
5656
tutorials = glob.glob(f"{repo}/_sources/*.ipynb")
57-
print(f"Found tutorial(s) {tutorials}")
5857
for t in tutorials:
58+
tname = os.path.splitext(os.path.basename(t))[0]
59+
print(f"Copying tutorial {tname}")
5960
shutil.copy(t, destination_directory)
6061
shutil.copy(
61-
f"{repo}/{os.path.splitext(os.path.basename(t))[0]}.html",
62+
f"{repo}/{tname}.html",
6263
destination_directory,
6364
)
6465
if len(tutorials) > 1:
65-
print("More than 1 tutorial found; treating this as a book")
66+
print("More than 1 tutorial found; also copying index.html")
6667
shutil.copy(f"{repo}/index.html", destination_directory)
6768
# copy images (plots) in notebook for faster page loading
6869
try:
6970
shutil.copy(f"{repo}/_images/*.png", f"{destination_directory}/nboutput")
7071
except FileNotFoundError:
71-
pass
72+
print("No notebook cell output images found to copy")
7273

7374

7475
if __name__ == "__main__":

0 commit comments

Comments
 (0)