From ec7ed599cc52c95dc0c9429d48062b1cc674e077 Mon Sep 17 00:00:00 2001 From: Amy Defnet Date: Mon, 27 Apr 2026 16:37:36 -0400 Subject: [PATCH 1/6] initial commit add codespaces --- .devcontainer/Dockerfile | 16 ++++++++++++++++ .devcontainer/devcontainer.json | 20 ++++++++++++++++++++ requirements.txt | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..4fe50b8 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +# Use official Python dev container image +FROM mcr.microsoft.com/devcontainers/python:3.11 + +# Set working directory +WORKDIR /workspaces/${REPO_NAME} + +# Copy requirements +COPY requirements.txt /tmp/requirements.txt + +# Install Python dependencies +RUN pip install --upgrade pip \ + && pip install -r /tmp/requirements.txt \ + && pip install jupyter ipykernel + +# Ensure the kernel is registered +RUN python -m ipykernel install --user --name python --display-name "short_course" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..0581252 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,20 @@ +{ + "name": "Python Jupyter Codespace", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/git:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter" + ] + } + }, + "postCreateCommand": "python -m ipykernel install --user --name python --display-name 'short_course'", + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e566831..48c968a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ subsettools>=2.0.1 -hf_hydrodata>=1.3.0 +hf_hydrodata>=1.4.3 matplotlib>=3.7.2 bokeh>=3.3.0 From 30edb3cbf209763a3b0c8e3e09fd6f3b01a94ed4 Mon Sep 17 00:00:00 2001 From: Amy Defnet Date: Mon, 27 Apr 2026 16:52:24 -0400 Subject: [PATCH 2/6] update working directory --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4fe50b8..b44ee79 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/devcontainers/python:3.11 # Set working directory -WORKDIR /workspaces/${REPO_NAME} +WORKDIR /workspaces # Copy requirements COPY requirements.txt /tmp/requirements.txt From 17d7599319a190de686e9b96da1aa74df400f6e3 Mon Sep 17 00:00:00 2001 From: Amy Defnet Date: Mon, 27 Apr 2026 17:00:52 -0400 Subject: [PATCH 3/6] remove unnecessary feature to fix build location --- .devcontainer/devcontainer.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0581252..a3c04ce 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,9 +3,6 @@ "build": { "dockerfile": "Dockerfile" }, - "features": { - "ghcr.io/devcontainers/features/git:1": {} - }, "customizations": { "vscode": { "extensions": [ From 56f9f1a37854933327ab832b6a0764225ddda05c Mon Sep 17 00:00:00 2001 From: Amy Defnet Date: Mon, 27 Apr 2026 17:03:46 -0400 Subject: [PATCH 4/6] explicitly set build locaiton to root --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a3c04ce..cbf39d1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,8 @@ { "name": "Python Jupyter Codespace", "build": { - "dockerfile": "Dockerfile" + "dockerfile": "Dockerfile", + "context": ".." }, "customizations": { "vscode": { From cf7186e0302bdd50c9b27bacce19696ae7cc287e Mon Sep 17 00:00:00 2001 From: Amy Defnet Date: Mon, 27 Apr 2026 17:13:23 -0400 Subject: [PATCH 5/6] update kernel name --- .devcontainer/Dockerfile | 3 ++- .devcontainer/devcontainer.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b44ee79..c124d70 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -13,4 +13,5 @@ RUN pip install --upgrade pip \ && pip install jupyter ipykernel # Ensure the kernel is registered -RUN python -m ipykernel install --user --name python --display-name "short_course" +RUN python -m ipykernel install --user --name short_course --display-name "Python (short_course)" + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cbf39d1..e705d79 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,6 +13,6 @@ ] } }, - "postCreateCommand": "python -m ipykernel install --user --name python --display-name 'short_course'", + "postCreateCommand": "python -m ipykernel install --user --name short_course --display-name 'Python (short_course)'", "remoteUser": "vscode" } \ No newline at end of file From f24c7457c7333520c6e8c0b2af3b47e9daa20631 Mon Sep 17 00:00:00 2001 From: Amy Defnet Date: Tue, 28 Apr 2026 16:27:55 -0400 Subject: [PATCH 6/6] remove custom kernel, update requirements --- .devcontainer/Dockerfile | 7 +------ .devcontainer/devcontainer.json | 1 - requirements.txt | 2 ++ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c124d70..5932f20 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -9,9 +9,4 @@ COPY requirements.txt /tmp/requirements.txt # Install Python dependencies RUN pip install --upgrade pip \ - && pip install -r /tmp/requirements.txt \ - && pip install jupyter ipykernel - -# Ensure the kernel is registered -RUN python -m ipykernel install --user --name short_course --display-name "Python (short_course)" - + && pip install -r /tmp/requirements.txt diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e705d79..ab1cd23 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,6 +13,5 @@ ] } }, - "postCreateCommand": "python -m ipykernel install --user --name short_course --display-name 'Python (short_course)'", "remoteUser": "vscode" } \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 48c968a..8ec386a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,5 @@ subsettools>=2.0.1 hf_hydrodata>=1.4.3 matplotlib>=3.7.2 bokeh>=3.3.0 +jupyter +ipykernel