From dd3d9195854cba2ded767405d31d8c74b726276d Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Tue, 8 Jul 2025 15:48:59 +0200 Subject: [PATCH 01/10] feat: add devcontainer --- .devcontainer/devcontainer.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ea33ea9 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,17 @@ +// For format details, see https://aka.ms/devcontainer.json. +{ + "name": "Snakemake-Tutorial", + "build": { + "context": "..", + "dockerfile": "../Dockerfile" + }, + "postCreateCommand": [ + "rm -r Dockerfile .gitpod.yml .github", + "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 \"*\" > .gitignore", + "conda init", + "source ~/.bashrc", + "clear", + "conda activate snakemake-tutorial" + ] +} From cb7fde9255e0cc6da24cc36b30c74fea926e99c6 Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Tue, 8 Jul 2025 16:13:23 +0200 Subject: [PATCH 02/10] fix activation --- .devcontainer/devcontainer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ea33ea9..8835f26 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,7 +11,6 @@ "echo \"*\" > .gitignore", "conda init", "source ~/.bashrc", - "clear", - "conda activate snakemake-tutorial" + "echo 'conda activate snakemake-tutorial' >> ~/.bashrc" ] } From 3049d6993e79e3ccb5cb66d8042617f65e3983e1 Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Tue, 8 Jul 2025 17:03:22 +0200 Subject: [PATCH 03/10] use script --- .devcontainer/devcontainer.json | 9 +-------- .devcontainer/setup.bash | 6 ++++++ 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 .devcontainer/setup.bash diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8835f26..501d7f0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,12 +5,5 @@ "context": "..", "dockerfile": "../Dockerfile" }, - "postCreateCommand": [ - "rm -r Dockerfile .gitpod.yml .github", - "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 \"*\" > .gitignore", - "conda init", - "source ~/.bashrc", - "echo 'conda activate snakemake-tutorial' >> ~/.bashrc" - ] + "postCreateCommand": "bash setup.bash" } diff --git a/.devcontainer/setup.bash b/.devcontainer/setup.bash new file mode 100644 index 0000000..5b1f4a7 --- /dev/null +++ b/.devcontainer/setup.bash @@ -0,0 +1,6 @@ +rm -r Dockerfile .gitpod.yml .github +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 \"*\" > .gitignore +conda init +source ~/.bashrc +echo 'conda activate snakemake-tutorial' >> ~/.bashrc" \ No newline at end of file From ebcfcb2ff6e6a55e6553f57085b4acc0d20fd519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Tue, 8 Jul 2025 20:09:49 +0200 Subject: [PATCH 04/10] Update .devcontainer/setup.bash Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .devcontainer/setup.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/setup.bash b/.devcontainer/setup.bash index 5b1f4a7..7bd5753 100644 --- a/.devcontainer/setup.bash +++ b/.devcontainer/setup.bash @@ -1,4 +1,4 @@ -rm -r Dockerfile .gitpod.yml .github +rm -f Dockerfile .gitpod.yml && rm -rf .github 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 \"*\" > .gitignore conda init From 8f1b13e7b792192b1e91aa17e5e0e988bf3e5a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Tue, 8 Jul 2025 20:13:12 +0200 Subject: [PATCH 05/10] Update .devcontainer/setup.bash Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .devcontainer/setup.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/setup.bash b/.devcontainer/setup.bash index 7bd5753..066e109 100644 --- a/.devcontainer/setup.bash +++ b/.devcontainer/setup.bash @@ -1,3 +1,6 @@ +#!/usr/bin/env bash +# abort on error, undefined vars, and failed pipelines +set -euo pipefail rm -f Dockerfile .gitpod.yml && rm -rf .github 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 \"*\" > .gitignore From ae2391ef2c6606451d922c5127e0ae6571f8a718 Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Wed, 9 Jul 2025 11:39:06 +0200 Subject: [PATCH 06/10] fix --- .devcontainer/setup.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/setup.bash b/.devcontainer/setup.bash index 5b1f4a7..7afbd94 100644 --- a/.devcontainer/setup.bash +++ b/.devcontainer/setup.bash @@ -1,6 +1,6 @@ rm -r Dockerfile .gitpod.yml .github 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 \"*\" > .gitignore +echo "*" > .gitignore conda init source ~/.bashrc -echo 'conda activate snakemake-tutorial' >> ~/.bashrc" \ No newline at end of file +echo 'conda activate snakemake-tutorial' >> ~/.bashrc \ No newline at end of file From aabac05fafb2b0c1507cc73b22a1ea798c03185f Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Wed, 9 Jul 2025 11:39:28 +0200 Subject: [PATCH 07/10] fix --- .devcontainer/setup.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/setup.bash b/.devcontainer/setup.bash index 2325f03..824874c 100644 --- a/.devcontainer/setup.bash +++ b/.devcontainer/setup.bash @@ -1,6 +1,7 @@ #!/usr/bin/env bash # abort on error, undefined vars, and failed pipelines set -euo pipefail + rm -f Dockerfile .gitpod.yml && rm -rf .github 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 "*" > .gitignore From bf5e6d568a2ef27eebd520268f26f88e1d7a2194 Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Wed, 9 Jul 2025 11:43:39 +0200 Subject: [PATCH 08/10] fix --- .devcontainer/setup.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.devcontainer/setup.bash b/.devcontainer/setup.bash index 824874c..dfdc683 100644 --- a/.devcontainer/setup.bash +++ b/.devcontainer/setup.bash @@ -6,5 +6,9 @@ rm -f Dockerfile .gitpod.yml && rm -rf .github 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 "*" > .gitignore conda init +set +u source ~/.bashrc -echo 'conda activate snakemake-tutorial' >> ~/.bashrc \ No newline at end of file +set -u + +echo 'conda activate snakemake-tutorial' >> ~/.bashrc +echo "Setup done" \ No newline at end of file From 11fd8c889854654b62297be8ddce81f41c934a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Wed, 9 Jul 2025 16:40:13 +0200 Subject: [PATCH 09/10] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 501d7f0..47aaa51 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,5 +5,5 @@ "context": "..", "dockerfile": "../Dockerfile" }, - "postCreateCommand": "bash setup.bash" + "postCreateCommand": "bash .devcontainer/setup.bash" } From e9928f6120f5c37da77f2a3e8fb25ce66deb96d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Wed, 9 Jul 2025 16:40:33 +0200 Subject: [PATCH 10/10] Update setup.bash --- .devcontainer/setup.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/setup.bash b/.devcontainer/setup.bash index dfdc683..ff66de6 100644 --- a/.devcontainer/setup.bash +++ b/.devcontainer/setup.bash @@ -2,7 +2,7 @@ # abort on error, undefined vars, and failed pipelines set -euo pipefail -rm -f Dockerfile .gitpod.yml && rm -rf .github +rm -f Dockerfile .gitpod.yml && rm -rf .github .devcontainer 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 "*" > .gitignore conda init @@ -11,4 +11,4 @@ source ~/.bashrc set -u echo 'conda activate snakemake-tutorial' >> ~/.bashrc -echo "Setup done" \ No newline at end of file +echo "Setup done"