Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
92 lines (85 loc) · 4.08 KB
/
Copy pathpyproject.toml
File metadata and controls
92 lines (85 loc) · 4.08 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
[project]
name = "recording-process-job-gui"
version = "0.1.0"
description = "Python helper scripts for the RecordingProcessJobGUI MATLAB app"
requires-python = ">=3.14"
dependencies = [
# datajoint 2.x renamed the config file to datajoint.json and ignores the
# dj_local_conf.json this repo ships, so it cannot connect. 0.14.10 is the
# first 0.14 release without pkg_resources; pin it exactly.
"datajoint==0.14.10",
"element-interface",
"pandas",
"scipy",
]
[tool.uv]
# Supply-chain quarantine: ignore anything published in the last 7 days when
# resolving. A compromised release is usually caught and yanked within days, so
# waiting a week costs little and skips the window when a malicious version is
# most likely to still be up. uv re-evaluates this relative value on every
# resolution, so the window rolls forward on its own. "7 days" is the documented
# friendly-duration form (ISO 8601 "P7D" is equivalent).
#
# Consequence to expect: immediately after an upstream release, `uv lock` will
# decline to pick it up until it is a week old. That is the feature working. To
# take a fresh release deliberately, run
# uv lock --exclude-newer <a timestamp after that upload>
# or add a scoped exemption via `exclude-newer-package`.
exclude-newer = "7 days"
# Pillow 13.0.0 (uploaded 2026-10-16) fixes the TiffDecode / multi-frame loader
# advisories (GHSA-c6hw-5grf-ff96, GHSA-q45j-58j2-45rg, GHSA-v9pv-5gc8-w2m6, ...)
# that fail `uv audit`. Taken before the week is up; drop each entry once that
# release is older than the window.
# certifi 2026.10.19 (uploaded 2026-10-20) drops the emSign roots whose
# intermediate keys were compromised (PYSEC-2026-4320). Same reasoning.
exclude-newer-package = { pillow = "2026-10-17T00:00:00Z", certifi = "2026-10-21T00:00:00Z" }
package = false
preview-features = ["audit-command"]
[dependency-groups]
dev = [
"pytest>=9.1.1",
]
[tool.ruff]
# The scripts run on whatever Python uv provisions for them (PEP 723 headers
# declare >=3.12), so target the oldest one in use rather than requires-python.
target-version = "py312"
[tool.ruff.lint]
extend-select = [
"A", # flake8-builtins: shadowing built-ins
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"T100", # leftover breakpoints / debugger calls
"B", # flake8-bugbear
"SIM", # flake8-simplify
"UP", # pyupgrade
"C4", # flake8-comprehensions
]
ignore = [
"N815", # reference ignore: mixedCase class attributes
"A002", # reference ignore: argument shadows a builtin
"N806", # reference ignore: non-lowercase variable in a function
"E501", # ruff format owns line length; the rest are long paths/URLs in strings
"BLE001", # the helper scripts deliberately catch broad exceptions to stay best-effort
"S110", # same: advisory try/except/pass blocks must never abort a run
]
[tool.ruff.lint.per-file-ignores]
# These scripts chdir / extend sys.path before importing their sibling helpers,
# so the imports cannot move to the top of the file.
"PythonScripts/read_params.py" = ["E402"]
"PythonScripts/register_preparam_steps.py" = ["E402"]
"PythonScripts/upload_params.py" = ["E402", "C408"] # C408: dict(...) calls left as written
# spikeglx and extract_data are imported but unused; they are left alone rather
# than risk dropping an import that has side effects in the IBL environment.
"PythonScripts/prepare_ephys_ibl_data.py" = ["F401", "RUF015"] # RUF015: list(...)[0] raises IndexError when no file matches; next() would raise StopIteration
"PythonScripts/iblapps_version.py" = ["PLW1510"] # subprocess.run result is checked via returncode
"PythonScripts/open_phy.py" = ["SIM103", "PIE810"] # keep the explicit if/return and startswith chain as written
"PythonScripts/tests/test_open_phy_cache_path.py" = ["ISC004"] # implicit string concatenation in a list is intentional
[tool.pytest.ini_options]
minversion = "9.0"
addopts = ["-ra", "--showlocals", "--strict-config", "--strict-markers", "--import-mode=importlib"]
xfail_strict = true
log_level = "INFO"
testpaths = ["tests"]
filterwarnings = ["error"]