From 42cdcd3655ff0fb2b71d0f00c5832a41d6b8886a Mon Sep 17 00:00:00 2001 From: Felix Wiegand Date: Fri, 13 Nov 2026 13:26:06 +0100 Subject: [PATCH 1/5] feat: Replace Gitpod with GitHub Codespaces --- .devcontainer/devcontainer.json | 13 +++++++++++++ .devcontainer/setup.sh | 20 ++++++++++++++++++++ .gitpod.yml | 19 ------------------- README.md | 2 +- 4 files changed, 34 insertions(+), 20 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/setup.sh delete mode 100644 .gitpod.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..43de30b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,13 @@ +{ + "name": "Snakemake Tutorial", + "image": "mcr.microsoft.com/devcontainers/python:3.11", + "onCreateCommand": "bash .devcontainer/setup.sh", + "customizations": { + "vscode": { + "extensions": [ + "snakemake.snakemake-lang" + ] + } + }, + "remoteUser": "vscode" +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100644 index 0000000..365860f --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +echo "Setting up Snakemake tutorial environment..." + +# Clean up workspace +rm -f Dockerfile +echo "*" > .gitignore + +# Install pixi +curl -fsSL https://pixi.sh/install.sh | PIXI_NO_PATH_UPDATE=1 bash +export PATH="$HOME/.pixi/bin:$PATH" +echo 'export PATH="$HOME/.pixi/bin:$PATH"' >> ~/.bashrc + +# Create and activate the tutorial environment, conda is needed for --sdm conda +[ -f pixi.toml ] || pixi init --import environment.yaml +pixi add conda +echo 'eval "$(pixi shell-hook)"' >> ~/.bashrc + +echo "Setup complete!" diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index abedcc6..0000000 --- a/.gitpod.yml +++ /dev/null @@ -1,19 +0,0 @@ -image: snakemake/snakemake-tutorial:stable - -tasks: - - name: main terminal - command: | - rm Dockerfile - echo -e "# Snakemake-Tutorial\n\nYour gitpod workspace for the snakemake-tutorial has been initialized. Now you can start with the [basic tutorial](https://snakemake.readthedocs.io/en/stable/tutorial/basics.html)." > README.md - echo "PS1='\w\$ '" >> ~/.bashrc - echo "*" > .gitignore - conda init - source ~/.bashrc - clear - conda activate snakemake-tutorial - -vscode: - extensions: - - snakemake.snakemake-lang - - ms-toolsai.jupyter - - sndst00m.vscode-native-svg-preview diff --git a/README.md b/README.md index 2a5f9c5..f75c77e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/snakemake/snakemake-tutorial-data) +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/snakemake/snakemake-tutorial-data) # Example data for the Snakemake tutorial From 1123d97709558072670b8d470d2fcb028b3b26c3 Mon Sep 17 00:00:00 2001 From: fxwiegand Date: Fri, 13 Nov 2026 14:52:18 +0100 Subject: [PATCH 2/5] fix: Use ubuntu base image and activate environment from any directory --- .devcontainer/devcontainer.json | 2 +- .devcontainer/setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 43de30b..c91905f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Snakemake Tutorial", - "image": "mcr.microsoft.com/devcontainers/python:3.11", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "onCreateCommand": "bash .devcontainer/setup.sh", "customizations": { "vscode": { diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 365860f..b665b98 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -15,6 +15,6 @@ echo 'export PATH="$HOME/.pixi/bin:$PATH"' >> ~/.bashrc # Create and activate the tutorial environment, conda is needed for --sdm conda [ -f pixi.toml ] || pixi init --import environment.yaml pixi add conda -echo 'eval "$(pixi shell-hook)"' >> ~/.bashrc +echo "eval \"\$(pixi shell-hook --manifest-path $PWD/pixi.toml)\"" >> ~/.bashrc echo "Setup complete!" From 2ce94010766e2d746e19f8078c394504fc7d0c05 Mon Sep 17 00:00:00 2001 From: fxwiegand Date: Fri, 13 Nov 2026 14:52:49 +0100 Subject: [PATCH 3/5] feat: Add Jupyter extension to Codespace --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c91905f..8b58aab 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,8 @@ "customizations": { "vscode": { "extensions": [ - "snakemake.snakemake-lang" + "snakemake.snakemake-lang", + "ms-toolsai.jupyter" ] } }, From fa4a1e2ff57be90cd13f447bf7405e4017e44041 Mon Sep 17 00:00:00 2001 From: fxwiegand Date: Fri, 13 Nov 2026 14:58:52 +0100 Subject: [PATCH 4/5] feat: Show tutorial welcome message in Codespace terminal and quote manifest path --- .devcontainer/setup.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index b665b98..0bad7a4 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -15,6 +15,19 @@ echo 'export PATH="$HOME/.pixi/bin:$PATH"' >> ~/.bashrc # Create and activate the tutorial environment, conda is needed for --sdm conda [ -f pixi.toml ] || pixi init --import environment.yaml pixi add conda -echo "eval \"\$(pixi shell-hook --manifest-path $PWD/pixi.toml)\"" >> ~/.bashrc +printf 'eval "$(pixi shell-hook --manifest-path %q)"\n' "$PWD/pixi.toml" >> ~/.bashrc + +# Replace the default Codespaces welcome message shown in the first terminal +NOTICE=/usr/local/etc/vscode-dev-containers/first-run-notice.txt +if [ -f "$NOTICE" ]; then + sudo tee "$NOTICE" > /dev/null <<'MSG' +👋 Welcome to the Snakemake tutorial! + +Your Codespace has been initialized with all required software. +Now you can start with the basic tutorial: +https://snakemake.readthedocs.io/en/stable/tutorial/basics.html + +MSG +fi echo "Setup complete!" From 9eec34a573203245b17257131868683b06042967 Mon Sep 17 00:00:00 2001 From: fxwiegand Date: Fri, 13 Nov 2026 15:04:28 +0100 Subject: [PATCH 5/5] fix: Create Codespace welcome message file if missing --- .devcontainer/setup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 0bad7a4..d40ef29 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -19,8 +19,8 @@ printf 'eval "$(pixi shell-hook --manifest-path %q)"\n' "$PWD/pixi.toml" >> ~/.b # Replace the default Codespaces welcome message shown in the first terminal NOTICE=/usr/local/etc/vscode-dev-containers/first-run-notice.txt -if [ -f "$NOTICE" ]; then - sudo tee "$NOTICE" > /dev/null <<'MSG' +sudo mkdir -p "$(dirname "$NOTICE")" +sudo tee "$NOTICE" > /dev/null <<'MSG' 👋 Welcome to the Snakemake tutorial! Your Codespace has been initialized with all required software. @@ -28,6 +28,5 @@ Now you can start with the basic tutorial: https://snakemake.readthedocs.io/en/stable/tutorial/basics.html MSG -fi echo "Setup complete!"