Compare commits
2 Commits
52f95bd677
...
dba07fc5ff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dba07fc5ff | ||
|
|
44abe3ed35 |
6
.env
Normal file
6
.env
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Environment variables for development
|
||||||
|
# You can add project-specific environment variables here
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# ALPINEBITS_CONFIG_DIR=./config
|
||||||
|
# PYTHONPATH=./src
|
||||||
38
.vscode/launch.json
vendored
Normal file
38
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Debug Tests",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"purpose": [
|
||||||
|
"debug-test"
|
||||||
|
],
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": false,
|
||||||
|
"env": {
|
||||||
|
"PYTEST_ADDOPTS": "--no-cov"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python: Current File",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python: API Server",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "alpine_bits_python.run_api",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": true,
|
||||||
|
"env": {
|
||||||
|
"ALPINEBITS_CONFIG_DIR": "${workspaceFolder}/config"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
47
.vscode/settings.json
vendored
47
.vscode/settings.json
vendored
@@ -18,7 +18,31 @@
|
|||||||
"notebook.output.wordWrap": true,
|
"notebook.output.wordWrap": true,
|
||||||
"notebook.output.textLineLimit": 200,
|
"notebook.output.textLineLimit": 200,
|
||||||
"jupyter.debugJustMyCode": false,
|
"jupyter.debugJustMyCode": false,
|
||||||
|
"python.defaultInterpreterPath": "./.venv/bin/python",
|
||||||
|
"python.terminal.activateEnvironment": true,
|
||||||
|
"python.terminal.activateEnvInCurrentTerminal": true,
|
||||||
|
"python.envFile": "${workspaceFolder}/.env",
|
||||||
|
"terminal.integrated.env.linux": {
|
||||||
|
"VIRTUAL_ENV": "${workspaceFolder}/.venv",
|
||||||
|
"PATH": "${workspaceFolder}/.venv/bin:${env:PATH}"
|
||||||
|
},
|
||||||
|
"terminal.integrated.defaultProfile.linux": "bash",
|
||||||
|
"terminal.integrated.profiles.linux": {
|
||||||
|
"bash": {
|
||||||
|
"path": "bash",
|
||||||
|
"args": ["-c", "source ${workspaceFolder}/.venv/bin/activate && exec bash"]
|
||||||
|
}
|
||||||
|
},
|
||||||
"python.testing.pytestEnabled": true,
|
"python.testing.pytestEnabled": true,
|
||||||
|
"python.testing.pytestArgs": [
|
||||||
|
"tests",
|
||||||
|
"-v",
|
||||||
|
"--tb=short"
|
||||||
|
],
|
||||||
|
"python.testing.pytestPath": "./.venv/bin/pytest",
|
||||||
|
"python.testing.unittestEnabled": false,
|
||||||
|
"python.testing.autoTestDiscoverOnSaveEnabled": true,
|
||||||
|
"python.testing.cwd": "${workspaceFolder}",
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/*.egg-info": true,
|
"**/*.egg-info": true,
|
||||||
"**/htmlcov": true,
|
"**/htmlcov": true,
|
||||||
@@ -27,27 +51,6 @@
|
|||||||
"**/.venv": true,
|
"**/.venv": true,
|
||||||
"**/__pycache__": true,
|
"**/__pycache__": true,
|
||||||
"**/.mypy_cache": true,
|
"**/.mypy_cache": true,
|
||||||
"**/.pytest_cache": true,
|
"**/.pytest_cache": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .vscode/launch.json
|
|
||||||
{
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "Python: Debug Tests",
|
|
||||||
"type": "debugpy",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${file}",
|
|
||||||
"purpose": [
|
|
||||||
"debug-test"
|
|
||||||
],
|
|
||||||
"console": "integratedTerminal",
|
|
||||||
"justMyCode": false,
|
|
||||||
"env": {
|
|
||||||
"PYTEST_ADDOPTS": "--no-cov"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
13
conftest.py
Normal file
13
conftest.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
"""Pytest configuration and path setup for VS Code.
|
||||||
|
|
||||||
|
This configuration file ensures that VS Code can properly discover and run tests
|
||||||
|
by setting up the Python path to include the src directory.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
# Add the src directory to Python path for VS Code test discovery
|
||||||
|
src_path = Path(__file__).parent / "src"
|
||||||
|
if str(src_path) not in sys.path:
|
||||||
|
sys.path.insert(0, str(src_path))
|
||||||
Reference in New Issue
Block a user