From e9ea848bd92066b795d83d9293c36d4d2a418c08 Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Wed, 5 Jul 2023 12:59:33 -0700 Subject: [PATCH] devcontainer --- .devcontainer/devcontainer.json | 23 +++++++++++++++++++++++ .devcontainer/startup.sh | 5 +++++ 2 files changed, 28 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/startup.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..b02a674f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +{ + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:1-3.9-bookworm", + "onCreateCommand": "bash .devcontainer/startup.sh", + "customizations": { + "vscode": { + "settings": { + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false, + "python.testing.pytestArgs": [ + "." + ], + "python.pythonPath": ".venv/bin/python", + "python.defaultInterpreterPath": ".venv/bin/python", + "python.terminal.activateEnvInCurrentTerminal": true + }, + "extensions": [ + "ms-toolsai.jupyter" + ] + } + } +} diff --git a/.devcontainer/startup.sh b/.devcontainer/startup.sh new file mode 100755 index 00000000..dc3cdf2e --- /dev/null +++ b/.devcontainer/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +pipx install poetry +poetry config virtualenvs.in-project true +poetry install +poetry run pre-commit install