Skip to content

Commit

Permalink
80 refresh demo nb using actions (#91)
Browse files Browse the repository at this point in the history
* Create nb_refresh.yml
Initial commit. Workflow updates demo notebooks

* Update nb_refresh.yml
Update when to run
Drop on push to this branch
committer not author

* Update documentation_test.yml

Remove old branches

* Update Notebook

* Update nb_refresh.yml

Committer didn't seem to show named bot as commit author, though email listed github-actions[bot]. Docs says to use author name and email (trying w/ default bot name and email this time).

* Update Notebook

---------

Co-authored-by: jbousquin <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 18, 2024
1 parent 52ef7f3 commit dfbd3cb
Show file tree
Hide file tree
Showing 8 changed files with 8,437 additions and 6,411 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
[main]
push:
branches:
[main, dev, pyOpenSci-review]
[main, dev]

# Allows you to run this workflow manually from the Actions tab
#workflow_dispatch:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/nb_refresh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Notebook

on:
pull_request:
branches:
[main]

jobs:
notebook_update:

runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Update pip and install depends
run: |
python -VV
python -m pip install --upgrade pip
python -m pip install --no-deps .
pip install -r requirements.txt
pip install jupyter nbconvert nbformat
- name: Update analysis notebook
run: |
jupyter nbconvert --to notebook --execute demos/Harmonize_CapeCod_Detailed.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_CapeCod_Detailed
jupyter nbconvert --to notebook --execute demos/Harmonize_CapeCod_Simple.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_CapeCod_Simple
jupyter nbconvert --to notebook --execute demos/Harmonize_Pensacola_Detailed.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Pensacola_Detailed
jupyter nbconvert --to notebook --execute demos/Harmonize_Pensacola_Simple.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Pensacola_Simple
jupyter nbconvert --to notebook --execute demos/Harmonize_Tampa_Detailed.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Tampa_Detailed
jupyter nbconvert --to notebook --execute demos/Harmonize_Tampa_Simple.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Tampa_Simple
- name: commit updated notebook
uses: EndBug/add-and-commit@v7
with:
author_name: 'github-actions[bot]'
author_email: 'github-actions[bot]@users.noreply.github.com'
message: "Update Notebook"
add: '["demos/Harmonize_CapeCod_Detailed.ipynb", "demos/Harmonize_CapeCod_Simple.ipynb", "demos/Harmonize_Pensacola_Detailed.ipynb", "demos/Harmonize_Pensacola_Simple.ipynb", "demos/Harmonize_Tampa_Detailed.ipynb","demos/Harmonize_Tampa_Simple.ipynb"]'
3,784 changes: 2,174 additions & 1,610 deletions demos/Harmonize_CapeCod_Detailed.ipynb

Large diffs are not rendered by default.

949 changes: 586 additions & 363 deletions demos/Harmonize_CapeCod_Simple.ipynb

Large diffs are not rendered by default.

4,370 changes: 2,442 additions & 1,928 deletions demos/Harmonize_Pensacola_Detailed.ipynb

Large diffs are not rendered by default.

1,055 changes: 553 additions & 502 deletions demos/Harmonize_Pensacola_Simple.ipynb

Large diffs are not rendered by default.

4,016 changes: 2,256 additions & 1,760 deletions demos/Harmonize_Tampa_Detailed.ipynb

Large diffs are not rendered by default.

631 changes: 384 additions & 247 deletions demos/Harmonize_Tampa_Simple.ipynb

Large diffs are not rendered by default.

0 comments on commit dfbd3cb

Please sign in to comment.