generated from ebmdatalab/notebook-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 3aa7f5c
Showing
22 changed files
with
1,558 additions
and
0 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,6 @@ | ||
# Don't allow windows checkouts to convert `\n` to `\r\n`, as this | ||
# breaks stuff that is meant to be run in linux-in-docker | ||
* text=auto eol=lf | ||
|
||
# Don't show notebook files when diffing in GitHub | ||
notebooks/**/*ipynb linguist-generated=true |
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,4 @@ | ||
name: 'Build this notebook' | ||
runs: | ||
using: 'docker' | ||
image: '../../../Dockerfile' |
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,54 @@ | ||
name: Build-runner | ||
on: | ||
push: | ||
paths: | ||
- "run.py" | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
name: Build windows executable for running notebook | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyinstaller | ||
- name: Build with pyinstaller | ||
run: | | ||
pyinstaller run.py --onefile | ||
- name: Commit files | ||
run: | | ||
copy dist\run.exe run.exe | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add run.exe | ||
git commit -m "Updated windows build of run.py" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} | ||
test_job: | ||
# This is a copy of the yaml in `test_runner.yaml`, so that when | ||
# there's a build, the tests are guaranteed to run *after* the | ||
# build. Otherwise the build status would potentially overwrite | ||
# the test status, making red PRs no longer red. | ||
# | ||
# There is currently no `include`-like functionality in Github | ||
# Actions, though this is apparently going to change: | ||
# https://github.com/actions/starter-workflows/issues/245 | ||
runs-on: ubuntu-latest | ||
name: Test notebooks are runnable and up-to-date | ||
needs: build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Test | ||
uses: ./.github/actions/build | ||
with: | ||
args: ./run_tests.sh |
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,20 @@ | ||
name: Notebook checks | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- "run.py" | ||
|
||
jobs: | ||
test_job: | ||
# If you change this job, please also change it in | ||
# build_runner.yaml (and see comments there for explanation) | ||
runs-on: ubuntu-latest | ||
name: Test notebooks are runnable and up-to-date | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Test | ||
uses: ./.github/actions/build | ||
with: | ||
args: ./run_tests.sh |
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,23 @@ | ||
# Credentials for accessing BigQuery | ||
bq-service-account.json | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# jupyter | ||
.ipynb_checkpoints | ||
.ipython/ | ||
.jupyter/ | ||
.local/ | ||
|
||
# sublime test/pycharm | ||
.idea/ | ||
.DS_Store | ||
|
||
# Emacs | ||
*~ |
Oops, something went wrong.