-
Notifications
You must be signed in to change notification settings - Fork 6
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
65aff82
commit 5b65bb1
Showing
1 changed file
with
4 additions
and
2 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/usr/bin/env -S bash -eu -o pipefail | ||
# next line loads AA_TOKEN from .env file when running bash script locally. In CI this is not necessary since AA_TOKEN is environment variable. | ||
[ -f .env ] && source .env | ||
AA_TOKEN="$AA_TOKEN" jupyter nbconvert --to notebook --execute src/examples/*.ipynb | ||
rm src/examples/*.nbconvert.ipynb | ||
# Find all .ipynb files in the directory and pass them to xargs for parallel execution | ||
rm --force --recursive src/examples/*.nbconvert.ipynb src/examples/.ipynb_checkpoints | ||
find src/examples/ -name "*.ipynb" | xargs -I {} --max-procs 1 bash -c "AA_TOKEN=\"$AA_TOKEN\" poetry run jupyter nbconvert --to notebook --execute {}" | ||
rm --force src/examples/*.nbconvert.ipynb |