-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
119 lines (105 loc) · 2.94 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
[project]
name = "pyttb"
dynamic = ["version"]
description = "Python Tensor Toolbox"
authors = [
{name="Daniel M. Dunlavy", email="[email protected]"},
]
license = { text="BSD 2-Clause License" }
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"numpy<3.0,>=1.24",
"numpy_groupies>0.11",
"scipy>1.9",
"matplotlib>3.7",
]
classifiers = [
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[project.urls]
homepage = "https://github.com/sandialabs/pyttb"
coverage = "https://coveralls.io/github/sandialabs/pyttb"
documentation = "https://pyttb.readthedocs.io"
[project.optional-dependencies]
dev = [
"mypy>=1.10,<1.14.0",
# Also in pre-commit
"nbstripout>=0.8,<0.9",
"pytest>8.0",
"pytest-cov>5.0",
# Also in pre-commit
"ruff>=0.7,<0.8",
"pre-commit>=4.0,<5.0",
]
doc = [
"sphinx >= 4.0",
"sphinx_rtd_theme>2.0",
"myst-nb>1.0",
]
profiling = [
"gprof2dot",
"graphviz",
]
[tool.setuptools.packages.find]
include = ["pyttb*"]
exclude = ["tests*"]
namespaces = false
[tool.setuptools.dynamic]
version = {attr = "pyttb.__version__"}
[tool.setuptools.package-data]
"pyttb" = ["py.typed"]
[build-system]
requires = ["setuptools>=61.0", "numpy", "numpy_groupies", "scipy", "wheel"]
build-backend = "setuptools.build_meta"
[tool.ruff.lint]
select = ["E", "F", "PL", "W", "I", "N", "NPY", "RUF", "B"]
ignore = [
# Ignored in conversion to ruff since not previously enforced
"PLR2004",
# Lower case in function, matching MATLAB names
"N806",
# Argument name lower case, matching MATLAB names
"N803",
# Class name not CapWords, matching MATLAB names
"N801",
# Numpy legacy random transition is a TODO
"NPY002",
# See #184 for issue related to asserts
"B011",
# There is ongoing discussion about logging/warning etc
"B028",
]
[tool.ruff.lint.per-file-ignores]
# See see https://github.com/astral-sh/ruff/issues/3172 for details on this becoming simpler
# Everything but I, F (to catch import mess and potential logic errors)
"tests/**.py" = ["E", "PL", "W", "N", "NPY", "RUF", "B"]
# Ignore everything for now
"docs/**.py" = ["E", "F", "PL", "W", "I", "N", "NPY", "RUF", "B"]
"docs/**.ipynb" = ["E", "F", "PL", "W", "I", "N", "NPY", "RUF", "B"]
"profiling/**.ipynb" = ["E", "F", "PL", "W", "I", "N", "NPY", "RUF", "B"]
[tool.ruff.format]
docstring-code-format = true
[tool.mypy]
warn_unused_configs = true
plugins = "numpy.typing.mypy_plugin"
[[tool.mypy.overrides]]
module = [
"scipy",
"scipy.sparse",
"scipy.sparse.linalg",
"scipy.optimize",
"numpy_groupies"
]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--doctest-modules pyttb"
filterwarnings = [
"ignore:.*deprecated.*:"
]