-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c77056
commit 71eb842
Showing
2 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""_summary_.""" | ||
|
||
import pathlib | ||
import subprocess | ||
import sys | ||
|
||
|
||
def main() -> None: | ||
"""_summary_.""" | ||
if len(sys.argv) > 1 and "html" in sys.argv[1:]: | ||
print("Generating HTML for the example notebooks") | ||
subprocess.run( # noqa: S603 | ||
[ # noqa: S607 | ||
"jupyter", | ||
"nbconvert", | ||
"--to", | ||
"html", | ||
"--embed-images", | ||
"examples/**/*.ipynb", | ||
], | ||
check=False, | ||
) | ||
else: | ||
notebooks = [str(p) for p in pathlib.Path().glob("examples/**/*.ipynb")] | ||
subprocess.run( # noqa: S603 | ||
[ # noqa: S607 | ||
"jupyter", | ||
"execute", | ||
"--inplace", | ||
*notebooks, | ||
], | ||
check=False, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters