-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from nsidc/measures
Notebook to access, download and plot GeoTIFFs using MEaSUREs data sets as examples
- Loading branch information
Showing
30 changed files
with
2,573 additions
and
600 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
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 |
---|---|---|
@@ -1,72 +1,84 @@ | ||
name: Test Notebooks | ||
|
||
on: | ||
push: | ||
pull_request: | ||
paths: | ||
- notebooks/** | ||
- binder/** | ||
- '.github/workflows/' | ||
types: [opened, synchronize] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
posix: | ||
name: Runtime (${{ matrix.os }}, Mambaforge) | ||
linux: | ||
name: Linux tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Install Conda environment with Micromamba" | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
cache-env: true | ||
environment-file: binder/conda-linux-64.lock | ||
environment-name: nsidc-tutorials | ||
|
||
- name: "Verify micromamba" | ||
shell: bash -l {0} | ||
run: | | ||
micromamba info | ||
jupyter kernelspec list | ||
which python | ||
conda list | sort | ||
- name: "Verify that libraries used in notebooks are present in the environment" | ||
shell: bash -l {0} | ||
run: | | ||
find notebooks -type f -iname \*.ipynb -not -path '*\.ipynb_checkpoints/*' -not -path '*/iceflow/*' | xargs -I % python .github/workflows/scan_notebooks.py -n % | ||
- name: "Setup Quarto" | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
with: | ||
# version: 1.1.251 | ||
version: 1.3.361 | ||
|
||
- name: "Execute notebooks with Quarto" | ||
env: | ||
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }} | ||
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }} | ||
shell: bash -l {0} | ||
run: | | ||
find notebooks -type f -name "*.ipynb" -not -path '*\.ipynb_checkpoints/*' -not -path '*endered*' -not -path '*SnowEx*' | xargs -I F quarto render "F" --execute-daemon-restart | ||
win-osx: | ||
name: Runtime (${{ matrix.os }}, micromamba) | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu", "macos"] | ||
os: ["windows", "macos"] | ||
include: | ||
- os: ubuntu | ||
environment-file: binder/conda-linux-64.lock | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
- os: windows | ||
environment-file: binder/conda-win-64.lock | ||
- os: macos | ||
environment-file: binder/conda-osx-64.lock | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
- uses: actions/checkout@v3 | ||
- name: "Install Conda environment with Micromamba" | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
cache-env: true | ||
environment-file: ${{ matrix.environment-file }} | ||
miniforge-variant: ${{ matrix.miniforge-variant }} | ||
miniforge-version: ${{ matrix.miniforge-version }} | ||
use-mamba: true | ||
environment-name: nsidc-tutorials | ||
|
||
- name: Bash | ||
- name: "Verify micromamba" | ||
shell: bash -l {0} | ||
run: | | ||
conda info | ||
conda list | ||
micromamba info | ||
jupyter kernelspec list | ||
printenv | sort | ||
find notebooks -type f -iname \*.ipynb -not -path '*\.ipynb_checkpoints/*' -not -path "*/iceflow/*" | xargs -I % python .github/workflows/scan_notebooks.py -n % | ||
# windows: | ||
# name: Runtime Windows Mambaforge | ||
# runs-on: windows-latest | ||
# strategy: | ||
# fail-fast: false | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: conda-incubator/setup-miniconda@v2 | ||
# with: | ||
# environment-file: binder/conda-win-64.lock | ||
# miniforge-variant: Mambaforge | ||
# miniforge-version: latest | ||
# use-mamba: true | ||
|
||
# - name: PowerShell | ||
# shell: powershell | ||
# run: | | ||
# conda info | ||
# conda list | ||
|
||
# - name: PowerShell Core | ||
# shell: pwsh | ||
# run: | | ||
# conda info | ||
# conda list | ||
|
||
# - name: Cmd.exe | ||
# shell: cmd /C CALL {0} | ||
# run: >- | ||
# conda info && conda list |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
MANIFEST | ||
notebook/Outputs | ||
build | ||
bin | ||
dist | ||
_build | ||
docs/man/*.gz | ||
|
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
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 @@ | ||
FROM pangeo/base-image:2023.01.13 | ||
|
||
|
||
USER $NB_UID | ||
|
||
ENTRYPOINT ["jupyter", "lab","--ip=0.0.0.0","--allow-root"] |
Oops, something went wrong.