-
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
Showing
12 changed files
with
153 additions
and
18 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,61 @@ | ||
name: Generate sphinx-gallery scripts from notebooks | ||
|
||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: main | ||
# paths: | ||
# - 'examples/**' | ||
# schedule: | ||
# - cron: '54 13 * * *' | ||
|
||
|
||
jobs: | ||
generate_scripts: | ||
name: Generate scripts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install pandoc | ||
pip install pypandoc | ||
- name: Add/Update badges | ||
uses: trsvchn/colab-badge-action@v4 | ||
with: | ||
verbose: true | ||
|
||
- name: Run _ipynb_to_gallery.py | ||
run: | | ||
python tools/sphinx_gallery/ipynb_to_gallery.py all | ||
- name: Set git config | ||
continue-on-error: true | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Commit changes to notebooks | ||
continue-on-error: true | ||
run: | | ||
git add examples/* | ||
git commit -m "chore: added badges to colab in examples/" | ||
- name: Commit changes to scripts | ||
continue-on-error: true | ||
run: | | ||
git add tools/sphinx_gallery/scripts/* | ||
git commit -m "chore: update scripts/" | ||
- name: Push back to repo | ||
run: | | ||
git status | ||
git push |
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,43 @@ | ||
name: Check all Python examples work | ||
|
||
on: | ||
workflow_dispatch: | ||
# pull_request: | ||
# types: | ||
# - ready_for_review | ||
# paths: | ||
# - 'examples/**' | ||
# push: | ||
# branches: main | ||
# paths: | ||
# - 'examples/**' | ||
|
||
jobs: | ||
test: | ||
name: Test running all example scripts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Set up Python env | ||
run: | | ||
python -m pip install matplotlib | ||
- name: Install CoFI | ||
run: | | ||
python -m pip install cofi | ||
- name: Run script | ||
run: | | ||
python tools/validation/test_all_notebooks_scripts.py | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: ./debug.log |
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
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
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
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
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
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
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
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
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
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