From 971f8289493b2fa927b6c215a89e61fb6470c34a Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Fri, 27 Jan 2023 16:33:07 +0000 Subject: [PATCH] VS Code dev container settings [changelog skip] --- .devcontainer/Dockerfile | 16 ++++++++++++++++ .devcontainer/devcontainer.json | 29 +++++++++++++++++++++++++++++ .vscode/extensions.json | 6 ++++++ .vscode/settings.json | 12 ++++++++---- 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/extensions.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..ecfee11 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM mcr.microsoft.com/devcontainers/base:ubuntu + +RUN apt-get update && \ + apt-get install -y software-properties-common && \ + add-apt-repository -y ppa:deadsnakes/ppa && \ + rm -rf /var/lib/apt/lists/* + +RUN apt-get update && \ + apt-get install -y \ + pypy3 \ + python3.8-full \ + python3.9-full \ + python3.10-full \ + python3.11-full \ + tox && \ + rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..7b5a79b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Multiple Python versions", + + "build": { + "dockerfile": "Dockerfile" + }, + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "lextudio.restructuredtext" + ] + } + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "pip install -e .[dev]" + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..40230ce --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "ms-python.python", + "lextudio.restructuredtext" +] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 6c1f7ed..b7df9dc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,9 @@ { - "restructuredtext.confPath": "${workspaceFolder}/docs", - "restructuredtext.linter.executablePath": "${workspaceFolder}/.tox/docs/bin/rstcheck", - "restructuredtext.sphinxBuildPath": "${workspaceFolder}/.tox/docs/bin/sphinx-build" -} \ No newline at end of file + "files.eol": "\n", + "files.insertFinalNewline": false, + "files.trimFinalNewlines": true, + "esbonio.sphinx.buildDir": "${workspaceFolder}/docs/_build", + "esbonio.sphinx.confDir": "${workspaceFolder}/docs", + "esbonio.sphinx.srcDir": "${workspaceFolder}/docs", + "restructuredtext.linter.rstcheck.executablePath": "${workspaceFolder}/.tox/docs/bin/rstcheck" +}