Skip to content

Commit f8abdde

Browse files
committed
merge: main
2 parents 775d883 + be7831e commit f8abdde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+14773
-27791
lines changed

.binder/environment.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.binder/environment.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: default
2+
channels:
3+
- conda-forge
4+
- nodefaults
5+
dependencies:
6+
- jupyter-book >=1.0.4.post1,<2
7+
- pre-commit >=4.2.0,<5
8+
- dask-labextension >=7.0.0,<8
9+
- jupyterlab >=4.4.4,<5
10+
- jupyter_bokeh >=4.0.5,<5
11+
- jupyterlab-myst >=2.4.2,<3
12+
- jupyter-resource-usage >=1.1.1,<2
13+
- cartopy >=0.24.0,<0.25
14+
- cf_xarray >=0.10.6,<0.11
15+
- dask >=2025.5.1,<2026
16+
- datashader >=0.18.1,<0.19
17+
- distributed >=2025.5.1,<2026
18+
- gcsfs >=2025.5.1,<2026
19+
- geoviews-core >=1.14.0,<2
20+
- gsw >=3.6.19,<4
21+
- hvplot >=0.11.3,<0.12
22+
- h5netcdf >=1.6.3,<2
23+
- ipykernel >=6.29.5,<7
24+
- matplotlib-base >=3.10.3,<4
25+
- netcdf4 >=1.7.2,<2
26+
- numpy >=2.2.6,<3
27+
- pint-xarray >=0.5.0,<0.6
28+
- pydap >=3.5.5,<4
29+
- python-graphviz >=0.21,<0.22
30+
- pooch >=1.8.2,<2
31+
- rioxarray >=0.19.0,<0.20
32+
- scipy >=1.16.0,<2
33+
- sphinx-codeautolink >=0.17.4,<0.18
34+
- sphinxcontrib-mermaid >=1.0.0,<2
35+
- sphinx-notfound-page >=1.1.0,<2
36+
- sphinxext-rediraffe >=0.2.7,<0.3
37+
- s3fs >=2025.5.1,<2026
38+
- xarray >=2025.7.0,<2026
39+
- zarr >=3.0.10,<4
40+
- flox >=0.10.4,<0.11
41+
- numbagg >=0.9.0,<0.10
42+
- rich >=14.0.0,<15
43+
- python >=3.10

.devcontainer/Dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
FROM pangeo/base-image:2025.01.24
1+
FROM mcr.microsoft.com/devcontainers/base:noble
2+
3+
ARG PIXI_VERSION=v0.49.0
4+
5+
RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
6+
&& chmod +x /usr/local/bin/pixi \
7+
&& pixi info
8+
9+
# set some user and workdir settings to work nicely with vscode
10+
USER vscode
11+
WORKDIR /home/vscode
12+
13+
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc

.devcontainer/devcontainer.json

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,42 @@
1+
// https://pixi.sh/latest/integration/editor/vscode/#devcontainer-extension
12
{
3+
"name": "xarray-tutorial",
24
"build": {
3-
"dockerfile": "./Dockerfile",
4-
"context": "../conda"
5-
},
6-
"postCreateCommand": {
7-
"vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json"
8-
},
9-
"hostRequirements": {
10-
"cpus": 2
5+
"dockerfile": "Dockerfile",
6+
"context": ".."
117
},
128
"customizations": {
13-
"codespaces": {
14-
"openFiles": ["README.md"]
15-
},
169
"vscode": {
17-
"extensions": ["ms-toolsai.jupyter", "ms-python.python"]
10+
"settings": {},
11+
"extensions": [
12+
"ms-toolsai.jupyter",
13+
"ms-python.python",
14+
"executablebookproject.myst-highlight"
15+
]
16+
}
17+
},
18+
"features": {
19+
// ensure GitHub Codespace 'Open with JupyterLab' works
20+
// TODO: figure out why it doesn't work w/ jupyterlab in the pixi environment
21+
"ghcr.io/devcontainers/features/python:1": {
22+
"version": "3.12",
23+
"installTools": false,
24+
// NOTE: not working, so install with pip in postCreateCommand
25+
// "toolsToInstall":"jupyterlab_myst,pixi-kernel",
26+
"installJupyterlab": true
1827
}
28+
},
29+
"mounts": [
30+
"source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"
31+
],
32+
// These should execute in order below
33+
"onCreateCommand": {
34+
"configure_jupyterlab": "pip install jupyterlab_myst pixi-kernel"
35+
},
36+
"postCreateCommand": {
37+
"set_pixi_permissions": "sudo chown vscode .pixi"
38+
},
39+
"postStartCommand": {
40+
"configure_jupyterlab": "pixi install"
1941
}
2042
}

