-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Expand file tree
/
Copy pathpyproject.toml
More file actions
85 lines (76 loc) · 2.04 KB
/
pyproject.toml
File metadata and controls
85 lines (76 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[project]
name = "anthropic-cookbook"
version = "0.1.0"
requires-python = ">=3.11,<3.13"
dependencies = [
"anthropic>=0.77.0",
"ipykernel>=7.1.0",
"notebook>=7.4.7",
"numpy>=2.3.4",
"pandas>=2.3.3",
"jupyter>=1.1.1",
"rich>=14.2.0",
"python-dotenv>=1.2.1",
"voyageai>=0.3.5",
"networkx>=3.6.1",
"matplotlib>=3.10.8",
"requests>=2.32.5",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"ruff>=0.14.2",
"pytest>=8.3.3",
"nbval>=0.11.0",
"pre-commit>=3.8.0",
"nbconvert>=7.16.0",
"pyyaml>=6.0.3",
"tox>=4.32.0",
"tox-uv>=1.29.0",
]
[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
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "S", "B"]
ignore = [
"E501", # line too long
"S101", # assert used (ok in tests)
"S301", # pickle usage ok for local data in cookbooks
"S311", # pseudo-random generators ok for non-crypto
"S608", # SQL string construction ok for demo/educational code
"N806", # variable in function should be lowercase (allow for API responses)
]
[tool.ruff.lint.per-file-ignores]
# Notebooks have different conventions than regular Python files
"*.ipynb" = [
"E402", # imports mid-file
"F811", # redefinitions (common in notebooks)
"N803", # argument name should be lowercase
"N806", # variable in function should be lowercase
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--tb=short",
]
markers = [
"slow: marks tests as slow (requires notebook execution)",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]