forked from pymc-devs/pytensor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
184 lines (162 loc) · 5.26 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
182
183
184
[build-system]
requires = [
"setuptools>=59.0.0",
"cython",
"numpy>=1.17.0",
"versioneer[toml]==0.29",
]
build-backend = "setuptools.build_meta"
[project]
name = "pytensor"
dynamic = ['version']
requires-python = ">=3.10,<3.13"
authors = [{ name = "pymc-devs", email = "pymc.devs@gmail.com" }]
description = "Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs."
readme = "README.rst"
license = { file = "LICENSE.txt" }
classifiers = [
"Development Status :: 6 - Mature",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Compilers",
"Topic :: Scientific/Engineering :: Mathematics",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = [
"pytensor",
"math",
"numerical",
"symbolic",
"blas",
"numpy",
"autodiff",
"differentiation",
]
dependencies = [
"setuptools>=59.0.0",
"scipy>=1,<2",
"numpy>=1.17.0,<2",
"filelock>=3.15",
"etuples",
"logical-unification",
"miniKanren",
"cons",
]
[project.urls]
homepage = "https://github.com/pymc-devs/pytensor"
repository = "https://github.com/pymc-devs/pytensor"
documentation = "https://pytensor.readthedocs.io/en/latest/"
[project.scripts]
pytensor-cache = "pytensor.bin.pytensor_cache:main"
[project.optional-dependencies]
complete = ["pytensor[jax]", "pytensor[numba]"]
development = ["pytensor[complete]", "pytensor[tests]", "pytensor[rtd]"]
tests = [
"pytest",
"pre-commit",
"pytest-cov>=2.6.1",
"coverage>=5.1",
"pytest-benchmark",
"pytest-mock",
"pytest-sphinx",
]
rtd = ["sphinx>=5.1.0,<6", "pygments", "pydot", "pydot2", "pydot-ng"]
jax = ["jax", "jaxlib"]
numba = ["numba>=0.57", "llvmlite"]
[tool.setuptools.packages.find]
include = ["pytensor*"]
[tool.setuptools.package-data]
pytensor = ["py.typed"]
"pytensor.d3viz" = ["html/*", "css/*", "js/*"]
[tool.coverage.run]
omit = [
"pytensor/_version.py",
"tests/*",
"pytensor/assert_op.py",
"pytensor/graph/opt.py",
"pytensor/graph/opt_utils.py",
"pytensor/graph/optdb.py",
"pytensor/graph/kanren.py",
"pytensor/graph/unify.py",
"pytensor/link/jax/jax_linker.py",
"pytensor/link/jax/jax_dispatch.py",
]
branch = true
relative_files = true
[tool.coverage.report]
omit = ["pytensor/_version.py", "tests/"]
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"]
show_missing = true
[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "pytensor/_version.py"
versionfile_build = "pytensor/_version.py"
tag_prefix = "rel-"
[tool.pytest.ini_options]
addopts = "--durations=50 --doctest-modules --ignore=pytensor/link --ignore=pytensor/misc/check_duplicate_key.py"
testpaths = ["pytensor/", "tests/"]
xfail_strict = true
[tool.ruff]
line-length = 88
exclude = ["doc/", "pytensor/_version.py"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = ["C", "E", "F", "I", "UP", "W", "RUF", "PERF", "PTH", "ISC"]
ignore = ["C408", "C901", "E501", "E741", "RUF012", "PERF203", "ISC001"]
[tool.ruff.lint.isort]
lines-after-imports = 2
[tool.ruff.lint.per-file-ignores]
# TODO: Get rid of these:
"**/__init__.py" = ["F401", "E402", "F403"]
"pytensor/tensor/linalg.py" = ["F403"]
"pytensor/link/c/cmodule.py" = ["PTH"]
# For the tests we skip because `pytest.importorskip` is used:
"tests/link/jax/test_scalar.py" = ["E402"]
"tests/link/jax/test_tensor_basic.py" = ["E402"]
"tests/link/numba/test_basic.py" = ["E402"]
"tests/link/numba/test_cython_support.py" = ["E402"]
"tests/link/numba/test_performance.py" = ["E402"]
"tests/link/numba/test_sparse.py" = ["E402"]
"tests/link/numba/test_tensor_basic.py" = ["E402"]
"tests/tensor/test_math_scipy.py" = ["E402"]
"tests/sparse/test_basic.py" = ["E402"]
"tests/sparse/test_sp2.py" = ["E402"]
"tests/sparse/test_utils.py" = ["E402"]
"tests/sparse/sandbox/test_sp.py" = ["E402", "F401"]
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
strict_equality = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
files = ["pytensor", "tests"]
plugins = ["numpy.typing.mypy_plugin"]
[tool.cibuildwheel]
build = "*"
# Uncomment to skip builds that compile but fail when trying to test (maybe due to incompatibility with runner)
# archs = ["auto64"]
# Disable any-platform (pp*), and 32-bit builds.
# Additional options to consider: "*musllinux*"
skip = ["pp*", "*-win32", "*-manylinux_i686"]
build-frontend = "build"
test-command = 'python -c "import pytensor; print(pytensor.__version__); from pytensor.scan import scan_perform; print(scan_perform.get_version())"'
test-skip = ["cp37*", "*musllinux*", "*win32*", "*i686*"]
# Testing seems to be running into issues locating libs where expected
# test-requires = ["pytest", "numba", "jax", "jaxlib"]
# test-command = "pytest {package}/tests"