-
-
Notifications
You must be signed in to change notification settings - Fork 510
Expand file tree
/
Copy pathpyproject.toml
More file actions
226 lines (202 loc) · 4.94 KB
/
pyproject.toml
File metadata and controls
226 lines (202 loc) · 4.94 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "neurokit2"
dynamic = ["version"]
description = "The Python Toolbox for Neurophysiological Signal Processing."
readme = "README.rst"
requires-python = ">=3.10"
license = {text = "MIT License"}
authors = [
{name = "Dominique Makowski", email = "D.Makowski@sussex.ac.uk"},
{name = "Tam Pham"},
{name = "Zen Juen Lau"},
{name = "Jan C. Brammer"},
{name = "François Lespinasse"}
]
keywords = ["NeuroKit2", "physiology", "bodily signals", "Python", "ECG", "EDA", "EMG", "PPG"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14"
]
dependencies = [
"requests",
"numpy>=2.0.0",
"pandas<3.0.0",
"scipy",
"scikit-learn>=1.0.0",
"matplotlib>=3.5.0",
"PyWavelets>=1.4.0",
"setuptools<82.0.0",
]
[project.optional-dependencies]
full = [
"bioread",
"joblib",
"pyxdf",
"opencv-python",
"pillow",
"tabulate",
"PyEMD",
"menpo",
"menpodetect",
"pyrqa",
"mne",
"plotly",
"ts2vg",
"cvxopt",
]
[dependency-groups]
# Dependencies for running tests
test = [
"pytest",
"pytest-cov",
"pytest-xdist",
"coverage",
"codecov",
"pyentrp",
"antropy",
"EntropyHub",
"nolds<=0.6.2",
"biosppy==0.6.1",
"cvxopt",
"EMD-signal",
"numba>=0.61.0",
"llvmlite>=0.44.0",
"astropy",
"wfdb",
"neurokit2[full]",
]
# Dependencies for building documentation
docs = [
"sphinx",
"sphinx-book-theme",
"sphinxemoji",
"sphinx-copybutton",
"ipykernel",
"ipython",
"myst-parser",
"myst-nb",
"seaborn",
"pickleshare",
"neurokit2[full]",
{ include-group = "test" },
]
# General development tools
dev = [
"invoke",
"bumpversion",
"sphinx",
"twine",
"tox",
"tox-uv",
"ruff",
"pre-commit",
"yapf",
"neurokit2[full]",
{ include-group = "docs" },
{ include-group = "test" },
]
[project.urls]
Homepage = "https://github.com/neuropsychology/NeuroKit"
Repository = "https://github.com/neuropsychology/NeuroKit"
Documentation = "https://neuropsychology.github.io/NeuroKit/"
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
[tool.hatch.build.targets.wheel]
packages = ["neurokit2"]
[tool.hatch.build.hooks.vcs]
version-file = "neurokit2/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
"/.direnv",
"/.venv*",
"/.tox",
"/.pytest_cache",
"/.python_cache",
"/.coverage",
"/coverage.xml",
"/data",
"/flake.nix",
"/flake.lock",
"tests/",
"docs/"
]
[tool.uv]
managed = true
package = true
python-downloads = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["tests_*.py"]
python_functions = ["test_*"]
addopts = """
-n auto
--doctest-modules
--doctest-glob='*.py'
--cov=neurokit2
--cov-append
--cov-report=xml
-v
"""
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]
[tool.tox]
env_list = ["py310", "py311", "py312", "py313", "py314"]
requires = ["tox-uv>=1.22.2"]
[tool.tox.env_run_base]
runner = "uv-venv-runner"
base_python = ["{env_name}"]
dependency_groups = ["dev"]
extras = ["full"]
passenv = ["LD_LIBRARY_PATH"]
commands = [
[
"{envbindir}/pytest",
"-v",
"--dist", "loadscope",
"neurokit2",
"tests"
]
]
# Style
[tool.ruff]
line-length = 127
target-version = "py310"
# Why was this excluded before in style workflow?
extend-exclude = ["neurokit2/complexity/__init__.py"]
[tool.ruff.lint]
# E/W = pycodestyle, F = pyflakes, I = isort, UP = pyupgrade, PL = pylint
select = ["E", "W", "F", "I", "UP", "PL"]
ignore = [
"E712", # Allow 'if x == True'
"C901", # Ignore complexity (neuroscience code is naturally complex)
"PLR0912", # Too many branches
"PLR0913", # Too many arguments (limit bumped to 10 below)
"PLR0915", # Too many statements
"PLR0914", # Too many local variables
"PLC0415", # Allow imports inside functions (useful for heavy optional dependencies)
"PLR2004", # Allows magic values in comparisons
"PLR0911", # Allows many return statements in a function e.g., in data.py
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"] # Allow import * and unused imports in the init files
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.lint.isort]
lines-after-imports = 2
known-first-party = ["neurokit2"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false