From 9e81f1fd35cce5c50548cc5ddec28442b4c907bd Mon Sep 17 00:00:00 2001 From: Jack Plowman <62281988+JackPlowman@users.noreply.github.com> Date: Sat, 28 Sep 2024 14:08:20 +0100 Subject: [PATCH] chore: Add Visual Studio Code debug and settings configurations (#57) This change introduces Visual Studio Code configuration files and updates a test case: 1. Added `.vscode/launch.json`: - Configured a debug configuration for the Analyser module - Set up environment variables for debugging 2. Added `.vscode/settings.json`: - Configured Python testing settings for pytest - Set up file exclusions for cache directories 3. Updated `test_repository_analysis.py`: - Changed the `path_to_repo` variable from "test" to "tester" in the `test_analyse_repository` function These changes improve the development environment setup and slightly modify a test case. fixes #50 --- .vscode/launch.json | 23 +++++++++++++++++++++++ .vscode/settings.json | 15 +++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d275da0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + + // To get python interpreter path use `poetry debug info` + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Analyser", + "type": "debugpy", + "request": "launch", + "module": "analyser", + "cwd": "${workspaceFolder}", + "env": { + "DEBUG": "true", + "REPOSITORY_OWNER": "JackPlowman" + }, + "console": "integratedTerminal", + "justMyCode": true + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9e749b0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,15 @@ +{ + "python.testing.cwd": "${workspaceFolder}", + "python.testing.pytestArgs": ["analyser"], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "python.testing.autoTestDiscoverOnSaveEnabled": true, + "python.analysis.inlayHints.pytestParameters": true, + "files.exclude": { + ".ruff_cache": true, + ".pytest_cache": true, + "**/__pycache__": true, + "**/.ruff_cache": true, + "**/.pytest_cache": true + } +}