-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpyproject.toml
181 lines (162 loc) · 4.96 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "torch-nos"
description = "Nitrous Oxide for your AI Infrastructure."
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Environment :: Console",
"Environment :: GPU",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research","Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = ["version", "dependencies", "optional-dependencies"]
[project.urls]
"Documentation" = "https://docs.nos.run/"
"Source Code" = "https://github.com/autonomi-ai/nos"
"Homepage" = "https://nos.run/"
[tool.setuptools.dynamic]
version = {attr = "nos.version.__version__"}
dependencies = {file = ["requirements/requirements.txt"]}
[tool.setuptools.dynamic.optional-dependencies]
server = {file = [
"requirements/requirements.server.txt",
"requirements/requirements.torch.gpu.txt"
]}
cpu = {file = ["requirements/requirements.cpu.txt"]}
gpu = {file = ["requirements/requirements.gpu.txt"]}
http = {file = ["requirements/requirements.http.txt"]}
dev = {file = ["requirements/requirements.dev.txt"]}
test = {file = ["requirements/requirements.test.txt"]}
docs = {file = ["requirements/requirements.docs.txt"]}
all = {file = [
"requirements/requirements.server.txt",
"requirements/requirements.torch.gpu.txt",
"requirements/requirements.http.txt"
]}
[project.scripts]
nos = "nos.cli.cli:app_cli"
nos-grpc-server = "nos.server._service:main"
nos-http-server = "nos.server.http._service:main"
# for specifying additional pypi index urls
# see https://setuptools.pypa.io/en/latest/userguide/dependency_management.html
[options]
dependency_links = [
"https://download.pytorch.org/whl/cu118",
]
[tool.setuptools.packages.find]
include = ["nos*","scripts*"]
exclude = [
"build",
"conda",
"dist",
"docs",
"makefiles",
"requirements",
"tests",
]
[tool.setuptools.package-data]
"*" = ["*.json", "*.proto", "*.j2", "test_data/*.*"]
[tool.black]
line-length = 119
target-version = ['py310']
exclude = '''
/(
\.data
| \.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
ignore = [
"E501", # E501: Line too long
"C901", # C901: Function is too complex
"B008", # do not perform function calls in argument defaults
"B904", # B904: check for raise from None
]
line-length = 119
target-version = "py310"
# 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",
".data",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"venv",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.isort]
lines-after-imports = 2
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.pytest.ini_options]
addopts = "-sv -m 'not (skip) and not (client) and not (benchmark) and not (server)'"
markers = [
"cli", # CLI tests
"client", # Client-side (integration) tests
"server", # Server-side tests
"benchmark", # Benchmark tests that is slow for basic CI
]
filterwarnings = [
"error",
"default:Using or importing the ABCs:DeprecationWarning:unittest2.*",
"default:.*not marked using pytest.hook.*",
"ignore:.*not marked using pytest.hook.*::xdist.*",
"ignore::Warning",
"ignore::ImportWarning",
"ignore::DeprecationWarning",
"ignore::ResourceWarning",
]
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"