Skip to content

Commit be7831e

Browse files
authored
Merge branch 'xarray-contrib:main' into main
2 parents c543604 + 0d7ce69 commit be7831e

37 files changed

+2327
-858
lines changed

.binder/environment.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,41 @@ channels:
33
- conda-forge
44
- nodefaults
55
dependencies:
6-
- jupyter-book >=1.0.3,<2
7-
- pre-commit >=4.1.0,<5
6+
- jupyter-book >=1.0.4.post1,<2
7+
- pre-commit >=4.2.0,<5
88
- dask-labextension >=7.0.0,<8
9-
- jupyterlab >=4.3.5,<5
9+
- jupyterlab >=4.4.4,<5
1010
- jupyter_bokeh >=4.0.5,<5
1111
- jupyterlab-myst >=2.4.2,<3
1212
- jupyter-resource-usage >=1.1.1,<2
1313
- cartopy >=0.24.0,<0.25
14-
- cf_xarray >=0.10.0,<0.11
15-
- dask >=2025.2.0,<2026
16-
- datashader >=0.17.0,<0.18
17-
- distributed >=2025.2.0,<2026
18-
- gcsfs >=2025.2.0,<2026
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
1919
- geoviews-core >=1.14.0,<2
2020
- gsw >=3.6.19,<4
21-
- hvplot >=0.11.2,<0.12
22-
- h5netcdf >=1.5.0,<2
21+
- hvplot >=0.11.3,<0.12
22+
- h5netcdf >=1.6.3,<2
2323
- ipykernel >=6.29.5,<7
24-
- matplotlib-base >=3.10.0,<4
24+
- matplotlib-base >=3.10.3,<4
2525
- netcdf4 >=1.7.2,<2
26-
- numpy >=2.1.3,<3
27-
- pint-xarray >=0.4,<0.5
28-
- pydap >=3.5.3,<4
29-
- python-graphviz >=0.20.3,<0.21
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
3030
- pooch >=1.8.2,<2
31-
- rioxarray >=0.18.2,<0.19
32-
- scipy >=1.15.2,<2
33-
- sphinx-codeautolink >=0.17.0,<0.18
31+
- rioxarray >=0.19.0,<0.20
32+
- scipy >=1.16.0,<2
33+
- sphinx-codeautolink >=0.17.4,<0.18
3434
- sphinxcontrib-mermaid >=1.0.0,<2
35-
- sphinx-notfound-page >=1.0.4,<2
35+
- sphinx-notfound-page >=1.1.0,<2
3636
- sphinxext-rediraffe >=0.2.7,<0.3
37-
- s3fs >=2025.2.0,<2026
38-
- xarray >=2025.1.2,<2026
39-
- zarr >=3.0.3,<4
40-
- flox >=0.10.0,<0.11
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
4141
- numbagg >=0.9.0,<0.10
42+
- rich >=14.0.0,<15
4243
- python >=3.10

.devcontainer/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

.devcontainer/devcontainer.json

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,42 @@
1+
// https://pixi.sh/latest/integration/editor/vscode/#devcontainer-extension
12
{
2-
"image": "quay.io/pangeo/pangeo-notebook:latest",
3-
"postCreateCommand": {
4-
"vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json"
5-
},
6-
"hostRequirements": {
7-
"cpus": 2
3+
"name": "xarray-tutorial",
4+
"build": {
5+
"dockerfile": "Dockerfile",
6+
"context": ".."
87
},
98
"customizations": {
10-
"codespaces": {
11-
"openFiles": ["README.md"]
12-
},
139
"vscode": {
14-
"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
1527
}
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"
1641
}
1742
}

.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+
}

.devcontainer/tasks.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/actions/setup-pixi/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Setup Pixi"
2+
description: "Create Python environment for GitHub Action Job"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: prefix-dev/[email protected]
8+
with:
9+
manifest-path: pyproject.toml
10+
cache: true
11+
activate-environment: true

.github/workflows/main.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@ jobs:
3030
with:
3131
path: _build
3232
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache
33-
key: jupyterbook-20250221
33+
key: jupyterbook-20250701
3434

35-
- uses: prefix-dev/[email protected]
36-
with:
37-
manifest-path: pyproject.toml
38-
cache: true
39-
activate-environment: true
35+
- uses: ./.github/actions/setup-pixi
4036

4137
- name: Build JupyterBook
4238
run: |

.github/workflows/nocache.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ jobs:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
2323

24-
- uses: prefix-dev/[email protected]
25-
with:
26-
manifest-path: pyproject.toml
27-
cache: true
28-
activate-environment: true
24+
- uses: ./.github/actions/setup-pixi
2925

3026
# https://github.com/xarray-contrib/xarray-tutorial/issues/311
3127
- name: Configure graphviz

.github/workflows/pull_request.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ jobs:
2424
with:
2525
path: _build
2626
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache
27-
key: jupyterbook-20250221
27+
key: jupyterbook-20250701
2828

29-
- uses: prefix-dev/[email protected]
30-
with:
31-
manifest-path: pyproject.toml
32-
cache: true
33-
activate-environment: true
29+
- uses: ./.github/actions/setup-pixi
3430

3531
- name: Build JupyterBook
3632
if: github.event.action != 'closed'

0 commit comments

Comments
 (0)