This guide walks you through setting up a development environment for the darnit project, from a fresh clone to running tests.
You'll need the following tools installed:
| Tool | Minimum Version | Purpose |
|---|---|---|
| Python | 3.11+ | Runtime (project targets 3.11/3.12) |
| uv | Latest | Dependency management and task runner |
| Git | 2.x | Version control |
GitHub CLI (gh) |
Latest | GitHub API access for integration tests |
Platform: macOS and Linux are the primary development platforms. Windows users should use WSL (Windows Subsystem for Linux).
Python 3.11+:
# macOS (Homebrew)
brew install python@3.12
# Ubuntu/Debian
sudo apt install python3.12 python3.12-venv
# Verify
python3 --versionuv:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Verify
uv --versionGitHub CLI:
# macOS
brew install gh
# Ubuntu/Debian
# See https://github.com/cli/cli/blob/trunk/docs/install_linux.md
# Verify
gh --versionThis project uses a fork-based workflow. All contributions come through pull requests from your fork.
Go to github.com/kusari-oss/darnit and click Fork.
git clone https://github.com/YOUR-USERNAME/darnit.git
cd darnitgit remote add upstream https://github.com/kusari-oss/darnit.gitgit remote -vExpected output:
origin https://github.com/YOUR-USERNAME/darnit.git (fetch)
origin https://github.com/YOUR-USERNAME/darnit.git (push)
upstream https://github.com/kusari-oss/darnit.git (fetch)
upstream https://github.com/kusari-oss/darnit.git (push)
uv syncThis installs all packages in the workspace (darnit, darnit-baseline, darnit-testchecks) in development mode with all dependencies.
Many integration tests and audit commands use the GitHub API. Authenticate the CLI:
gh auth loginFollow the prompts to authenticate. You can verify with:
gh auth statusRun these commands to confirm everything works:
uv run pytest tests/ --ignore=tests/integration/ -qExpected: all tests pass.
uv run ruff check .Expected: no errors.
uv run python scripts/validate_sync.py --verboseExpected: all checks pass.
If any of these fail, see the Troubleshooting Guide.
Before starting new work, always sync with upstream:
git fetch upstream
git rebase upstream/mainThis keeps your fork's history clean and avoids merge conflicts.
- Working on the framework? Continue to Framework Development
- Working on an implementation? Continue to Implementation Development
- Need to understand the architecture first? Read Framework Development for architecture diagrams
- Having issues? Check the Troubleshooting Guide