-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (114 loc) · 3.02 KB
/
pyproject.toml
File metadata and controls
124 lines (114 loc) · 3.02 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[project]
name = "watchflow"
version = "0.1.0"
description = "Agentic GitHub Guardrails"
readme = "README.md"
requires-python = ">=3.12"
license = {text = "Apache Software License 2.0"}
authors = [
{name = "Dimitris Kargatzis", email = "dimitris.kargatzis@warestack.com"},
]
dependencies = [
"fastapi[standard]>=0.104.0",
"uvicorn[standard]>=0.24.0",
"pydantic>=2.5.0",
"python-dotenv>=1.0.0",
"aiohttp>=3.9.0",
"httpx>=0.25.0",
"pyjwt[crypto]>=2.8.0",
"cachetools>=5.3.0",
"pyyaml>=6.0.1",
"langchain-openai>=0.0.5",
"langgraph>=0.0.20",
"openai>=1.3.0",
"langchain-aws>=0.2.34",
"boto3>=1.40.43",
"anthropic[vertex]>=0.69.0",
"langchain-google-vertexai>=2.1.2",
"giturlparse>=0.1.0",
"structlog>=24.1.0",
"gql[all]>=3.4.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"respx>=0.20.0",
"mypy>=1.7.0",
"pre-commit>=3.5.0",
"ruff>=0.1.0", # Replaces black, isort, flake8
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.5.0",
"mkdocs-minify-plugin>=0.8.0",
]
[project.scripts]
watchflow = "src.main:app"
# --- RUFF CONFIGURATION (The Enforcer) ---
[tool.ruff]
target-version = "py312"
line-length = 120
indent-width = 4
exclude = [
".git", ".mypy_cache", ".pytest_cache", ".ruff_cache", ".venv", "venv", "__pypackages__",
]
[tool.ruff.lint]
# E/F: Core Python errors
# I: Import sorting (isort replacement)
# B: Bugbear (catches common bugs)
# UP: Pyupgrade (modernizes syntax)
# C4: Comprehensions
# SIM: Simplify (suggests pythonic refactors)
# TCH: Type Checking (enforces specific typing blocks)
select = ["E", "F", "I", "B", "UP", "C4", "SIM", "TCH"]
ignore = [
"E501", # Line too long (handled by formatter)
"B008", # Do not perform function calls in argument defaults (FastAPI Dependency Pattern)
]
fixable = ["ALL"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
[tool.ruff.lint.isort]
known-first-party = ["src"]
combine-as-imports = true
# --- MYPY CONFIGURATION (The Type Cop) ---
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true # No dynamic functions allowed
disallow_incomplete_defs = true # Must type all args
check_untyped_defs = true
disallow_untyped_decorators = false # Allow untyped decorators (needed for FastAPI/LangChain)
no_implicit_optional = true
strict_equality = true
[[tool.mypy.overrides]]
module = "boto3.*"
ignore_missing_imports = true
# --- PYTEST CONFIGURATION ---
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
addopts = [
"--strict-markers",
"--strict-config",
"--cov=src",
"--cov-report=term-missing",
]
asyncio_mode = "auto"
[tool.uv]
dev-dependencies = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"respx>=0.20.0",
"mypy>=1.7.0",
"pre-commit>=3.5.0",
"ruff>=0.1.0",
]