-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into apply-ufunc-reorg
- Loading branch information
Showing
16 changed files
with
2,515 additions
and
3,237 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 @@ | ||
FROM pangeo/base-image:2023.06.20 |
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,21 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "../Dockerfile", | ||
"context": "../../conda" | ||
}, | ||
"postCreateCommand": { | ||
"jupyterlab": "mkdir /home/jovyan/.jupyter && cp ${containerWorkspaceFolder}/.devcontainer/scipy2023/jupyter_lab_config.py /home/jovyan/.jupyter/jupyter_lab_config.py", | ||
"vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/scipy2023/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json" | ||
}, | ||
"hostRequirements": { | ||
"cpus": 2 | ||
}, | ||
"customizations": { | ||
"codespaces": { | ||
"openFiles": ["workshops/scipy2023/README.md"] | ||
}, | ||
"vscode": { | ||
"extensions": ["ms-toolsai.jupyter", "ms-python.python"] | ||
} | ||
} | ||
} |
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 @@ | ||
# Configuration file for lab. | ||
|
||
c = get_config() # noqa | ||
|
||
## The default URL to redirect to from `/` | ||
# Default: '/lab' | ||
c.LabApp.default_url = '/lab/tree/workshops/scipy2023/index.ipynb' | ||
|
||
## Set the Access-Control-Allow-Origin header | ||
# | ||
# Use '*' to allow any origin to access your server. | ||
# | ||
# Takes precedence over allow_origin_pat. | ||
# Default: '' | ||
c.ServerApp.allow_origin = '*' |
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,16 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "jupyterlab", | ||
"type": "shell", | ||
"command": "/srv/conda/envs/notebook/bin/jupyter lab --no-browser", | ||
"presentation": { | ||
"reveal": "always" | ||
}, | ||
"runOptions": { | ||
"runOn": "folderOpen" | ||
} | ||
} | ||
] | ||
} |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'docker' | ||
directory: '/.devcontainer' | ||
schedule: | ||
interval: 'daily' |
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,60 @@ | ||
name: PR Preview | ||
|
||
on: [pull_request] | ||
|
||
permissions: | ||
pull-requests: write # allow surge-preview to create/update PR comments | ||
|
||
jobs: | ||
preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup JupyterBook Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache | ||
key: jupyterbook-20230613 | ||
|
||
- name: Install Conda environment with Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: conda/conda-lock.yml | ||
environment-name: xarray-tutorial | ||
cache-environment: true | ||
|
||
- name: Build JupyterBook | ||
# NOTE: login shell activates conda environment | ||
shell: bash -l {0} | ||
run: | | ||
jupyter-book build ./ --warningiserror --keep-going | ||
- name: Dump Build Logs | ||
if: always() | ||
run: | | ||
if (test -a _build/html/reports/*log); then cat _build/html/reports/*log ; fi | ||
- name: Publish to Surge | ||
id: preview_step | ||
uses: afc163/surge-preview@v1 | ||
with: | ||
surge_token: ${{ secrets.SURGE_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
dist: _build/html | ||
build: | | ||
npm install surge | ||
- name: Format preview url | ||
id: format_url | ||
run: | | ||
echo "url_text=:rocket: Preview deployed at https://${{ steps.preview_step.outputs.preview_url }}" >> $GITHUB_OUTPUT | ||
- name: Get the preview_url | ||
run: echo "${{ steps.format_url.outputs.url_text }}" | ||
|
||
- name: Generate summary | ||
run: | | ||
echo "#### ${{ steps.format_url.outputs.url_text }}" >> $GITHUB_STEP_SUMMARY |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
git | ||
vim |
Oops, something went wrong.