-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
105 lines (95 loc) · 2.17 KB
/
pyproject.toml
File metadata and controls
105 lines (95 loc) · 2.17 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[project]
name = "explain"
version = "0.1.0"
description = "Explain Compiler Explorer output using AI"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"anthropic>=0.67.0",
"aws-embedded-metrics>=3.3.0",
"boto3>=1.40.30",
"click>=8.2.1",
"fastapi>=0.116.1",
"humanfriendly>=10.0",
"mangum>=0.19.0",
"pydantic-settings>=2.10.1",
"python-dotenv>=1.1.1",
"requests>=2.32.5",
"ruamel.yaml>=0.18.15",
]
[dependency-groups]
dev = [
# In development mode, include the FastAPI development server.
"fastapi[standard]>=0.116.1",
"pre-commit>=4.3.0",
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
"ruff>=0.13.0",
]
[tool.ruff]
target-version = "py313"
line-length = 120
[tool.ruff.lint]
select = [
# Pyflakes
"F",
# pycodestyle
"E",
"W",
# isort
"I",
# pep8-naming
"N",
# pydocstyle
"D",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# flake8-comprehensions
"C4",
# flake8-pie
"PIE",
# flake8-return
"RET",
# flake8-unused-arguments
"ARG",
# flake8-use-pathlib
"PTH",
# Ruff-specific rules
"RUF",
]
ignore = [
# Allow non-lowercase variable names (e.g., for API field names)
"N806",
# Allow missing docstrings for some cases
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D107", # Missing docstring in __init__
# Allow imperative mood in docstrings (e.g., "Create a new user")
"D401",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"test*.py" = [
"D", # Don't require docstrings in tests
"ARG", # Allow unused arguments in tests (fixtures)
]
"app/explain_api.py" = [
"N815", # Allow camelCase field names for API compatibility
]
"prompt_testing/*.py" = [
"D", # Don't require docstrings in prompt testing modules for now
]
[tool.uv]
package = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.setuptools.packages.find]
include = ["app*", "prompt_testing*"]
[project.scripts]
prompt-test = "prompt_testing.cli:main"