Skip to content

Commit

Permalink
chore: Add Visual Studio Code debug and settings configurations (#57)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JackPlowman committed Sep 28, 2024
1 parent d37c424 commit 9e81f1f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit 9e81f1f

Please sign in to comment.