Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (94 loc) · 3.02 KB
/
Copy pathpyproject.toml
File metadata and controls
110 lines (94 loc) · 3.02 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
[project]
name = "rehline"
dynamic = ["version"]
description = "Regularized Composite ReLU-ReHU Loss Minimization with Linear Computation and Linear Convergence"
authors = [
{name = "Ben Dai", email = "bendai@cuhk.edu.hk"},
{name = "Yixuan Qiu", email = "yixuanq@gmail.com"}
]
maintainers = [
{name = "Ben Dai", email = "bendai@cuhk.edu.hk"},
]
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">= 3.10"
dependencies = [
"numpy >= 1.23.5",
"scipy >= 1.11.4",
"scikit-learn >= 1.6.0"
]
[tool.setuptools_scm]
[project.urls]
homepage = "https://rehline.github.io/"
repository = "https://github.com/softmin/ReHLine-python"
documentation = "https://rehline-python.readthedocs.io/en/latest/index.html"
[tool.cibuildwheel]
# Release only the Python versions and native platforms covered by CI.
# Excludes musllinux (no scikit-learn wheels), free-threaded Python, and
# untested architectures. Update this list together with the CI matrix.
build = "cp3{10,11,12,13,14}-{manylinux_x86_64,macosx_arm64,win_amd64}"
test-extras = ["test"]
test-command = "python {project}/tools/test_installed.py"
[tool.cibuildwheel.linux]
archs = ["x86_64"]
[tool.cibuildwheel.macos]
archs = ["arm64"]
[tool.cibuildwheel.windows]
# Supported SciPy versions provide Windows x86-64 wheels, not win32 wheels.
archs = ["AMD64"]
[project.optional-dependencies]
test = ["pytest >= 7.0", "pandas >= 1.5.0", "pytest-cov"]
benchmark = ["cvxpy >= 1.6.0"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "--cov=rehline --cov-report=term-missing"
filterwarnings = ["error::sklearn.exceptions.ConvergenceWarning"]
markers = [
"numerical_stress: fixed-budget accuracy on ill-conditioned problems or strict external output comparisons; run separately from routine CI",
]
[build-system]
requires = ["pybind11 ~= 3.0.0", "setuptools >= 80.0.0", "wheel >= 0.42.0", "setuptools-scm >= 8.0"]
build-backend = "setuptools.build_meta"
# --- Coverage ---
[tool.coverage.run]
source = ["rehline"]
omit = ["rehline/_internal*"]
relative_files = true
[tool.coverage.paths]
source = [
"rehline/",
"*/site-packages/rehline/",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]
# --- Ruff (linter + formatter) ---
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort (import sorting)
"B", # flake8-bugbear (includes B006 mutable defaults)
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (let formatter handle it)
"B905", # zip without strict= (Python 3.10+)
"F401", # unused imports (re-export from __init__.py)
]
[tool.ruff.lint.isort]
known-first-party = ["rehline"]
# --- Codespell (typo checker) ---
[tool.codespell]
skip = "*.so,*.cpp,*.h,*.zip,*.html,*.ipynb,eigen-*,build,dist,.git,.ipynb_checkpoints"
ignore-words-list = "nd,hist,bu,bi,ans,coo"