From 095c6231e44bf50d958fed34b99e244940826a74 Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Fri, 23 Aug 2024 08:31:32 -0700 Subject: [PATCH] update python example readme, workspace, launch config (#30) --- examples/python-example01/.vscode/launch.json | 37 +------------------ examples/python-example01/README.md | 7 ++-- .../python-examples01.code-workspace | 3 ++ 3 files changed, 8 insertions(+), 39 deletions(-) diff --git a/examples/python-example01/.vscode/launch.json b/examples/python-example01/.vscode/launch.json index ffd1cc5..9e7cfca 100644 --- a/examples/python-example01/.vscode/launch.json +++ b/examples/python-example01/.vscode/launch.json @@ -1,26 +1,6 @@ { "version": "0.2.0", "configurations": [ - { - "type": "node", - "request": "launch", - "name": "semantic-workbench-app", - "cwd": "${workspaceFolder}/../../semantic-workbench/v1/app", - "skipFiles": ["/**"], - "console": "integratedTerminal", - "runtimeExecutable": "npm", - "runtimeArgs": ["run", "dev"] - }, - { - "type": "debugpy", - "request": "launch", - "name": "semantic-workbench-service", - "cwd": "${workspaceFolder}/../../semantic-workbench/v1/service", - "module": "semantic_workbench_service.start", - "justMyCode": false, - "consoleTitle": "semantic-workbench-service", - "args": ["--host", "0.0.0.0", "--port", "3000"] - }, { "type": "debugpy", "request": "launch", @@ -28,22 +8,7 @@ "cwd": "${workspaceFolder}", "module": "semantic_workbench_assistant.start", "args": ["assistant.chat:app", "--port", "3003"], - "consoleTitle": "${workspaceFolderBasename}", - "envFile": "${workspaceFolder}/.env" - } - ], - "compounds": [ - { - "name": "semantic-workbench", - "configurations": ["semantic-workbench-app", "semantic-workbench-service"] - }, - { - "name": "example assistant and semantic-workbench", - "configurations": [ - "semantic-workbench-app", - "semantic-workbench-service", - "python-example01 (assistant)" - ] + "consoleTitle": "${workspaceFolderBasename}" } ] } diff --git a/examples/python-example01/README.md b/examples/python-example01/README.md index 21bdf92..311ae44 100644 --- a/examples/python-example01/README.md +++ b/examples/python-example01/README.md @@ -8,10 +8,12 @@ A python chat assistant example that echos the user's input. - ALTERNATIVE: Local setup following the [main README](../../README.md#quick-start---local-development-environment) - Set up and verify that the workbench app and service are running - Stop the services and open the [python-examples01.code-workspace](./python-examples01.code-workspace) in VS Code + - You should always stop the services before switching workspaces, otherwise the services will not be able to start in the new workspace ## Steps -- Use VS Code > Run and Debug > `example assistant and semantic-workbench` to start the assistant. +- Use VS Code > `Run and Debug` (ctrl/cmd+shift+d) > `semantic-workbench` to start the app and service from this workspace +- Use VS Code > `Run and Debug` (ctrl/cmd+shift+d) > `python-example01` to start the assistant. - If running in a devcontainer, follow the instructions in [GitHub Codespaces / devcontainer README](../../.devcontainer/README.md#start-the-app-and-service) for any additional steps. - Return to the workbench app to interact with the assistant - Add a new assistant from the main menu of the app, choose `Python Example 01 Assistant` @@ -39,6 +41,5 @@ Copy the contents of this folder to your project. ## Suggested Development Environment -- Use GitHub Codespaces for a quick, turn-key dev environment: [/.devcontainer/README.md](../../../.devcontainer/README.md) +- Use GitHub Codespaces for a quick, turn-key dev environment: [/.devcontainer/README.md](../../.devcontainer/README.md) - VS Code is recommended for development -- diff --git a/examples/python-example01/python-examples01.code-workspace b/examples/python-example01/python-examples01.code-workspace index 287a892..b41bc53 100644 --- a/examples/python-example01/python-examples01.code-workspace +++ b/examples/python-example01/python-examples01.code-workspace @@ -3,6 +3,9 @@ { "path": ".", "name": "examples/python-examples01" + }, + { + "path": "../../" } ] }