From 80f57f31aa3ce2d12430f900b2c90c5737767b55 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 ++++++++++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 09e27867b6..e320afa041 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "python.pythonPath": "venv/bin/python3", + "python.pythonPath": ".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..421d9b05e5 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", + "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