-
Notifications
You must be signed in to change notification settings - Fork 471
Expand file tree
/
Copy pathpyproject.toml
More file actions
104 lines (95 loc) · 3.56 KB
/
Copy pathpyproject.toml
File metadata and controls
104 lines (95 loc) · 3.56 KB
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
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["setuptools>=77.0"]
build-backend = "setuptools.build_meta"
[project]
name = "tf2onnx"
dynamic = ["version"]
description = "Tensorflow to ONNX converter"
license = "Apache-2.0"
readme = "README.md"
requires-python = ">=3.10"
authors = [
{ name = "ONNX", email = "onnx-technical-discuss@lists.lfaidata.foundation" },
]
dependencies = [
"numpy>=1.23.5",
"onnx>=1.14.0",
"requests",
"flatbuffers>=1.12",
# protobuf is intentionally not pinned here: it is a transitive dependency of
# onnx, tensorflow and onnxruntime, which already agree on a compatible range.
# Declaring our own floor only risks resolver conflicts (e.g. blocking newer
# TensorFlow that requires a different protobuf) without adding safety.
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[project.optional-dependencies]
test = [
"graphviz",
"parameterized",
"pytest",
"pytest-cov",
"pyyaml"
]
[project.urls]
Homepage = "https://github.com/onnx/tensorflow-onnx"
[tool.setuptools.packages.find]
[tool.pytest.ini_options]
addopts = "--cov=tf2onnx"
norecursedirs = ["tests/keras2onnx_applications", "tests/keras2onnx_unit_tests"]
filterwarnings = [
"ignore:.*AtomicFunction.*:pytest.PytestUnraisableExceptionWarning",
]
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
]
ignore = [
"E501", # line too long (let formatter handle it)
"E741", # ambiguous variable name (too many in codebase)
"F841", # local variable assigned but never used (pylint didn't enforce)
]
[tool.ruff.lint.per-file-ignores]
"tf2onnx/version.py" = ["E", "F", "W", "I"]
"tf2onnx/tflite*" = ["E", "F", "W", "I"]
# Probe import used only to test availability of the optional package
"tests/common.py" = ["F401", "I001"]
# Bare except is intentional (tf.contrib may not exist in TF 2.x)
"tests/run_pretrained_models.py" = ["E722"]
# Test files: wildcard imports from common, lambda test helpers, bare excepts, etc.
"tests/test_*.py" = ["E701", "E722", "E731", "F403", "F405", "F811", "I001"]
# Legacy source files: patterns widespread in existing code, not worth fixing en masse
"tf2onnx/*.py" = ["E402", "E701", "E722", "E731", "F401", "I001"]
# Wildcard import from rewriter is intentional; all exported names are in __all__
"tf2onnx/tfonnx.py" = ["F403", "F405"]
# __init__.py re-exports: imports are for side-effects / re-export, not direct use
"tf2onnx/**/__init__.py" = ["F401"]
# Undefined names are conditional imports or skia-opt codepaths
"tf2onnx/onnx_opset/nn.py" = ["F821"]
"tf2onnx/optimizer/einsum_optimizer.py" = ["F821"]
# Single-line guards are idiomatic in these files
"tf2onnx/onnx_opset/math.py" = ["E701"]
"tf2onnx/rewriter/gemm_rewriter.py" = ["E701"]
# Tools: legacy scripts, bare excepts and redefined logging are intentional
"tools/*.py" = ["E722", "F811"]