-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
101 lines (83 loc) · 1.99 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
[tool.poetry]
name = "app"
version = "0" # standard placeholder, will update dynamic when install service
description = ""
authors = ["Hai Che <cheviethai123@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.8.1"
torch = {version = "2.0.1", source="torchcpu"}
fastapi = "0.100.0"
uvicorn = "0.21.1"
ml = {path = "../../libs/ml", develop = true}
mq = {path = "../../libs/mq", develop = true}
[[tool.poetry.source]]
name = "torchcpu"
url = "https://download.pytorch.org/whl/cpu"
priority = "explicit"
### pytest setup ###
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = "6.2.2"
pytest-cov = "4.0.0"
httpx = "0.24.1"
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "DEBUG"
addopts = "--cov --cov-report term"
testpaths = ["tests"]
[tool.coverage.run]
source = ["app"]
omit = ["./venv/*", "*tests*", "*_Users_*"]
[tool.coverage.paths]
source = ["app", "/tmp/app"]
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
mypy = "1.4.1"
black = "23.3.0"
ruff = "0.0.278"
[tool.mypy]
strict = true
allow_subclassing_any = true
allow_untyped_decorators = true
ignore_missing_imports = true
[tool.ruff]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
"__pypackages__",
"__pycache__",
"build",
"dist",
"venv",
]
### Versioning by git setup ###
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "pep440"
[build-system]
requires = ["poetry_core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"