-
Notifications
You must be signed in to change notification settings - Fork 324
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (129 loc) · 3.69 KB
/
pyproject.toml
File metadata and controls
138 lines (129 loc) · 3.69 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
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
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "optax"
dynamic = ["version"]
description = "A gradient processing and optimization library in JAX."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
authors = [
{name = "Google DeepMind", email = "optax-dev@google.com"},
]
keywords = [
"python",
"machine learning",
"reinforcement-learning"
]
classifiers = [
"Environment :: Console",
"Programming Language :: Python",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"absl-py>=0.7.1",
# Keep jax, jaxlib versions in sync with .github/workflows/tests.yml
"jax>=0.5.3",
"jaxlib>=0.5.3",
"numpy>=1.18.0",
]
[project.urls]
homepage = "https://github.com/google-deepmind/optax"
repository = "https://github.com/google-deepmind/optax"
documentation = "https://optax.readthedocs.io/"
[project.optional-dependencies]
test = [
"flax>=0.5.3",
"scipy>=1.7.1",
"scikit-learn"
]
docs = [
"sphinx>=6.0.0",
"sphinx-book-theme>=1.0.1", # Older versions fail to pin pydata-sphinx-theme
"sphinxcontrib-katex",
"sphinx-autodoc-typehints",
"ipython>=8.8.0", # 8.7.0 has ipython3 lexer error
"myst-nb>=1.0.0",
"matplotlib>=3.5.0",
"sphinx-gallery>=0.14.0",
"sphinx-collections>=0.0.1",
"flax",
"sphinx_contributors",
"setuptools",
]
[tool.setuptools.packages.find]
include = ["README.md", "LICENSE"]
exclude = ["*_test.py"]
[tool.ruff]
line-length = 80
[tool.ruff.lint]
preview = true
select = [
"F",
"E",
"W291", # whitespace at the end of the line
"B023", # pylint's cell-var-over-loop, closures capturing variables in loop
"E302", # too many blank lines at the top of the file
"E303", # too many blank lines inside the file
]
ignore = [
"E731", # lambdas are allowed
"F401", # allow unused imports
"E402", # allow modules not at top of file
"E741", # allow "l" as a variable name
"E703", # allow semicolons (for jupyter notebooks)
"E111", # indents don't have to be multiples of 4 (we use 2)
"E114", # indents don't have to be multiples of 4 (we use 2)
]
[tool.pylint.messages_control]
disable = [
"bad-indentation",
"unknown-option-value",
"invalid-name",
"missing-function-docstring",
"missing-class-docstring",
"missing-module-docstring",
"no-member",
"too-many-locals",
"too-many-positional-arguments",
"no-else-return",
"line-too-long",
"too-many-arguments",
"no-value-for-parameter",
"duplicate-code",
"unused-argument",
"too-few-public-methods",
"wrong-import-order",
"unused-import",
"wrong-import-position",
"unnecessary-lambda-assignment",
"too-many-lines",
"too-many-statements",
"deprecated-class",
"redefined-builtin",
"used-before-assignment",
"undefined-variable",
"protected-access",
"not-callable",
"redefined-outer-name",
"too-many-instance-attributes",
"missing-final-newline",
"too-many-public-methods",
"import-error",
]
# We include pyink to allow external contributors to optionally, but easily,
# pass google internal formatting checks.
[tool.pyink]
pyink = true # false would mean black is used directly without pyink features
pyink-use-majority-quotes = true
pyink-indentation = 2
line-length = 80
include = '\.pyi?$'