File tree Expand file tree Collapse file tree 3 files changed +38
-2
lines changed
Expand file tree Collapse file tree 3 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 1+ repos :
2+ - repo : https://github.com/pre-commit/pre-commit-hooks
3+ rev : v4.6.0
4+ hooks :
5+ - id : trailing-whitespace
6+ - id : end-of-file-fixer
7+ - id : check-merge-conflict
8+ - id : check-yaml
9+
10+ - repo : https://github.com/psf/black
11+ rev : 24.8.0
12+ hooks :
13+ - id : black
14+
15+ - repo : https://github.com/astral-sh/ruff-pre-commit
16+ rev : v0.6.3
17+ hooks :
18+ - id : ruff
19+ args : ["--fix"]
20+
21+ - repo : https://github.com/shellcheck-py/shellcheck-py
22+ rev : v0.10.0.1
23+ hooks :
24+ - id : shellcheck
25+ files : " ^scripts/.*\\ .sh$"
Original file line number Diff line number Diff line change 11PY? =python3
22VENV? =venv
33
4- .PHONY : bootstrap bootstrap-prod test lint fmt ci chat config clean
4+ .PHONY : bootstrap bootstrap-prod test lint fmt ci chat config hooks clean
55
66bootstrap :
77 @bash scripts/bootstrap_venv.sh dev $(PY )
2626config :
2727 @$(VENV ) /bin/python -m orbit_agent.cli config-info
2828
29+ hooks :
30+ @$(VENV ) /bin/pre-commit install && echo " pre-commit hooks installed"
31+
2932clean :
3033 rm -rf $(VENV ) __pycache__ .pytest_cache
3134 find . -name " *.pyc" -delete
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ docker run -p 5000:5000 --env-file .env orbit-agent
127127## Contributing
128128
129129``` bash
130- # Install development dependencies
130+ # Install development dependencies
131131pip install -r requirements-dev.txt
132132
133133# Run tests
@@ -137,4 +137,12 @@ pytest -q
137137black .
138138ruff check .
139139mypy .
140+
141+ # Optional: set up git hooks (pre-commit)
142+ pre-commit install
143+ # or via Makefile (after bootstrapping venv):
144+ make hooks
145+
146+ # Run all hooks against the repo
147+ pre-commit run -a
140148```
You can’t perform that action at this time.
0 commit comments