wandb
/
pyproject.toml
297 строк · 7.7 Кб
1[build-system]
2requires = ['setuptools>61']
3build-backend = "setuptools.build_meta"
4
5[project]
6name = "wandb"
7dynamic = ["version"]
8description = "A CLI and library for interacting with the Weights & Biases API."
9authors = [{ name = "Weights & Biases", email = "support@wandb.com" }]
10readme = "package_readme.md"
11license = { file = "LICENSE" }
12requires-python = ">=3.7"
13dependencies = [
14"Click>=7.1,!=8.0.0", # click 8.0.0 is broken
15"GitPython>=1.0.0,!=3.1.29", # CVE-2022-24439
16"requests>=2.0.0,<3",
17"psutil>=5.0.0",
18"sentry-sdk>=1.0.0",
19"docker-pycreds>=0.4.0",
20"protobuf>=3.12.0,!=4.21.0,<5; python_version < '3.9' and sys_platform == 'linux'",
21"protobuf>=3.15.0,!=4.21.0,<5; python_version == '3.9' and sys_platform == 'linux'",
22"protobuf>=3.19.0,!=4.21.0,<5; python_version > '3.9' and sys_platform == 'linux'",
23"protobuf>=3.19.0,!=4.21.0,<5; sys_platform != 'linux'",
24"PyYAML",
25"setproctitle",
26"setuptools",
27"appdirs>=1.4.3",
28"typing_extensions; python_version < '3.10'",
29]
30classifiers = [
31"Development Status :: 5 - Production/Stable",
32"Intended Audience :: Developers",
33"Intended Audience :: Science/Research",
34"License :: OSI Approved :: MIT License",
35"Natural Language :: English",
36"Programming Language :: Python :: 3",
37"Programming Language :: Python :: 3.7",
38"Programming Language :: Python :: 3.8",
39"Programming Language :: Python :: 3.9",
40"Programming Language :: Python :: 3.10",
41"Programming Language :: Python :: 3.11",
42"Programming Language :: Python :: 3.12",
43"Programming Language :: Python :: 3 :: Only",
44"Topic :: Scientific/Engineering :: Artificial Intelligence",
45"Topic :: Software Development :: Libraries :: Python Modules",
46"Topic :: System :: Logging",
47"Topic :: System :: Monitoring",
48]
49
50
51[project.scripts]
52wandb = "wandb.cli.cli:cli"
53wb = "wandb.cli.cli:cli"
54
55[project.urls]
56"Source" = "https://github.com/wandb/wandb"
57"Bug Reports" = "https://github.com/wandb/wandb/issues"
58"Documentation" = "https://docs.wandb.ai/"
59
60[project.optional-dependencies]
61kubeflow = ["kubernetes", "minio", "google-cloud-storage", "sh"]
62gcp = ["google-cloud-storage"]
63aws = ["boto3"]
64azure = ["azure-identity", "azure-storage-blob"]
65media = [
66"numpy",
67"moviepy",
68"pillow",
69"bokeh",
70"soundfile",
71"plotly>=5.18.0",
72"rdkit-pypi",
73]
74sweeps = ["sweeps>=0.2.0"]
75launch = [
76"awscli",
77"azure-identity",
78"azure-containerregistry",
79"azure-storage-blob",
80"boto3",
81"botocore",
82"chardet",
83"google-auth",
84"google-cloud-aiplatform",
85"google-cloud-artifact-registry",
86"google-cloud-compute",
87"google-cloud-storage",
88"iso8601",
89"kubernetes",
90"kubernetes_asyncio",
91"optuna",
92"nbconvert",
93"nbformat",
94"pydantic",
95"typing_extensions",
96"tomli",
97"PyYAML>=6.0.0",
98]
99models = ["cloudpickle"]
100async = ["httpx>=0.23.0"]
101perf = ["orjson"]
102importers = ["polars", "rich", "filelock", "mlflow", "tenacity"]
103reports = ["pydantic>=2.0.0"]
104
105[tool.setuptools]
106zip-safe = false
107include-package-data = true
108packages = ["wandb"]
109package-dir = { "wandb" = "wandb" }
110package-data = { "wandb" = ["py.typed"] }
111
112[tool.setuptools.dynamic]
113version = { attr = "wandb.__version__" }
114
115
116[tool.pytest.ini_options]
117minversion = "6.0"
118console_output_style = "count"
119addopts = "-vvv --cov-config=pyproject.toml --dist=loadscope --capture=no"
120markers = [
121"image_output",
122"multiclass",
123"wandb_args",
124"flaky",
125"wandb_core_failure(feature): test failures with wandb-core, grouped by feature",
126]
127timeout = 60
128log_format = "%(asctime)s %(levelname)s %(message)s"
129log_date_format = "%Y-%m-%d %H:%M:%S"
130testpaths = "tests"
131filterwarnings = "ignore::DeprecationWarning"
132open_files_ignore = "*.ttf"
133norecursedirs = [
134"vendor",
135"wandb/vendor",
136"build/",
137"tests/functional_tests",
138"tests/standalone_tests",
139]
140
141[tool.coverage.paths]
142source = ["wandb", ".tox/*/lib/python*/site-packages/wandb"]
143
144[tool.coverage.run]
145# branch = true
146concurrency = ["multiprocessing", "thread"]
147source = ["wandb"]
148omit = ["**/wandb/vendor/**", "**/wandb/proto/**"]
149
150[tool.coverage.report]
151exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:", "@abstractmethod"]
152omit = ["**/wandb/vendor/**", "**/wandb/proto/**"]
153ignore_errors = true
154
155
156[tool.black]
157line-length = 88
158target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
159include = '\.pyi?$'
160exclude = '''
161wandb/vendor/
162| wandb/bin/
163| wandb/proto/
164| wandb/proto_check/
165| wandb/sdk/launch/deploys/
166| wandb/run*
167| wandb/offline-run*
168| __pycache__
169| .pyc
170| .tox/
171'''
172
173[tool.ruff]
174exclude = ["wandb/__init__.py"]
175extend-exclude = ["wandb/vendor/**", "wandb/proto/**"]
176select = ["F", "E", "W", "B", "I", "N", "D", "C90", "UP"]
177ignore = [
178"B904",
179"E501",
180"D1", # Allow missing docstrings.
181"D417", # Don't require descriptions for all arguments.
182"UP022",
183"UP032", # Allow using format instead of f-string.
184"UP036",
185]
186target-version = "py37"
187
188[tool.ruff.isort]
189split-on-trailing-comma = false
190
191[tool.ruff.per-file-ignores]
192"**/__init__.py" = ["E402", "F401"]
193"wandb/__init__.py" = ["I001"]
194"wandb/cli/cli.py" = ["C901"]
195"wandb/wandb_controller.py" = ["N806"]
196"wandb/sklearn/**" = ["B010", "B011", "N803", "N806", "UP031"]
197"wandb/wandb_torch.py" = ["C901", "D", "E741", "F841"]
198"wandb/integration/metaflow/metaflow.py" = ["F811"]
199"wandb/integration/magic.py" = ["B026", "F401", "F841", "N806", "N818"]
200"wandb/plots/**" = ["D", "B007", "F401", "N812", "F841", "UP031"]
201"wandb/old/**" = ["B006", "B020", "D", "F822"]
202"tests/pytest_tests/unit_tests_old/**" = ["B", "C", "D", "E", "F", "N", "UP026"]
203"tests/functional_tests/t0_main/fastai/t1_v1.py" = ["F405"]
204"tests/functional_tests/t0_main/metaflow/**" = ["D", "N806"]
205
206[tool.ruff.pydocstyle]
207convention = "google"
208
209[tool.ruff.pycodestyle]
210ignore-overlong-task-comments = true
211
212[tool.ruff.mccabe]
213max-complexity = 18
214
215[tool.mypy]
216warn_redundant_casts = true
217exclude = '''
218(?x)(
219wandb/vendor/.
220)
221'''
222
223# wandb.*
224[[tool.mypy.overrides]]
225module = "wandb.*"
226ignore_errors = false
227
228[[tool.mypy.overrides]]
229module = [
230"wandb.testing.*",
231"wandb.integration.*",
232"wandb.apis.*",
233"wandb.proto.*",
234"wandb.sklearn.*",
235"wandb.beta.*",
236"wandb.sdk.wandb_login",
237"wandb.cli.*",
238"wandb.wandb_torch.*",
239"wandb.wandb_controller.*",
240"wandb.wandb_agent.*",
241"wandb.sdk.verify.*",
242"wandb.trigger.*",
243"wandb.wandb_summary.*",
244"wandb.jupyter.*",
245"wandb.sync.*",
246"wandb.sdk.integration_utils.*",
247"wandb.plot.*",
248"wandb.plots.*",
249"wandb.old.*",
250]
251ignore_errors = true
252
253# wandb/env
254[[tool.mypy.overrides]]
255module = "wandb.env"
256ignore_errors = false
257disallow_incomplete_defs = true
258disallow_untyped_defs = true
259warn_unused_ignores = true
260warn_return_any = true
261warn_unreachable = true
262check_untyped_defs = true
263disallow_untyped_decorators = true
264strict_equality = true
265implicit_reexport = false
266
267# wandb/filesync.*
268[[tool.mypy.overrides]]
269module = "wandb.filesync.*"
270ignore_errors = false
271disallow_incomplete_defs = true
272disallow_untyped_defs = true
273warn_unused_ignores = true
274warn_return_any = true
275warn_unreachable = true
276check_untyped_defs = true
277disallow_untyped_calls = false
278disallow_untyped_decorators = true
279strict_equality = true
280implicit_reexport = false
281
282# More wandb/ modules can be added in a similar manner as overrides
283
284# External libraries
285[[tool.mypy.overrides]]
286module = [
287"psutil.*",
288"tensorboard.*",
289"grpc.*",
290"setproctitle.*",
291"ultralytics.*",
292"wandb_gql.*",
293"wandb_graphql.*",
294"wandb.vendor.*",
295"wandb.vendor.pynvml.pynvml.*",
296]
297ignore_missing_imports = true
298