-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
124 lines (107 loc) · 2.43 KB
/
pyproject.toml
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 = "Martian"
version = "0.0.1"
description = ""
authors = [
{name = "Allainclair Flausino dos Santos", email = "[email protected]"},
]
requires-python = ">=3.12"
readme = "README.md"
license = {text = "MIT"}
dependencies = [
"openai>=1.14.3",
"anthropic>=0.21.3",
"fastapi>=0.110.0",
"pydantic-settings>=2.2.1",
"uvicorn>=0.29.0",
]
[tool.pdm.dev-dependencies]
test = [
"pytest>=7.4.3",
"pytest-asyncio>=0.21.1",
"coverage>=7.4.1",
"pytest-recording>=0.13.1",
"httpx>=0.27.0",
]
lint = [
"ruff>=0.1.4",
"mypy>=1.6.1",
]
debug = [ # Packages to use in your local machine for debug purposes.
"rich>=13.7.0",
"ipython>=8.22.1",
"pytest-watcher>=0.3.5",
]
[tool.pdm.scripts]
cov-run = {cmd = ["coverage", "run", "--branch", "--source=sub100", "-m", "pytest", "-vvss", "tests"]}
cov-term = {cmd = ["coverage", "report", "-m", "--fail-under=90"]}
cov-html = {cmd = ["coverage", "html", "--fail-under=90"]}
cov = {composite = ["cov-run", "cov-term"]} # run coverage and report with terminal output
cov-run-html = {composite = ["cov", "cov-html"]} # run coverage and report with html output
test = {composite = ["cov-run", "cov-term"]} # Sam as "cov"
mypy-strict = {cmd = ["mypy", "--strict", "."]}
ruff-dot = {cmd = ["ruff", "check", "."]}
ruff-format = {cmd = ["ruff", "format"]}
ruff-fix = {cmd = ["ruff", "check", ".", "--fix"]}
ruff-all = {composite = ["ruff-dot", "ruff-format"]}
lint = {composite = ["ruff-all", "mypy-strict"]}
lint-test = {composite = ["lint", "cov"]}
ptw_ = "ptw . -ssvv"
# Run pytest-watcher with coverage
ptw-cov = {cmd = ["ptw", ".", "--runner", "scripts/cov-html.sh"]}
[tool.ruff]
line-length = 80
# Suggestions to add to select: EM
[tool.ruff.lint]
select = [
"E",
"F",
"I",
"W",
"N",
"COM",
"C4",
"PIE",
"T20",
"Q",
"RET",
"SIM",
"ARG",
"PGH",
"RUF",
]
ignore = [
# https://docs.astral.sh/ruff/formatter/#format-suppression
"COM812",
"COM819",
"E111",
"E114",
"E117",
"D206",
"D300",
"ISC001",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",
# "T201", # Print
]
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
line-ending = "lf" # Use `\n` line endings for all files
[tool.ruff.lint.isort]
case-sensitive = true
split-on-trailing-comma = false
[tool.ruff.lint.mccabe]
max-complexity = 5
[tool.mypy]
strict = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
log_cli = true
[tool.pytest-watcher]
now = true
clear = true