Development Setup¶
Set up your development environment for contributing to bugsafe.
Prerequisites¶
- Python 3.10+
- Git
- uv (recommended) or pip
Clone the Repository¶
Install Dependencies¶
Verify Installation¶
# Run tests
uv run pytest tests/ -v
# Run linters
uv run mypy src/
uv run ruff check src/
# Run the CLI
uv run bugsafe --version
IDE Setup¶
VS Code¶
Recommended extensions:
- Python
- Pylance
- Ruff
Settings (.vscode/settings.json):
{
"python.defaultInterpreterPath": ".venv/bin/python",
"python.analysis.typeCheckingMode": "strict",
"ruff.enable": true
}
PyCharm¶
- Set interpreter to
.venv/bin/python - Enable Ruff plugin
- Enable mypy integration
Pre-commit Hooks¶
This runs linting on every commit.
Project Structure¶
bugsafe/
├── src/bugsafe/ # Source code
│ ├── capture/ # Command execution
│ ├── redact/ # Secret redaction
│ ├── bundle/ # Bundle format
│ ├── render/ # Output rendering
│ └── cli.py # CLI entry point
├── tests/ # Test suite
│ ├── unit/
│ ├── integration/
│ └── property/
├── docs/ # Documentation
└── pyproject.toml # Project config