-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] New files for putting icepyx examples on pangeo-gallery #125
Changes from 51 commits
94acb79
74dd0e3
929594e
8026be1
58ed1ea
16f83e8
8da8239
f4aee1d
fcbe215
823cf34
aefbf6f
e948fa6
9a7eab6
b71d574
35444ec
96bab86
ca0b4fe
7cd1795
7bf566c
9f25d59
67619f8
9809159
709cbd0
62ce481
16466f8
98e68fa
9f5e8a4
82f4aec
f9d96d1
6f8103f
af07b77
c711011
9cf1a59
69d5a59
d490ab5
4b1f9d0
4f5cd54
cc81135
30b8489
69d7e21
13960f1
4fdb6fc
91ef1e9
f293554
076e776
9067503
fe57648
975ae6c
f4dc945
96a6fc3
5427476
b2d44f3
d5ef772
88404c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[run] | ||
branch = True | ||
source = icepyx | ||
omit = | ||
setup.py | ||
test/* | ||
doc/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Binderbot | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the master branch | ||
push: | ||
branches: | ||
- development | ||
- master | ||
paths: | ||
- 'examples/*.ipynb' | ||
- 'binder-gallery.yaml' | ||
- 'doc/source/_static/icepyx_logo.png' | ||
pull_request: | ||
branches: | ||
- development | ||
- master | ||
paths: | ||
- 'examples/*.ipynb' | ||
- 'binder-gallery.yaml' | ||
- 'doc/source/_static/icepyx_logo.png' | ||
|
||
jobs: | ||
build: | ||
name: Binderbot Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: parse config | ||
id: parse | ||
uses: CumulusDS/[email protected] | ||
with: | ||
file: binder-gallery.yaml | ||
gallery_repository: gallery_repository | ||
binder_url: binder_url | ||
binder_repo: binder_repo | ||
binder_ref: binder_ref | ||
binderbot_target_branch: binderbot_target_branch | ||
- name: Verify output | ||
run: | | ||
echo gallery_repository: "${{ steps.parse.outputs.gallery_repository }}" | ||
echo binder_url: "${{ steps.parse.outputs.binder_url }}" | ||
echo binder_repo: "${{ steps.parse.outputs.binder_repo }}" | ||
echo binder_ref: "${{ steps.parse.outputs.binder_ref }}" | ||
echo binderbot_target_branch: "${{ steps.parse.outputs.binderbot_target_branch }}" | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.8' | ||
architecture: 'x64' | ||
- name: Install Binderbot from github master | ||
run: pip install git+https://github.com/pangeo-gallery/binderbot.git | ||
- name: Create Clean Branch | ||
run: | | ||
git checkout --orphan ${{ steps.parse.outputs.binderbot_target_branch }} | ||
git rm --cached -r . | ||
- name: Build notebooks using Binderbot | ||
run: | | ||
python -m binderbot.cli \ | ||
--binder-url ${{ steps.parse.outputs.binder_url }} \ | ||
--repo ${{ steps.parse.outputs.binder_repo }} \ | ||
--ref ${{ steps.parse.outputs.binder_ref }} \ | ||
examples/*.ipynb | ||
- name: Commit files | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add binder-gallery.yaml doc/source/_static/icepyx_logo.png examples/*.ipynb | ||
git commit -m "Binderbot output" | ||
- name: Push commit | ||
if: github.ref == 'refs/heads/master' | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ steps.parse.outputs.binderbot_target_branch }} | ||
force: true | ||
- name: Trigger repository dispatch on Pangeo Gallery | ||
if: github.ref == 'refs/heads/master' | ||
run: curl -f https://pangeo-gallery-bot.herokuapp.com/gallery/submodule-dispatch/${{ github.repository }} | ||
Comment on lines
+64
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the
It should be fine having both Travis CI and Github Actions CI, a rewrite won't be needed. Travis will run the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aha! I think you are right @weiji14 . It should only run those last three on |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# use the flake8 linter to annotate improperly formatted code | ||
# from: https://github.com/marketplace/actions/run-flake8-on-your-pr-with-annotations | ||
name: Run flake8 linter on PRs | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- development | ||
- master | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Annotate PR after running flake8 | ||
uses: TrueBrain/actions-flake8@master | ||
with: | ||
max_line_length: 88 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Lint Yaml | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- binder-gallery.yaml | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- binder-gallery.yaml | ||
|
||
jobs: | ||
build: | ||
name: Lint Yaml | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: jacobtomlinson/gha-lint-yaml@master | ||
with: | ||
path: binder-gallery.yaml | ||
strict: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Jessica Scheick <[email protected]> | ||
Jessica Scheick <[email protected]> JessicaS11 <[email protected]> | ||
Jessica Scheick <[email protected]> Jessica <[email protected]> | ||
|
||
Zheng Liu <[email protected]> | ||
Zheng Liu <[email protected]> liuzheng-arctic <[email protected]> | ||
|
||
Raphael Hagen <[email protected]> raphael <[email protected]> | ||
Fernando Perez <[email protected]> | ||
Shashank Bhushan <[email protected]> | ||
Anthony Arendt <[email protected]> | ||
Scott Henderson <[email protected]> | ||
Wei Ji <[email protected]> | ||
Tom Johnson <[email protected]> | ||
Bruce Wallin <[email protected]> <[email protected]> | ||
Tyler Sutterley <[email protected]> | ||
Amy Steiker <[email protected]> asteiker <[email protected]> | ||
David Shean <[email protected]> | ||
Anna Valentine <[email protected]> | ||
Bidhyananda Yadav <[email protected]> | ||
Friedrich Knuth <[email protected]> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: stable | ||
hooks: | ||
- id: black |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,44 @@ | ||
language: python | ||
|
||
install: | ||
- pip install -r requirements.txt -r requirements-dev.txt | ||
- pip install -e . | ||
|
||
stages: | ||
- name: basic tests | ||
if: type = push | ||
if: type = push OR type = pull_request | ||
- name: behind Earthdata | ||
if: branch = master OR commit_message =~ nsidc_tests OR type = cron | ||
|
||
#ultimately move basic tests list into a separate script with the list of files to run (then this can be put into a matrix and paralellized as well) | ||
#ultimately move basic tests list into a separate script with the list of files to run (then this can be put into a matrix and parallellized as well) | ||
jobs: | ||
include: | ||
- stage: basic tests | ||
script: pytest icepyx/tests/test_APIformatting.py | ||
icepyx/tests/test_geospatial.py | ||
icepyx/tests/test_is2ref.py | ||
icepyx/tests/test_validate_inputs.py | ||
|
||
script: pytest icepyx/ --ignore icepyx/tests/behind_NSIDC_API_login.py | ||
after_success: codecov | ||
|
||
# - stage: behind Earthdata | ||
# script: | ||
# script: | ||
# - export NSIDC_LOGIN=$NSIDC_LOGIN | ||
# - pytest icepyx/tests/behind_NSIDC_API_login.py | ||
|
||
deploy: | ||
- provider: pypi | ||
server: https://test.pypi.org/legacy/ | ||
username: "__token__" | ||
password: $test_PyPI_API_Token | ||
on: | ||
branch: development | ||
if: commit_message =~ test_pypi | ||
skip_existing: true | ||
distributions: "sdist bdist_wheel" | ||
|
||
# NOTE: the API token on Travis must be set to ALL branches, because a tag build is not considered to be on the master branch: https://travis-ci.community/t/pypi-upload-with-api-token-not-working/5338/5 | ||
- provider: pypi | ||
username: "__token__" | ||
password: $PyPI_API_Token | ||
on: | ||
branch: master | ||
tags: true | ||
skip_existing: true | ||
distributions: "sdist bdist_wheel" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
name: icepyx examples gallery | ||
description: >- | ||
Examples using icepyx Python tools for obtaining and working with ICESat-2 data | ||
gallery_repository: pangeo-gallery/pangeo-gallery | ||
binder_url: "https://mybinder.org" | ||
binder_repo: icesat2py/icepyx | ||
binder_ref: master | ||
binderbot_target_branch: binderbot-built |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM uwhackweeks/icesat2:2020.06.15 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the most recent updates to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to set the
binder_ref
to just point to the branch it is building on? E.g.development
in this case.Might be good to share a link to the pangeo-gallery documentation somewhere, so that others will know how this can be configured in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I can change that for a test to see if it builds correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it will help, but you can try to run Github Actions locally using https://github.com/nektos/act. Might be easier than just trial and error pushes to this Pull Request.