Development Setup
Set up a local development environment.
Prerequisites
- Python 3.11+
- Git
- (Optional) Docker
Clone Repository
Install Dependencies
Using pip
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
# Install with all dependencies
pip install -e ".[full,dev]"
Using uv (Recommended)
Verify Installation
Project Structure
jnkn/
├── src/jnkn/ # Main package
│ ├── cli/ # CLI commands
│ ├── core/ # Core types, graph, storage
│ ├── parsing/ # Language parsers
│ │ ├── python/
│ │ ├── terraform/
│ │ └── kubernetes/
│ ├── stitching/ # Cross-domain linking
│ └── analysis/ # Blast radius, explain, diff
├── tests/
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── e2e/ # End-to-end tests
├── docs/ # Documentation
└── pyproject.toml # Project configuration
Running Tests
# All tests
pytest
# Unit tests only
pytest tests/unit/
# Specific test file
pytest tests/unit/test_confidence.py
# With coverage
pytest --cov=jnkn --cov-report=html
open htmlcov/index.html
Running Linter
Building Documentation
# Install docs dependencies
pip install mkdocs-material mkdocstrings-python
# Serve locally
mkdocs serve
# Build
mkdocs build
IDE Setup
VS Code
Recommended extensions: - Python - Ruff - Even Better TOML
Settings (.vscode/settings.json):
{
"python.defaultInterpreterPath": ".venv/bin/python",
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
PyCharm
- Set Project Interpreter to
.venv - Enable pytest as test runner
- Configure Ruff as external tool