-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
74 lines (59 loc) · 1.81 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
[tool.poetry]
name = "bee-python-sdk"
version = "0.1.0"
description = ""
authors = ["IBM Corp."]
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.11"
openai = "^1.47.0"
requests = "^2.32.3"
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
poethepoet = "^0.28.0"
python-dotenv = "^1.0.1"
pytest-dotenv = "^0.5.2"
ruff = "^0.6.7"
pytest-xdist = "^3.6.1"
pre-commit = "^4.0.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
addopts = "-v"
testpaths = ["tests"]
markers = [ "e2e" ]
env_files = [ ".env" ]
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = [# See docs for available rules: https://docs.astral.sh/ruff/rules
"B", # bugbear (assignment to os.environ, assert False, ...)
"C", # mccabe (too complex structures, ...)
"E", # error (line too long, syntax error, ...)
"F", # pyflakes (unused imports, variables, ...)
"I", # isort
"W", # pycodestyle (indentation, whitespace, ...)
"T20", # flake8-print (print found, pprint found, ...)
]
[tool.ruff.lint.mccabe]
max-complexity = 18
[tool.ruff.lint.per-file-ignores]
"examples/**/*.py" = ["T201", "T203", "B904"] # Examples can include print and pprint, ignore exception propagation
"examples/*.py" = ["T201", "T203", "B904"] # Examples can include print and pprint, ignore exception propagation
[tool.ruff.lint.isort]
known-first-party = ["bee_automations"]
[tool.poe.tasks.format]
help = "Run all formating tools"
sequence = [
{ "cmd" = "ruff format" }, # format code
{ "cmd" = "ruff check --select I --fix" } # sort imports
]
[tool.poe.tasks.lint]
help = "Check for errors and fix them using ruff (includes isort)"
cmd = "ruff check --fix"
[tool.poe.tasks.test]
help = "Run all examples"
cmd = "pytest -m 'e2e' -n 5"