-
Notifications
You must be signed in to change notification settings - Fork 22
/
pyproject.toml
192 lines (176 loc) · 5.31 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
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "iblrig"
description = "The International Brain Laboratory's decision making task"
dynamic = [ "version" ]
keywords = [ "IBL", "neuro-science" ]
requires-python = "==3.10.*"
license = { file = "LICENSE" }
readme = "README.md"
dependencies = [
# WARNING: DEPENDENCIES ARE MANAGED THROUGH PDM.
# Please refer to https://pdm-project.org/en/latest/usage/dependency/ for details.
#
# These packages are currently PINNED!
"PyQt5==5.15.10",
"PyQt5-Qt5==5.15.2",
"PyQtWebEngine==5.15.6",
"PyQtWebEngine-Qt5==5.15.2",
#
# IBL packages
"iblatlas>=0.5.5",
"ibllib>=3.1.0",
"iblpybpod @ git+https://github.com/int-brain-lab/iblpybpod.git@no-gui",
"iblutil>=1.14.0",
"iblqt>=0.3.1",
"ONE-api>=2.11.1",
"tycmd-wrapper>=0.2.1",
#
# Everything else
"annotated-types>=0.7.0",
"graphviz>=0.20.3",
"ipython>=8.26.0",
"matplotlib>=3.9.2",
"numpy<2.0.0",
"packaging>=24.1",
"pandas>=2.2.3",
"pandera>=0.20.4",
"pydantic>=2.9.2",
"pyqtgraph>=0.13.7",
"python-osc>=1.8.3",
"pyusb>=1.2.1",
"PyYAML>=6.0.2",
"scipy>=1.14.1",
"sounddevice>=0.5.0",
]
[project.optional-dependencies]
project-extraction = [
"project-extraction @ git+https://github.com/int-brain-lab/project_extraction.git",
]
[project.scripts]
view_session = "iblrig.commands:view_session"
transfer_data = "iblrig.commands:transfer_data_cli"
transfer_video_data = "iblrig.commands:transfer_video_data_cli"
transfer_ephys_data = "iblrig.commands:transfer_ephys_data_cli"
flush = "iblrig.commands:flush"
remove-old-sessions = "iblrig.commands:remove_local_sessions"
iblrig = "iblrig.gui.wizard:main"
upgrade_iblrig = "iblrig.upgrade_iblrig:upgrade"
install_spinnaker = "iblrig.video:install_spinnaker"
install_pyspin = "iblrig.video:install_pyspin"
start_video_session = "iblrig.video:prepare_video_session_cmd"
start_ephys_session = "iblrig.ephys:prepare_ephys_session_cmd"
start_neurophotometrics = 'iblrig.neurophotometrics:start_workflow_cmd'
start_photometry_task = 'iblrig.neurophotometrics:start_photometry_task_cmd'
convert_uis = "iblrig.gui.tools:convert_uis"
validate_iblrig = "iblrig.hardware_validation:run_all_validators_cli"
validate_video = "iblrig.video:validate_video_cmd"
[tool.pdm.version]
source = "file"
path = 'iblrig/__init__.py'
[tool.pdm.build]
source-includes = [ "docs", "iblrig/test" ]
excludes = [ "docs/build" ]
[tool.pdm.dev-dependencies]
dev = [
"iblrig[doc,test,typing]",
"deadcode>=2.4.1",
]
test = [
"pytest>=8.3.2",
"pytest-cov>=6.0.0",
"ruff>=0.7.3",
]
doc = [
"sphinx>=7.4.7",
"sphinx-autobuild>=2024.4.16",
"sphinx-lesson>=0.8.19",
"sphinx-simplepdf>=1.6.0",
"myst-parser>=4.0.0",
]
typing = [
"mypy>=1.13.0",
"PyQt5-stubs>=5.15.6.0",
"types-PyYAML>=6.0.12.20240808",
"types-requests>=2.32.0.20240712",
"types-python-dateutil>=2.9.0.20240316",
"types-pyserial>=3.5.0.20240826",
]
ci = [
"pytest-github-actions-annotate-failures>=0.2.0",
]
[tool.mypy]
files = [ "iblrig/[!test]**/*.py", "iblrig_tasks/**/*.py" ]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "-ra --showlocals --cov --cov-report=html --cov-report=xml --tb=short"
minversion = "6.0"
testpaths = [ "iblrig/test" ]
python_files = [ "test_*.py" ]
filterwarnings = [ "ignore::DeprecationWarning:nptyping.*" ]
[tool.ruff]
exclude = [
".mypy_cache",
"dist",
"docs",
"iblrig/gui/*_rc.py",
"iblrig/gui/ui_*.py",
"venv",
]
indent-width = 4
line-length = 130
target-version = "py310"
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"E", # pycodestyle Error
"W", # pycodestyle Warning
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
"PL", # pylint
"SIM", # flake8-simplify
"UP", # pyupgrade
"D", # pydocstyle
]
ignore = [
# TODO: The following entries should be gradually removed / fixed:
"PLR0912", # Too many branches
"PLR0913", # Too many arguments
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"D401", # First line of docstring should be in imperative mood
]
[tool.ruff.lint.per-file-ignores]
"iblrig/gui/**" = [
"N802", # Invalid function name
"N803", # Argument name should be lowercase
"N815", # Mixed case variable in class scope
]
"iblrig/test/**" = [
"D", # pydocstyle
]
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.isort]
known-first-party = [ "ibl*", "one*", "pybpod*", "tycmd" ]
[tool.deadcode]
exclude = [ "docs", "venv", ".venv" ]
[tool.coverage.run]
source_pkgs = [ "iblrig", "iblrig_tasks" ]
omit = [ "iblrig/test/*" ]
relative_files = true
[tool.coverage.report]
skip_empty = true