From 4ce69fb876e151ec4006cbf65e9e2b6b0b7c8d1e Mon Sep 17 00:00:00 2001 From: Jonah Duckles Date: Thu, 14 Nov 2024 16:33:43 +1300 Subject: [PATCH 1/3] Moving python dependencies to be handled by pip --- .devcontainer/Dockerfile | 2 +- requirements.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 13067d9..f0eba1b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,6 +6,6 @@ RUN apt-get update \ && apt-get install -y --allow-change-held-packages --no-install-recommends \ build-essential git \ r-base r-cran-cairo r-cran-tidyverse \ - python3 python3-pip python3-numpy python3-matplotlib python3-requests python3-pandas python3-setuptools python3-dev \ + python3 python3-venv python3-pip python3-setuptools python3-dev \ && rm -rf /var/lib/apt/lists/* \ && apt-get clean diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f0c705e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +requests +pandas +matplotlib \ No newline at end of file From ed30b6898cfdd2748c63eb5a39a6e19fb8e9c325 Mon Sep 17 00:00:00 2001 From: Jonah Duckles Date: Thu, 14 Nov 2024 16:33:53 +1300 Subject: [PATCH 2/3] Don't commit virtpy --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18ed768 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.virtpy/* \ No newline at end of file From d18977037e733323c63ff8817ab5402544733bcf Mon Sep 17 00:00:00 2001 From: Jonah Duckles Date: Thu, 14 Nov 2024 16:34:07 +1300 Subject: [PATCH 3/3] Install requirements.txt --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2995a32..6c1da0a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -12,12 +12,13 @@ "hostRequirements": { "memory": "16gb" }, + "postCreateCommand": "python3 -m venv /workspaces/demo-codespace/.virtpy; /workspaces/demo-codespace/.virtpy/bin/pip install -r /workspaces/demo-codespace/requirements.txt", "customizations": { "codespaces": { "openFiles": ["welcome.smd"] }, "vscode": { - "extensions": ["stencila.stencila"], + "extensions": ["usernamehw.errorlens", "stencila.stencila"], "settings": { // See here for VSCode settings and their defaults // https://code.visualstudio.com/docs/getstarted/settings#_default-settings