-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpyproject.toml
More file actions
248 lines (225 loc) · 5.89 KB
/
pyproject.toml
File metadata and controls
248 lines (225 loc) · 5.89 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
[project]
name = "HSSM"
version = "0.3.0"
description = "Bayesian inference for hierarchical sequential sampling models."
authors = [
{ name = "Alexander Fengler", email = "alexander_fengler@brown.edu" },
{ name = "Paul Xu", email = "yang_xu@brown.edu" },
{ name = "Carlos Paniagua", email = "carlos_paniagua@brown.edu" },
{ name = "Krishn Bera", email = "krishn_bera@brown.edu" },
{ name = "Aisulu Omar", email = "aisulu_omar@brown.edu" },
{ name = "Michael Frank", email = "michael_frank@brown.edu" },
]
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["HSSM", "sequential sampling models", "bayesian", "bayes", "mcmc"]
requires-python = ">=3.11,<3.14"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"absl-py>=2.3.1",
"arviz>=0.22.0",
"bambi>=0.17.2",
"cloudpickle>=3.0.0",
"hddm-wfpt>=0.1.6",
"huggingface-hub>=0.34.0",
"jaxonnxruntime>=0.3.0",
"numpyro>=0.19",
"onnx>=1.16.0",
"pandas>=2.2,<3",
"pymc>=5.26.0",
"seaborn>=0.13.2",
"ssm-simulators>=0.12.2",
"tqdm>=4.66.0",
]
[project.urls]
homepage = "https://lnccbrown.github.io/HSSM/"
documentation = "https://lnccbrown.github.io/HSSM/"
repository = "https://github.com/lnccbrown/HSSM"
[project.optional-dependencies]
cuda12 = ["jax[cuda12]>=0.5.2"]
[dependency-groups]
dev = [
"coverage>=7.6.4",
"mypy>=1.11.1",
"pytest-cov>=6.0.0",
"pytest-xdist>=3.6.1",
"pytest>=8.3.1",
"pytest-random-order>=1.1.1",
"pytest-rerunfailures>=15.0",
"pytest-timeout>=2.3.1",
"ruff>=0.15.0",
"types-PyYAML",
"pre-commit>=4.1.0",
"onnxruntime>=1.17.1",
]
notebook = [
"graphviz>=0.20.3",
"ipykernel>=6.29.5",
"ipython>=8.31.0",
"ipywidgets>=8.1.2",
"jupyterlab>=4.2.4",
"mistune>=3.0.2",
"nbconvert>=7.16.5",
"nb-clean>=4.0.1",
"nbval>=0.11.0",
"ptpython>=3.0.29",
"pyarrow>=20.0.0",
"lanfactory>=0.6.1",
"zeus-mcmc>=2.5.4",
"bayesflow>=2.0.10",
"keras>=3",
]
docs = [
"mkdocs-material>=9.5.21",
"mkdocs>=1.6.0",
"mkdocs-jupyter>=0.25.1",
"mkdocstrings-python>=1.10.0",
]
[tool.ruff]
line-length = 88
target-version = "py310"
exclude = ["*.ipynb"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
unfixable = ["E711"]
select = [
# pydocstyle
"D",
# pyflakes
"F",
# pycodestyle
"E",
"I",
"W",
# flake8-2020
"YTT",
# flake8-bugbear
"B",
# flake8-quotes
"Q",
# pylint
"PLE",
"PLR",
"PLW",
# misc lints
"PIE",
# flake8-pyi
"PYI",
# tidy imports
"TID",
# type-checking imports
"TCH",
]
ignore = [
# space before : (needed for how black formats slicing)
# "E203", # not yet implemented
# module level import not at top of file
"E402",
# do not assign a lambda expression, use a def
"E731",
# line break before binary operator
# "W503", # not yet implemented
# line break after binary operator
# "W504", # not yet implemented
# controversial
"B006",
# controversial
"B007",
# controversial
"B008",
# setattr is used to side-step mypy
"B009",
# getattr is used to side-step mypy
"B010",
# tests use assert False
"B011",
# tests use comparisons but not their returned value
"B015",
# false positives
"B019",
# Loop control variable overrides iterable it iterates
"B020",
# Function definition does not bind loop variable
"B023",
# zip()` without an explicit `strict=
"B905",
# Functions defined inside a loop must not use variables redefined in the loop
# "B301", # not yet implemented
# Too many arguments to function call
"PLR0913",
# Too many returns
"PLR0911",
# Too many branches
"PLR0912",
# Too many statements
"PLR0915",
# Global statements are discouraged
"PLW0603",
# Implement of __eq__ without __hash__ function
"PLW1641",
# Docstrings should not be included in stubs
"PYI021",
# Use typing_extensions.TypeAlias for type aliases
# "PYI026", # not yet implemented
# Use "collections.abc.*" instead of "typing.*" (PEP 585 syntax)
# "PYI027", # not yet implemented
# while int | float can be shortened to float, the former is more explicit
# "PYI041", # not yet implemented
# Additional checks that don't pass yet
# Within an except clause, raise exceptions with ...
"B904",
# Magic number
"PLR2004",
# Consider `elif` instead of `else` then `if` to remove indentation level
"PLR5501",
# Ignore "Use `float` instead of `int | float`."
"PYI041",
# Allow importing from parent modules
"TID252",
]
exclude = [".github", "docs", "notebook", "tests/*"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.mypy]
ignore_missing_imports = true
[tool.pytest]
[tool.pytest.ini_options]
testpaths = ["tests"]
log_cli = true
log_cli_level = "INFO" # set minimum log level for console output
addopts = [
"--cov=.",
"--cov-report=term-missing",
"--cov-report=xml",
"--exitfirst",
"--capture=no",
"--timeout=360",
"--reruns=2",
"--reruns-delay=5",
]
markers = [
"slow: marks tests as slow (add --runslow option to run these tests)",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
exclude = [
"docs/**", # remove all docs content from the source tarball
]
[tool.hatch.build.targets.wheel]
packages = ["src/hssm"] # keep as-is so only package code goes into the wheel
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple/"
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"