-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
109 lines (97 loc) · 2.17 KB
/
Copy pathpyproject.toml
File metadata and controls
109 lines (97 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
106
107
108
[project]
name = "image-generation-api"
version = "0.11.1"
description = "Image Generation OpenAPI Server with LiteLLM integration"
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.115.5",
"uvicorn[standard]>=0.32.1",
"python-multipart>=0.0.18",
"pydantic>=2.10.3",
"pydantic-settings>=2.6.1",
"python-dotenv>=1.0.1",
"openai>=1.57.2",
"google-genai>=1.0.0",
"sse-starlette>=2.2.1",
"aiofiles>=24.1.0",
"httpx>=0.28.1",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3.4",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"ruff>=0.8.4",
]
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["app*"]
# Ruff configuration
[tool.ruff]
line-length = 100
target-version = "py311"
exclude = [
".git",
".venv",
"venv",
"__pycache__",
"build",
"dist",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"W", # pycodestyle warnings
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # Line too long (handled by formatter)
]
[tool.ruff.lint.isort]
known-first-party = ["app"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
# pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--showlocals",
]
markers = [
"asyncio: mark test as async",
]
# Coverage configuration
[tool.coverage.run]
source = ["app"]
omit = ["tests/*", "venv/*", ".venv/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
# Semantic Release configuration
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
tag_format = "v{version}"
commit_parser = "conventional"
allow_zero_version = true
major_on_zero = false