.devcontainer/scipy2023/devcontainer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
2-
"build": {
3-
"dockerfile": "../Dockerfile",
4-
"context": "../../conda"
5-
},
2+
"image": "quay.io/pangeo/pangeo-notebook:2023.07.05",
63
"postCreateCommand": {
74
"jupyterlab": "mkdir /home/jovyan/.jupyter && cp ${containerWorkspaceFolder}/.devcontainer/scipy2023/jupyter_lab_config.py /home/jovyan/.jupyter/jupyter_lab_config.py",
85
"vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/scipy2023/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json"
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
# Configuration file for lab.
2-
31
c = get_config() # noqa
4-
5-
## The default URL to redirect to from `/`
6-
# Default: '/lab'
72
c.LabApp.default_url = '/lab/tree/workshops/scipy2023/index.ipynb'
8-
9-
## Set the Access-Control-Allow-Origin header
10-
#
11-
# Use '*' to allow any origin to access your server.
12-
#
13-
# Takes precedence over allow_origin_pat.
14-
# Default: ''
153
c.ServerApp.allow_origin = '*'

.devcontainer/scipy2024/devcontainer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
2-
"build": {
3-
"dockerfile": "../Dockerfile",
4-
"context": "../../conda"
5-
},
2+
"image": "quay.io/pangeo/pangeo-notebook:2024.07.08",
63
"postCreateCommand": {
74
"jupyterlab": "mkdir /home/jovyan/.jupyter && cp ${containerWorkspaceFolder}/.devcontainer/scipy2024/jupyter_lab_config.py /home/jovyan/.jupyter/jupyter_lab_config.py",
85
"vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/scipy2024/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json"
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
# Configuration file for lab.
2-
31
c = get_config() # noqa
4-
5-
## The default URL to redirect to from `/`
6-
# Default: '/lab'
72
c.LabApp.default_url = '/lab/tree/workshops/scipy2024/index.ipynb'
8-
9-
## Set the Access-Control-Allow-Origin header
10-
#
11-
# Use '*' to allow any origin to access your server.
12-
#
13-
# Takes precedence over allow_origin_pat.
14-
# Default: ''
153
c.ServerApp.allow_origin = '*'

.devcontainer/scipy2025/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM mcr.microsoft.com/devcontainers/base:noble
2+
3+
ARG PIXI_VERSION=v0.49.0
4+
5+
RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
6+
&& chmod +x /usr/local/bin/pixi \
7+
&& pixi info
8+
9+
# set some user and workdir settings to work nicely with vscode
10+
USER vscode
11+
WORKDIR /home/vscode
12+
13+
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// https://pixi.sh/latest/integration/editor/vscode/#devcontainer-extension
2+
{
3+
"name": "scipy2025-xarray-tutorial",
4+
"build": {
5+
"dockerfile": "Dockerfile",
6+
"context": "../../"
7+
},
8+
"customizations": {
9+
"vscode": {
10+
"settings": {},
11+
"extensions": [
12+
"ms-toolsai.jupyter",
13+
"ms-python.python",
14+
"executablebookproject.myst-highlight"
15+
]
16+
}
17+
},
18+
"features": {
19+
// ensure GitHub Codespace 'Open with JupyterLab' works
20+
// TODO: figure out why it doesn't work w/ jupyterlab in the pixi environment
21+
"ghcr.io/devcontainers/features/python:1": {
22+
"version": "3.12",
23+
"installTools": false,
24+
// NOTE: not working, so install with pip in postCreateCommand
25+
// "toolsToInstall":"jupyterlab_myst,pixi-kernel",
26+
"installJupyterlab": true
27+
}
28+
},
29+
"mounts": [
30+
"source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"
31+
],
32+
// These should execute in order below
33+
"onCreateCommand": {
34+
"configure_jupyterlab": "pip install jupyterlab_myst pixi-kernel"
35+
},
36+
"postCreateCommand": {
37+
"set_pixi_permissions": "sudo chown vscode .pixi"
38+
},
39+
"postStartCommand": {
40+
"configure_jupyterlab": "pixi install"
41+
}
42+
}

0 commit comments

Comments
 (0)