-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
201 lines (174 loc) · 4.85 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = 'constrainedlr'
version = '0.2.0'
description = 'Constrained Linear Regression with sklearn-compatible API'
readme = 'README.md'
authors = [
{ name = 'Theodore Tsitsimis', email='[email protected]' },
]
license = {file = 'LICENSE'}
requires-python = '>=3.8'
dependencies = [
"numpy>=1.18.0",
"scikit-learn>=1.2.2",
"cvxopt>=1.3.1",
"pandas>=1.2.0",
]
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries',
]
[project.optional-dependencies]
dev = [
"pytest",
"jupyter",
"pre-commit",
"mypy",
"coverage",
"pytest-cov",
"diff_cover",
"ruff",
"build"
]
[project.urls]
"Homepage" = "https://github.com/tsitsimis/constrainedlr"
[tool.setuptools]
packages = ["constrainedlr"]
[tool.ruff]
# Allow lines to be as long as 120.
line-length = 120
# Exclude the following directories from linting.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
".venv",
"*/__init__.py",
]
[tool.ruff.lint]
# Enable the following linters.
select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"W", # pycodestyle warnings
"SIM", # flake8-simplify
"RSE", # flake8-raise
#"PD" uncomment this to enable pandas-vet linter
#"PERF" uncomment this to enable Perflint linter
#"FURB" uncomment this to enable refurb linter
]
# Disable the following linters.
ignore = [
"D200", # One-line docstring should fit on one line
"D211",
"D212",
"D400",
"D401",
"D415", # First line should end with a period, question mark, or exclamation point
"W191", # the following rules come from here: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Unlike Black, do not respect magic trailing commas.
skip-magic-trailing-comma = true
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.ruff.lint.isort]
# Do not split imports into multiple lines when there is a trailing comma.
split-on-trailing-comma = false
[tool.ruff.lint.per-file-ignores]
# A list of mappings from file pattern to rule codes or prefixes to exclude, when considering any matching files.
"__init__.py" = [
"E402",
] # Ignore `E402` (import violations) in all `__init__.py` files
"tests/*" = ["D"] # Ignore pydocstyle errors in all tests
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.coverage.run]
branch = true
relative_files = true
source = ["src"]
omit = [
"**/__init__.py",
]
parallel = true
[tool.coverage.report]
# See more details here https://coverage.readthedocs.io/en/latest/config.html
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
"@(typing(_extensions)?\\.)?overload",
"if (typing(_extensions)?\\.)?TYPE_CHECKING:",
]
ignore_errors = true
include_namespace_packages = true
[tool.mypy]
python_version = 3.11
ignore_missing_imports = true
disallow_untyped_defs = true
exclude = ["tests/"]