-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
94 lines (80 loc) · 2.3 KB
/
pyproject.toml
File metadata and controls
94 lines (80 loc) · 2.3 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
[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.2.2"
]
[tool.setuptools_scm]
tag_prefix = "v"
[pyproject.urls]
homepage = "https://rehline.github.io/"
repository = "https://github.com/softmin/ReHLine-python"
documentation = "https://rehline-python.readthedocs.io/en/latest/index.html"
[tool.setuptools]
py-modules = ["build"]
[tool.cibuildwheel]
# Only build on CPython
build = "cp*"
[project.optional-dependencies]
test = ["pytest >= 7.0", "pandas >= 1.5.0", "pytest-cov"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "--cov=rehline --cov-report=term-missing"
[build-system]
requires = ["requests ~= 2.31.0", "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"