From 2096de8d78c690c79af99902b7b25050a1ed2c04 Mon Sep 17 00:00:00 2001 From: Ilya Kheifets Date: Wed, 27 Sep 2023 17:10:47 +0200 Subject: [PATCH] update vscode task that build project --- .vscode/settings.json | 2 +- .vscode/tasks.json | 41 ++++++++++++++++++++++++++++------------- poetry.lock | 2 +- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 09e27867b6..ffe4232da2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "python.pythonPath": "venv/bin/python3", + "python.defaultInterpreterPath": ".venv/bin/python3", "python.testing.pytestEnabled": true, "python.testing.autoTestDiscoverOnSaveEnabled": true } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e5c70bf9e8..360fd0f794 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,30 +4,45 @@ "version": "2.0.0", "tasks": [ { - "label": "Setup step 1: python venv", + "label": "Step 1: Install poetry", "type": "shell", - "command": "python3 -m venv ./venv", - "windows": { - "command": "python venv" - }, - "group": "Setup", + "command": "python3 -m pip install poetry", + "group": "build", "presentation": { "reveal": "always", "panel": "new" + }, + "runOptions": { + "runOn": "folderOpen" } }, { - "label": "Setup step 2: python requirements", + "label": "Step 2: Configure poetry", "type": "shell", - "command": "pip3 install -r requirements.txt", - "windows": { - "command": "python requirements" + "command": "poetry config virtualenvs.in-project true --local", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new" + }, + "runOptions": { + "runOn": "folderOpen" }, - "group": "Setup", + "dependsOn": ["Step 1: Install poetry"] + }, + { + "label": "Step 3: Install deps", + "type": "shell", + "command": "poetry install", + "group": "build", "presentation": { "reveal": "always", "panel": "new" - } - } + }, + "runOptions": { + "runOn": "folderOpen" + }, + "dependsOn": ["Step 1: Install poetry", "Step 2: Configure poetry"] + }, ] } \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 5d8c8d5521..f4a82f7a09 100644 --- a/poetry.lock +++ b/poetry.lock @@ -785,7 +785,7 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.4.1" +version = "5.3.1" description = "YAML parser and emitter for Python" category = "dev" optional = false