-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
260 lines (248 loc) · 9.22 KB
/
pyproject.toml
File metadata and controls
260 lines (248 loc) · 9.22 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
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
[build-system]
requires = [
"setuptools>=64",
"wheel",
"pybind11>=2.11",
]
build-backend = "setuptools.build_meta"
[project]
name = "vbpca_py"
version = "0.2.0"
description = "Variational Bayesian PCA (Ilin & Raiko 2010) with support for missing data and missing entries."
readme = "README.md"
license = "MIT"
authors = [
{ name = "Joshua Macdonald", email = "jmacdo16@jh.edu" },
{ name = "Shany Naim", email = "shany215.sn@gmail.com" },
{ name = "Yoav Ram", email = "yoav@yoavram.com" },
]
maintainers = [
{ name = "Yoav Ram Lab", email = "yoav@yoavram.com" },
]
requires-python = ">=3.11,<3.15"
keywords = [
"pca",
"dimensionality-reduction",
"bayesian",
"missing-data",
"variational-inference",
"machine-learning",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: C++",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
"Operating System :: OS Independent",
]
dependencies = [
"numpy>=1.24",
"scipy>=1.10",
]
[project.urls]
Homepage = "https://github.com/yoavram-lab/VBPCApy"
Repository = "https://github.com/yoavram-lab/VBPCApy"
Issues = "https://github.com/yoavram-lab/VBPCApy/issues"
Changelog = "https://github.com/yoavram-lab/VBPCApy/releases"
[project.optional-dependencies]
dev = [
"hypothesis>=6.100",
"pytest>=8.0",
"pytest-benchmark>=4.0",
"pytest-cov>=4.0",
"ruff>=0.3.0",
"mypy>=1.8.0",
"scipy-stubs>=1.17.1.0",
]
publish = [
"build>=1.0",
"twine>=5.0",
"cibuildwheel>=2.22",
]
plot = ["matplotlib>=3.7"]
data = ["pandas>=1.5"]
analysis = [
"matplotlib>=3.7",
"pandas>=1.5",
"scikit-learn>=1.3",
]
# For running legacy Octave/Matlab-based helpers or tests; requires Octave installed.
octave = ["oct2py>=5.6"]
benchmark = [
"joblib>=1.3",
"matplotlib>=3.7",
"pandas>=1.5",
"scikit-learn>=1.3",
"seaborn>=0.13",
]
docs = [
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.24",
"pymdown-extensions>=10.0",
]
[tool.setuptools.packages.find]
where = ["src"]
include = ["vbpca_py*"]
exclude = ["tests*"]
[tool.coverage.run]
omit = [
"src/vbpca_py/plotting.py", # optional-dependency module (matplotlib)
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = """
-ra
--strict-markers
-m "not perf and not octave"
"""
markers = [
"perf: performance benchmarks (run explicitly with -m perf)",
"octave: Octave/Matlab parity tests (run explicitly with -m octave)",
]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 72
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # Missing trailing comma (formatter handles it)
"CPY001", # No copyright header
"D203", # 1 blank line before class docstring
"D212", # Multi-line docstring summary on first line
"PLR2004", # Magic numbers
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = [
"ANN", # Type annotations not required in tests
"ARG001", # Unused arguments (fixtures, parametrize)
"ARG005", # Unused lambda arguments
"B017", # assertRaises without match OK in tests
"BLE001", # Blind except OK for robustness tests
"D", # Docstring rules not enforced in tests
"DOC201", # Missing return in docstring OK in tests
"DOC501", # Missing raises in docstring OK in tests
"E741", # Ambiguous variable names (l, I) OK in tests
"EM101", # String literal in exception OK in tests
"EM102", # f-string in exception OK in tests
"ERA001", # Commented-out code OK in tests
"FBT001", # Boolean positional args OK in tests
"FBT002", # Boolean default args OK in tests
"INP001", # Implicit namespace package
"N803", # Uppercase argument names in tests
"N806", # Uppercase matrix-style symbols in tests
"PLC0415", # Lazy imports OK in tests
"PLC1901", # Empty string comparison OK in tests
"PLC2701", # Importing private modules is OK in tests
"PLR0913", # Many arguments in test helpers
"PLR0914", # Many locals in test scaffolding
"PLR0915", # Too many statements in test functions
"PLR0917", # Too many positional arguments
"PLR6301", # Method could be function (test class methods)
"PLW2901", # Redefining loop variable OK in tests
"PT011", # pytest.raises match= not required
"PT019", # Fixture without value OK for setup
"RUF001", # Ambiguous unicode OK (test data)
"RUF002", # Ambiguous unicode OK (test data)
"RUF003", # Ambiguous unicode OK (test data)
"RUF012", # Mutable class variable annotations
"RUF034", # Useless if-else OK in test clarity
"S101", # Use of assert in tests
"S108", # Temp file paths OK in tests
"S110", # try-except-pass OK in robustness tests
"S301", # pickle OK in tests
"S403", # pickle import OK in tests
"S404", # subprocess import OK in tests
"S603", # subprocess call OK in tests
"S607", # Partial executable path OK in tests
"SLF001", # Private member access OK in tests
"TRY003", # Long exception messages OK in tests
"TRY300", # try-except-return OK in tests
]
"scripts/**/*" = [
"ANN", # Type annotations not required in scripts
"B023", # Loop variable binding OK in benchmarks
"BLE001", # Blind except OK in scripts
"C901", # Complex functions OK in scripts
"D", # Docstring rules not enforced in scripts
"E501", # Long lines OK in scripts
"EM101", # String literal in exception OK in scripts
"EM102", # f-string in exception OK in scripts
"EXE001", # Shebang presence not required
"FBT001", # Boolean positional args OK in scripts
"INP001", # Implicit namespace package
"PLC0206", # Dict without .items() OK in scripts
"PLC0415", # Lazy imports OK in scripts
"PLC1901", # Empty string comparison OK in scripts
"PLC2701", # Private name import OK in scripts
"PLR0913", # Many arguments OK in scripts
"PLR0914", # Many locals OK in scripts
"PLR0917", # Many positional args OK in scripts
"PLR1702", # Nested blocks OK in scripts
"PLR5501", # Collapsible else OK in scripts
"PLR6104", # Augmented assignment OK in scripts
"RUF001", # Ambiguous unicode OK in scripts
"RUF003", # Ambiguous unicode OK in scripts
"RUF046", # Redundant int cast OK in scripts
"S404", # subprocess import OK in scripts
"S603", # subprocess call OK in scripts
"S607", # Partial executable path OK in scripts
"SIM102", # Collapsible if OK in scripts
"T201", # print() OK in scripts
"TC003", # Type-checking imports OK in scripts
"TRY003", # Long exception messages OK in scripts
"TRY004", # TypeError preference OK in scripts
"SLF001", # Private member access (intentional for monkey-patching in diagnostics)
"PLR0915", # Too many statements (diagnostic scripts with many print calls)
]
"analysis/**/*" = [
"ANN", # Type annotations not required in analysis
"ARG001", # Unused arguments OK in analysis (callbacks, interfaces)
"ARG002", # Unused method arguments OK in analysis (scorer interface)
"B905", # zip() strict= not required in analysis
"BLE001", # Blind except OK in analysis
"C901", # Complex functions OK in analysis
"D", # Docstring rules not enforced in analysis
"DOC201", # Missing return in docstring OK in analysis
"DOC501", # Missing raises in docstring OK in analysis
"E501", # Long lines OK in analysis
"EM101", # String literal in exception OK in analysis
"EM102", # f-string in exception OK in analysis
"EXE001", # Shebang presence not required
"F841", # Unused local OK in analysis (intermediate results)
"FBT001", # Boolean positional args OK in analysis
"FBT002", # Boolean default args OK in analysis
"INP001", # Implicit namespace package
"N806", # Uppercase variable names OK (matrix convention: W, S)
"PLC0415", # Lazy imports OK in analysis
"PLR0913", # Many arguments OK in analysis
"PLR0914", # Many locals OK in analysis
"PLR0915", # Too many statements OK in analysis
"PLR0917", # Many positional args OK in analysis
"PLR6301", # Method could be function OK in analysis (scorer API)
"PLW1514", # Explicit encoding not required in analysis
"RUF001", # Ambiguous unicode OK in analysis
"RUF002", # Ambiguous unicode OK in analysis
"RUF003", # Ambiguous unicode OK in analysis
"RUF046", # Redundant int cast OK in analysis (defensive rounding)
"T201", # print() OK in analysis scripts
"TRY003", # Long exception messages OK in analysis
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.uv]
environments = ["python_version >= '3.11' and python_version < '3.15'"]
[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = false
show_error_codes = true