Skip to content

Commit c36342c

Browse files
authored
Merge branch 'main' into scipy2025-outline
2 parents 0aa461e + f923fc5 commit c36342c

20 files changed

+1199
-125
lines changed

.binder/environment.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- geoviews-core >=1.14.0,<2
2020
- gsw >=3.6.19,<4
2121
- hvplot >=0.11.3,<0.12
22-
- h5netcdf >=1.6.2,<2
22+
- h5netcdf >=1.6.3,<2
2323
- ipykernel >=6.29.5,<7
2424
- matplotlib-base >=3.10.3,<4
2525
- netcdf4 >=1.7.2,<2
@@ -35,8 +35,9 @@ dependencies:
3535
- sphinx-notfound-page >=1.1.0,<2
3636
- sphinxext-rediraffe >=0.2.7,<0.3
3737
- s3fs >=2025.5.1,<2026
38-
- xarray >=2025.6.1,<2026
39-
- zarr >=3.0.8,<4
38+
- xarray >=2025.7.0,<2026
39+
- zarr >=3.0.10,<4
4040
- 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.

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Xarray Tutorial
22

3-
[![CI](https://github.com/xarray-contrib/xarray-tutorial/workflows/CI/badge.svg?branch=main)](https://github.com/xarray-contrib/xarray-tutorial/actions?query=branch%3Amain)
3+
[![Deploy Website to GitHub Pages](https://github.com/xarray-contrib/xarray-tutorial/actions/workflows/main.yaml/badge.svg)](https://github.com/xarray-contrib/xarray-tutorial/actions/workflows/main.yaml)
44
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://tutorial.xarray.dev)
5-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/xarray-contrib/xarray-tutorial/HEAD?labpath=workshops/scipy2024/index.ipynb)
5+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/xarray-contrib/xarray-tutorial/HEAD?labpath=overview/xarray-in-45-min.ipynb)
66

77
This is the repository for a Jupyter Book website with tutorial material for [Xarray](https://github.com/pydata/xarray), _an open source project and Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun!_
88

@@ -24,12 +24,14 @@ This tutorial is available to run within [Github Codespaces](https://github.com/
2424

2525
GitHub currently gives every user [120 vCPU hours per month for free](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts), beyond that you must pay. **So be sure to explicitly stop or shut down your codespace when you are done by going to this page (https://github.com/codespaces).**
2626

27-
Once your codespace is launched, the following happens:
27+
You can also use the GitHub CLI to launch a codespace
2828

29-
- [Visual Studio Code](https://code.visualstudio.com/) Interface will open up within your browser.
30-
- A built in terminal will open and it will execute `jupyter lab` automatically.
31-
- Once you see a url to click within the terminal, simply `cmd + click` the given url.
32-
- This will open up another tab in your browser, leading to a [Jupyter Lab](https://jupyterlab.readthedocs.io/en/latest/) Interface.
29+
```
30+
# This will output a URL to use VSCode in the browser
31+
gh codespace create --repo xarray-contrib/xarray-tutorial
32+
# Optionally launch JupyterLab instead of vscode (after codespace has been created)
33+
gh codespace jupyter
34+
```
3335

3436
#### Locally
3537

_toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ parts:
4242
sections:
4343
- file: intermediate/indexing/advanced-indexing.ipynb
4444
- file: intermediate/indexing/boolean-masking-indexing.ipynb
45+
- file: intermediate/hierarchical_computation.ipynb
4546
- file: intermediate/xarray_and_dask
47+
- file: intermediate/intro-to-zarr.ipynb
4648
- file: intermediate/xarray_ecosystem
4749
- file: intermediate/hvplot
4850
- file: intermediate/remote_data/index

0 commit comments

Comments
 (0)