-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
127 lines (115 loc) · 3.27 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
# Package ######################################################################
[build-system]
requires = ["setuptools", "pybind11"]
build-backend = "setuptools.build_meta"
[project]
name = "optree"
description = "Optimized PyTree Utilities."
readme = "README.md"
requires-python = ">= 3.6"
authors = [
{ name = "OpTree Contributors" },
{ name = "Xuehai Pan", email = "XuehaiPan@pku.edu.cn" },
{ name = "Jie Ren", email = "jieren9806@gmail.com" },
]
license = { text = "Apache License, Version 2.0" }
keywords = [
"PyTree",
"Tree Manipulation",
"Tree Traversal",
"Functional Programming",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Topic :: Utilities",
]
dependencies = ["typing-extensions"]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/metaopt/optree"
Repository = "https://github.com/metaopt/optree"
Documentation = "https://optree.readthedocs.io"
"Bug Report" = "https://github.com/metaopt/optree/issues"
[project.optional-dependencies]
lint = [
"isort",
"black >= 22.6.0",
"pylint",
"mypy",
"flake8",
"flake8-bugbear",
"doc8 < 1.0.0a0",
"pydocstyle",
"pyenchant",
"cpplint",
"pre-commit",
]
test = ['pytest', 'pytest-cov', 'pytest-xdist']
benchmark = [
'jax[cpu] >= 0.3, < 0.4.0a0',
'torch >= 1.12, < 1.13.0a0',
'torchvision',
'termcolor',
]
[tool.setuptools.packages.find]
include = ["optree", "optree.*"]
# Wheel builder ################################################################
# Reference: https://cibuildwheel.readthedocs.io
[tool.cibuildwheel]
archs = ["auto64"]
build-frontend = "build"
build-verbosity = 3
container-engine = "docker"
test-extras = ["test"]
test-command = """make -C "{project}" test PYTHON=python"""
# Linter tools #################################################################
[tool.black]
safe = true
line-length = 100
skip-string-normalization = true
target-version = ["py36", "py37", "py38", "py39", "py310", "py311"]
[tool.isort]
profile = "black"
src_paths = ["optree", "tests"]
extra_standard_library = ["typing_extensions"]
indent = 4
line_length = 100
lines_after_imports = 2
multi_line_output = 3
[tool.mypy]
python_version = 3.6
pretty = true
show_error_codes = true
show_error_context = true
show_traceback = true
allow_redefinition = true
check_untyped_defs = true
disallow_incomplete_defs = false
disallow_untyped_defs = false
ignore_missing_imports = true
no_implicit_optional = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pydocstyle]
convention = "google"
[tool.doc8]
max-line-length = 500