It is assumed that all work will be done within the devcontainer, not on your local host machine.
Note: On Windows, you'll need to copy env.example to .env and update it based on the instructions inside.
- Install the Dev Containers VSCode extension:
ms-vscode-remote.remote-containers - From the palette, select:
Dev Containers: Reopen in Container
The frontend will be running on port 5173.
A dev tenant will be created along with the dev container, and your access token is in ./backend/data/access_tokens.
Aliases are available for scaf commands within the devcontainer (sourced from .venvrc).
# Reset data
dev.seed [--nuke]
# Make classes from proto
dev.proto.genYou can also run them directly (from repo root):
scaf call path/to/action/dir plus args --flagsScaf will create a called action if it does not exist.
# Run all tests (unit & integration, backend & frontend):
dev.test
# Run a specific unit test:
dev.test time --no-integrationIt is possible to debug either backend tests or endpoint hits via VSCode launch commands:
.vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Backend: Attach Debugger",
"preLaunchTask": "backend-debug",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "backend",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/workspaces/taxos"
}
],
"justMyCode": false
},
{
"name": "Dev: Test Domain",
"type": "debugpy",
"request": "launch",
"module": "scaf",
"args": ["call", "dev/test", "happy"],
"env": {
"PYTHONPATH": "${workspaceFolder}"
},
"justMyCode": false,
"console": "integratedTerminal"
}
]
}.vscode/tasks.json:
{
"tasks": [
{
"label": "backend-debug",
"type": "shell",
"command": "docker compose up backend-debug -d --force-recreate",
"problemMatcher": []
}
]
}