Files
claude-cookbooks/pyproject.toml
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

50 lines
1.3 KiB
TOML

[project]
name = "anthropic-cookbook"
version = "0.1.0"
requires-python = ">=3.11,<3.13"
dependencies = [
"anthropic>=0.39.0",
"jupyter>=1.1.1",
"ipykernel>=6.29.5",
"notebook>=7.2.2",
"numpy>=1.26.4",
"pandas>=2.2.3",
]
[project.optional-dependencies]
dev = [
"nbstripout>=0.7.1",
"ruff>=0.7.0",
"pytest>=8.3.3",
"nbval>=0.11.0",
"pre-commit>=3.8.0",
"nbconvert>=7.16.0", # For executing notebooks in CI
]
[tool.uv.sources]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["anthropic_cookbook"] # Dummy package for build system
[tool.ruff]
line-length = 100
target-version = "py311"
extend-include = ["*.ipynb"] # Ruff v0.6.0+ includes notebooks by default, but explicit is better
select = ["E", "F", "I", "W", "UP", "S", "B"]
ignore = ["E501", "S101"] # E501: line too long, S101: assert used (ok in tests)
[tool.ruff.per-file-ignores]
# Notebooks have different conventions than regular Python files
"*.ipynb" = ["E402", "E501", "F401", "F811"] # Allow: imports mid-file, long lines, unused imports, redefinitions
[tool.nbstripout]
extra_keys = [
"cell.metadata.execution",
"cell.metadata.pycharm",
"metadata.widgets",
"metadata.vscode"
]