-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (127 loc) · 2.8 KB
/
pyproject.toml
File metadata and controls
156 lines (127 loc) · 2.8 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
[build-system]
requires = ["hatchling>=1.11.0"]
build-backend = "hatchling.build"
[project.scripts]
source-agent = "source_agent.entrypoint:main"
[project]
requires-python = ">=3.10"
version = "0.0.16"
name = "source-agent"
description = "Simple coding agent."
readme = ".github/README.md"
license = "MIT"
classifiers = [
"Development Status :: 1 - Planning",
"Environment :: Console",
"Programming Language :: Python :: 3",
]
dependencies = [
"beautifulsoup4",
"ddgs",
"openai",
"pathspec",
"requests",
"pyyaml",
]
[project.optional-dependencies]
developer = [
"bandit[toml]",
"black",
"hatch",
"mypy",
"pytest",
"pytest-cov",
"ruff",
]
[tool.hatch.build]
ignore-vcs = false
reproducible = true
directory = "dist"
sources = ["src"]
include = ["src/", "LICENSE", "pyproject.toml", ".github/README.md"]
# Good overview of ruff's configuration options here:
# https://gist.github.com/carloshbcabral/b99510d4b1fc1c2765f07f3eb1f5f844
# https://docs.astral.sh/ruff/configuration/
[tool.ruff]
src = [
".",
"src"
]
exclude =[
"*.ipynb",
]
target-version = "py311"
respect-gitignore = true
output-format = "full"
show-fixes = true
fix = true
line-length = 127
indent-width = 4
[tool.ruff.lint]
exclude = ["*.ipynb"]
fixable = ["ALL"]
extend-select = ["I", "B", "Q"]
select = [
# "C901", # McCabe complexity
"E",
"F"
]
task-tags = ["TODO", "FIXME", "XXX"]
ignore = []
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
lines-after-imports = 2
length-sort-straight = true
length-sort = true
no-sections = true
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.flake8-bandit]
check-typed-exception = false
[tool.ruff.format]
exclude = ["*.ipynb"]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
skip-magic-trailing-comma = false
docstring-code-format = true
[tool.flake8]
max_line_length = 127
count = true
max_complexity = 15
statistics = true
exclude = []
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
addopts = "-ra -q -v"
python_files = "test_*.py"
# General scanning options
# https://bandit.readthedocs.io/en/latest/config.html
[tool.bandit]
targets = ["src/"]
exclude_dirs = [
".venv/",
"venv/",
"tests/",
".github/",
"*__pycache__/",
".git/",
".mypy_cache/",
".ruff_cache/",
"*.egg-info/",
]
recursive = true # Whether to scan recursively (usually true)
output_format = "html" # Output format (e.g., json, html, txt)
output_file = "bandit_report.html" # Output file path
tests = [
# "B101", # Use of assert
# "B301", # pickle module
]
skips = [
"B110", # Skip 'Try, Except, Pass' issues
"B112", # Skip 'Try, Except, Continue' issues
]