-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use Jupyter Book and deploy book to webpage - Remove output from notebooks * Add dev-requirements.txt * Add pre-commit hooks for black, pyupgrade, and nbdq * Update tests of notebooks and update to papermill v2.X API
- Loading branch information
1 parent
9399bca
commit a87c217
Showing
27 changed files
with
2,744 additions
and
2,625 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
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,40 @@ | ||
name: Deploy Jupyter Book | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
deploy-book: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --no-cache-dir -r binder/requirements.txt | ||
python -m pip install --no-cache-dir -r book/requirements.txt | ||
- name: Build the book | ||
run: | | ||
python -c "import matplotlib.pyplot as plt; plt" # Generate fonts | ||
jupyter-book build book/ | ||
- name: Deploy Jupyter book to GitHub pages | ||
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: book/_build/html | ||
force_orphan: true | ||
user_name: 'github-actions[bot]' | ||
user_email: 'github-actions[bot]@users.noreply.github.com' | ||
commit_message: Deploy to GitHub pages |
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,15 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.7.3 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: 0.4.0 | ||
hooks: | ||
- id: nbqa-black | ||
- id: nbqa-pyupgrade |
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
all: build | ||
|
||
defualt: build | ||
|
||
build: | ||
jupyter-book build book/ | ||
|
||
clean: book/_build | ||
rm -rf book/_build |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.