-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
269 lines (235 loc) · 6.48 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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
[tool.poetry]
name = "openbrain"
version = "5.7.0"
description = "A package to interact with generative AI and build specialized generative AI workflows."
authors = ["Samuel Vange <[email protected]>"]
readme = "README.md"
license = "AGPL-3.0-only"
packages = [{ include = "openbrain" }]
homepage = "https://github.com/svange/openbrain"
[tool.poetry.scripts]
ob = "openbrain.cli:cli"
ob-chat = "openbrain.cli:cli_chat"
#ob-tuner = "openbrain.app:main"
ob-env = "openbrain.cli:cli_env"
[tool.poetry.plugins."commitizen.plugin"] # completely untested
cz_conventional_commits = "commitizen.cz.conventional_commits:ConventionalCommitsCz"
#cz_jira = "commitizen.cz.jira:JiraSmartCz"
cz_customize = "commitizen.cz.customize:CustomizeCommitsCz"
cargo = "commitizen.providers:CargoProvider"
commitizen = "commitizen.providers:CommitizenProvider"
composer = "commitizen.providers:ComposerProvider"
npm = "commitizen.providers:NpmProvider"
pep621 = "commitizen.providers:Pep621Provider"
poetry = "commitizen.providers:PoetryProvider"
scm = "commitizen.providers:ScmProvider"
[tool.semantic_release]
major_on_zero = false
commit_message = "chore(release): release {version} [skip ci]"
# End from video
[tool.semantic_release.branches.main]
match = "main"
#commit_message = "chore(release): release {version}"
prerelease = false
[tool.semantic_release.branches.dev]
match = "dev"
#commit_message = "chore(pre-release): release {version}"
prerelease_token = "dev"
prerelease = true
version_toml = [
"pyproject.toml:tool.poetry.version",
]
version_variable = [
"openbrain/__init__.py:__version__",
]
build_command = "pip install poetry && poetry build"
#logging_use_named_masks = true
#major_on_zero = true
tag_format = "v{version}"
#exclude_commit_patterns = [
# 'skip: ',
#]
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true
type = "github"
[tool.semantic_release.remote.token]
env = "GITHUB_TOKEN"
fallback_env = "GH_TOKEN"
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "SemVer"
version_provider = "poetry" #"scm"
update_changelog_on_bump = true
major_version_zero = true
#version = "3.9.1"
#version_files = [
# "pyproject.toml:version",
# "openbrain/__version__.py",
# ".pre-commit-config.yaml:rev:.+Openbrain",
#]
[tool.poetry.plugins."commitizen.scheme"]
pep440 = "commitizen.version_schemes:Pep440"
semver = "commitizen.version_schemes:SemVer"
[tool.poetry.dependencies]
python = "^3.10"
boto3 = "^1.28.51"
langchain = "^0.1.0"
openai = "^0.28.0"
requests = "^2.31.0"
pydantic = "^2.3.0"
aws-lambda-powertools = "^2.25.0"
python-dotenv = "^1.0.0"
python-ulid = "^1.1.0"
aws-xray-sdk = "^2.12.0"
tiktoken = "^0.5.1"
pytz = "^2024.1"
itsdangerous = "^2.2.0"
#sphinx = "^7.4.7"
#sphinx-click = "^6.0.0"
sphinx-click = { version = "^6.0.0", optional = true }
sphinx = { version = "^7.4.7", optional = true }
augint-tools = "^1.41.0"
[tool.poetry.group.dev.dependencies]
pytest = "^7.4.2"
faker = "^19.6.1"
retry = "^0.9.2"
flake8 = "^6.1.0"
black = "^23.9.1"
reorder-python-imports = "^3.10.0"
python-semantic-release = "^8.1.1"
#ruff = "^0.0.291"
mypy = "^1.5.1"
commitizen = "^3.9.1"
isort = "^5.12.0"
pre-commit = "^3.4.0"
coverage = "^7.3.2"
pygithub = "^2.1.1"
pytest-html = "^4.1.1"
[tool.poetry.extras]
docs = ["sphinx", "sphinx-click"]
[tool.coverage] # not tested
[tool.coverage.report]
show_missing = true
exclude_lines = [
# Have to re-enable the standard pragma
'pragma: no cover',
# Don't complain about missing debug-only code:
'def __repr__',
'if self\.debug',
# Don't complain if tests don't hit defensive assertion code:
'raise AssertionError',
'raise NotImplementedError',
# Don't complain if non-runnable code isn't run:
'if 0:',
'if __name__ == .__main__.:',
'if TYPE_CHECKING:',
]
omit = [
'env/*',
'venv/*',
'.venv/*',
'*/virtualenv/*',
'*/virtualenvs/*',
'*/tests/*',
]
[tool.pytest.ini_options]
addopts = '-m "not redundant" --html=report.html --self-contained-html'
log_cli = true
log_cli_level = "INFO"
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
log_file = "pytest.log"
log_file_level = "INFO"
markers = [
"redundant: marks tests that are redundant",
"remote_tests: These tests run against deployed stacks. Not part of any deployment pipeline.",
"orm_tests: marks tests that test the orm and the database",
"tools: tests agent tools",
"no_infra: tests that do not require infrastructure",
]
#env_override_existing_values = 1
#env_files = ".env"
#[tool.ruff]
#line-length = 130
#ignore = [
# "E501",
# "D1",
# "D415"
#]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F"]
#[tool.ruff.isort]
#known-first-party = ["commitizen", "tests"]
#[tool.ruff.pydocstyle]
#convention = "google"
[tool.mypy]
files = "commitizen"
disallow_untyped_decorators = true
disallow_subclassing_any = true
warn_return_any = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = "py.*" # Legacy pytest dependencies
ignore_missing_imports = true
[tool.black]
line-length = 130
target-version = ['py310']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
)/
'''
[tool.flake8]
max-line-length = 130
extend-ignore = ["D203", "E203", "E251", "E266", "E302", "E305", "E401", "E402", "E501", "F401", "F403", "W503"]
exclude = [".git", "__pycache__", "dist"]
max-complexity = 10
[tool.isort]
atomic = true
profile = "black"
line_length = 130
skip_gitignore = true
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 130
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py310"