-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
159 lines (138 loc) · 3.72 KB
/
Copy pathpyproject.toml
File metadata and controls
159 lines (138 loc) · 3.72 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
[project]
name = "planner"
version = "0.1.0"
description = "Confidently navigate LLM deployments from concept to production"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
# Core dependencies
"fastapi>=0.137.1",
"uvicorn[standard]==0.49.0",
"pydantic==2.13.4",
"pydantic-settings==2.14.2",
# LLM integration
"ollama==0.6.2",
# Data handling
"pandas==3.0.3",
# PostgreSQL
"psycopg2-binary==2.9.12",
# YAML generation
"jinja2==3.1.6",
"pyyaml==6.0.3",
# HTTP client
"requests==2.34.2",
"huggingface_hub>=1.19.0",
"transformers>=5.12.1",
"llm-optimizer @ git+https://github.com/bentoml/llm-optimizer.git",
"python-multipart>=0.0.32",
]
[project.optional-dependencies]
ui = [
"streamlit==1.58.0",
"plotly>=6.3.0",
"matplotlib>=3.10.9",
]
cluster = [
"kubernetes>=36.0.2",
]
vertex = [
"anthropic[vertex]>=0.109.2",
]
openai = [
"openai>=1.82.0",
]
dev = [
"pytest==9.1.0",
"pytest-asyncio==1.4.0",
"httpx==0.28.1",
"ruff==0.15.17",
"mypy>=2.1.0",
"types-PyYAML>=6.0.12.20260518",
"types-requests>=2.33.0.20260518",
]
[project.scripts]
planner = "planner.cli.planner_cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/planner"]
[tool.ruff]
# Set the maximum line length
line-length = 100
# Target Python 3.11+
target-version = "py311"
# Exclude common directories
exclude = [
".git",
".venv",
"venv",
"__pycache__",
"*.egg-info",
"build",
"dist",
"generated_configs",
"logs",
]
[tool.ruff.lint]
# Enable recommended rules
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort (import sorting)
"N", # pep8-naming
"UP", # pyupgrade (modern Python syntax)
"B", # flake8-bugbear (common bugs)
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
# Ignore specific rules that may be too strict
ignore = [
"E501", # Line too long (handled by formatter)
"B008", # Do not perform function calls in argument defaults (common in FastAPI)
"N802", # Function name should be lowercase (some exceptions for API routes)
"SIM108", # Use ternary operator (sometimes reduces readability)
]
# Allow autofix for all enabled rules
fixable = ["ALL"]
unfixable = []
[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Indent with spaces
indent-style = "space"
# Like Black, automatically detect the appropriate line ending
line-ending = "auto"
[tool.ruff.lint.per-file-ignores]
# Ignore import sorting in __init__.py files
"__init__.py" = ["F401", "I"]
# Test files can have longer lines and unused imports
"tests/**/*.py" = ["E501", "F401"]
"test_*.py" = ["E501", "F401"]
[tool.ruff.lint.isort]
# Organize imports into sections
known-first-party = ["planner"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
check_untyped_defs = true
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "session"
markers = [
"database: marks tests that require a running PostgreSQL database with benchmark data",
"integration: marks tests as integration tests (requires Ollama and database)",
"intent_extraction: marks tests that validate LLM intent extraction (requires Ollama, run with make test-intent)",
"unit: marks tests as unit tests (no external dependencies)",
]
[dependency-groups]
dev = [
"pytest-cov>=7.1.0",
]