Skip to content

Commit 9f2e1f0

Browse files
authored
docs: note virtual environment requirement for pre-commit hooks (#745)
Some hooks require tools from dev dependency groups to be on PATH. Add note to installation steps and common issues table directing contributors to activate the virtual environment before committing. Relates to #744. Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
1 parent c323c99 commit 9f2e1f0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ to melleaadmin@ibm.com.
7171
```bash
7272
pre-commit install
7373
```
74+
> **Note:** Some hooks require tools in dev dependency groups to be on your PATH. Activate the virtual environment before committing to ensure they are available:
75+
> ```bash
76+
> source .venv/bin/activate
77+
> ```
7478
7579
### Installation with `conda`/`mamba`
7680
@@ -430,7 +434,7 @@ CICD=1 uv run pytest
430434
| Output is wrong/None | Model too small or needs better prompt. Try larger model or add `reasoning` field. |
431435
| `error: can't find Rust compiler` | Python 3.13+ requires Rust for outlines. Install [Rust](https://www.rust-lang.org/tools/install) or use Python 3.12. |
432436
| Tests fail on Intel Mac | Use conda: `conda install 'torchvision>=0.22.0'` then `uv pip install mellea`. |
433-
| Pre-commit hooks fail | Run `pre-commit run --all-files` to see specific issues. Fix or use `git commit -n` to bypass. |
437+
| Pre-commit hooks fail | Run `pre-commit run --all-files` to see specific issues. Fix or use `git commit -n` to bypass. If a tool reports `command not found`, activate the virtual environment before committing: `source .venv/bin/activate`. |
434438

435439
### Debugging Tips
436440

0 commit comments

Comments
 (0)