Files
claude-cookbooks/.pre-commit-config.yaml
Alex Notov 4c1f9af8c6 refactor: simplify notebook CI/CD by removing nbqa and papermill
Remove nbqa in favor of ruff's native Jupyter support (v0.6.0+).
Replace papermill with nbconvert due to uv dependency resolution issues.
Also remove S105/S106 ignores to enforce better security practices.

- Update pyproject.toml to use ruff v0.12.12 with native notebook support
- Replace papermill with nbconvert for notebook execution
- Remove nbqa from all dependencies and pre-commit hooks
- Update GitHub Actions workflows to use ruff directly
- Remove hardcoded password ignores for better security
- Update documentation to reflect simplified setup
- Add dummy package structure for hatchling build system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 15:37:36 -06:00

31 lines
856 B
YAML

repos:
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args: ['--extra-keys', 'metadata.widgets metadata.vscode cell.metadata.execution']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.12
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: ['--fix']
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: local
hooks:
- id: check-models
name: Check Claude model usage
entry: python scripts/check_models.py
language: python
files: '\.ipynb$'
pass_filenames: false
- id: validate-notebooks
name: Validate notebook structure
entry: python scripts/validate_notebooks.py
language: python
files: '\.ipynb$'
pass_filenames: false