This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
221 lines (196 loc) · 4.45 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
# pyproject.toml
[project]
name = "nina"
description = "Application to detect, track and calculate statistics of objects in video."
license = { text = "GPL-3.0" }
authors = [
{ name = "Birger Johan Nordølum" },
{ name = "Eirik Osland Lavik" },
{ name = "Kristian André Dahl Haugen" },
{ name = "Tom-Ruben Traavik Kvalvaag" },
]
requires-python = ">=3.9,<3.12"
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = [
"readme",
"version",
]
dependencies = [
"async-exit-stack>=1.0.1",
"async-generator>=1.10",
"fastapi[all]>=0.100",
"filterpy>=1.4.5",
"flask<4.0,>=3",
"flask-paginate>=2023.10.8",
"gitpython>=3.1.29", # yolov5 requirements
"ipython>=8.7", # yolov5 requirements
"opencv-python-headless>=4.5.5.64",
"psutil>=5.9.4", # yolov5 requirements
"pydantic>=2",
"seaborn>=0.11.2",
"sqlalchemy>=1.4.36",
"torch>=1.13.1",
"torchvision>=0.14.1",
"tqdm>=4.64",
"waitress>=2.1.1",
]
[project.optional-dependencies]
dev = [
"black>=22.1",
"build>=0.7",
"mypy>=0.902",
"pip-tools>=6.12.1",
"pre-commit>=2.17",
"pyproject-fmt>=0.5",
"sqlalchemy[mypy]>=1.4.21",
"tox>=4.0.14",
"types-requests>=2.28.11.8",
"types-waitress>=2.1.4.4",
]
testing = [
"covdefaults>=2",
"coverage[toml]>=6.3.1",
"pytest>=4",
"requests-mock>=1.9.3",
]
[project.urls]
repository = "https://github.com/tomrtk/fish-code"
[project.scripts]
nina = "nina.run:main"
nina-core = "core.main:main"
nina-detection = "detection.main:main"
nina-tracing = "tracing.main:main"
nina-ui = "ui.run:serve"
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61",
"setuptools_scm[toml]>=6.2",
]
[tool.setuptools]
zip-safe = false
[tool.setuptools.dynamic]
readme = { file = ["README.md"] }
[tool.setuptools_scm]
write_to = "src/nina/version.py"
#######################
# Tools Configuration #
#######################
[tool.black]
line-length = 80
target-version = ['py39']
include = '(src|tests)/.*\.pyi?$'
extend-exclude = 'src/vendor'
[tool.ruff]
line-length = 80
target-version = "py39"
# Set this to define first party files.
src = ["src", "tests"]
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"src/vendor",
"scripts",
"venv",
]
extend-select = [
"A", # flake8-builtin
"C4", # flake8-comprehensions
"D", # pydocstyle
"I", # isort
"Q", # flake8-quotes
"UP", # pyupgrade
"W", # warning
]
ignore = [
"A003",
"D104",
"E501",
"F403",
]
[tool.ruff.isort]
known-local-folder = ["vendor.sort"]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q -v --ignore=ci --import-mode=importlib"
testpaths = ["tests"]
filterwarnings = [
'ignore:the imp module is deprecated:DeprecationWarning',
'ignore:"@coroutine" decorator is deprecated:DeprecationWarning',
'ignore:Named tensors and all their associated APIs:UserWarning'
]
log_cli = "False"
log_level = "INFO"
norecursedirs = [".git", ".tox", ".env", "dist", "build"]
python_files = ["test_*.py", "*_test.py", "tests.py"]
[tool.coverage.report]
fail_under = 86
[tool.coverage.run]
plugins = ["covdefaults"]
source = ["src"]
omit = [
"*/.tox/*",
"*/__main__.py",
"*/setup.py",
"*/.venv*/*",
"*/venv*/*",
"src/nina/version.py",
"src/vendor/*"
]
[tool.tox]
legacy_tox_ini = '''
[tox]
envlist = py{39,310}
coverage
ui
isolated_build = true
requires = pip >= 22.0.3
setuptools >= 60.8.0
[testenv]
use_develop = true
extras = testing
allowlist_externals = coverage
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
passenv =
CI
commands =
coverage run -p -m pytest {posargs}
[testenv:coverage]
deps =
coverage[toml] >= 5.0
covdefaults
skip_install = True
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage}
commands = coverage combine
coverage report -m
coverage xml
[testenv:ui]
use_develop = false
allowlist_externals = pytest
commands = pytest tests/integration/test_ui.py
'''
[tool.mypy]
check_untyped_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
plugins = "sqlalchemy.ext.mypy.plugin"
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "vendor.*"
ignore_errors = true