From 45917d6f2057a96a9b5422b0a087518252e93806 Mon Sep 17 00:00:00 2001 From: Alex Kerney Date: Tue, 12 Aug 2025 15:52:56 -0400 Subject: [PATCH 1/2] Add devcontainer Adds a Devcontainer configuration that should allow opening the repo in Github Codespaces for editing without pulling locally. --- .devcontainer/Dockerfile | 13 +++++++++++++ .devcontainer/devcontainer.json | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) 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..c78db7d --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,13 @@ +FROM mcr.microsoft.com/devcontainers/base:jammy + +ARG PIXI_VERSION=v0.51.0 + +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" \ + && chmod +x /usr/local/bin/pixi \ + && pixi info + +# set some user and workdir settings to work nicely with vscode +USER vscode +WORKDIR /home/vscode + +RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..bca0b9b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + "name": "my-project", + "build": { + "dockerfile": "Dockerfile", + "context": "..", + }, + "customizations": { + "vscode": { + "settings": {}, + "extensions": ["ms-python.python", "charliermarsh.ruff", "GitHub.copilot"] + } + }, + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {} + }, + "mounts": ["source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"], + "postCreateCommand": "sudo chown vscode .pixi && pixi install" +} From 5cc005d94354e0751833734c758aac2fad0df75a Mon Sep 17 00:00:00 2001 From: Alex Kerney Date: Tue, 12 Aug 2025 16:13:38 -0400 Subject: [PATCH 2/2] Add VS Code tasks and default Codespaces files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Open the ‘how to edit’ doc when opening in Codespaces --- .devcontainer/devcontainer.json | 6 ++++++ .vscode/tasks.json | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bca0b9b..8c49645 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,6 +8,12 @@ "vscode": { "settings": {}, "extensions": ["ms-python.python", "charliermarsh.ruff", "GitHub.copilot"] + }, + "codespaces": { + "openFiles": [ + "README.md", + "_InstructionSiteUpdates.md" + ] } }, "features": { diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..754e353 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,34 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "html", + "type": "shell", + "command": "pixi run html", + "group": { + "kind": "build", + "isDefault": false + } + }, + { + "label": "clean", + "type": "shell", + "command": "pixi run clean", + "group": { + "kind": "build", + "isDefault": false + } + }, + { + "label": "live", + "type": "shell", + "command": "pixi run live", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file