-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathpyproject.toml
More file actions
132 lines (119 loc) · 3.92 KB
/
Copy pathpyproject.toml
File metadata and controls
132 lines (119 loc) · 3.92 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
[project]
name = "exca"
readme = "README.md"
authors = [{name = "Meta FAIR"}]
requires-python = ">=3.11"
version = "0.5.29"
description = "Execution and caching tool for python"
dependencies = [
"numpy>=1.19",
"pyyaml>=6.0",
"pydantic>=2.5.0",
"submitit>=1.5.1",
"orjson", # significantly faster than json
]
[project.urls]
Source = "https://github.com/facebookresearch/exca"
Tracker = "https://github.com/facebookresearch/exca/issues"
[project.optional-dependencies]
dev = [
# optional features
"pandas>=2.2.2",
"torch>=2.0.1",
"mne>=1.4.0",
"pybv>=0.7.6",
"nibabel>=5.1.0",
"pyarrow>=17.0.0",
# Test
"pytest>=7.4.0",
"pytest-markdown-docs>=0.5.0",
"psutil>=6.1.1",
"pip",
# Format + lint
"tqdm>=4.65.0",
"ruff>=0.15",
"pre-commit>=3.0.0",
# Type checking
"mypy>=1.11.0",
# typing stubs
"pandas-stubs",
"types-PyYAML",
"types-setuptools",
"types-tqdm",
"types-psutil",
# documentation
"sphinx>=7.4.7",
"pydata-sphinx-theme>=0.15.0",
"sphinx-design>=0.6.0",
"sphinx-copybutton>=0.5.2",
"myst-parser>=3.0.1",
]
[tool.ruff]
line-length = 90
exclude = [
"scratch",
"__editable__",
"docs/pythonplusplus",
"*.ipynb",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"W", # pycodestyle warnings
"A", # flake8-builtins (parity: redefined-builtin)
"B006", # mutable default argument (parity: dangerous-default-value)
"PIE790", # unnecessary-placeholder (rough parity: unnecessary-pass)
]
ignore = [
"E501", # line too long (formatter handles this)
"E712", # == True comparisons (intentional in pandas boolean filtering)
"E722", # bare except (intentional in defensive data-loading code)
"E731", # lambda assignment (common pattern in tests)
"E741", # ambiguous variable name (l, O — intentional in math code)
]
[tool.ruff.lint.isort]
known-first-party = ["exca"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401", # re-exports
"E402", # late imports after version check
]
"test_*.py" = ["F811"] # pytest fixture redefinitions
"**/tests/**" = ["F811"] # pytest fixture redefinitions
"docs*/**/*.py" = [
"A001", # copyright is a standard Sphinx config variable
"E402", # sphinx-gallery import structure
"F811", # sphinx setup function redefinitions
]
[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
include = ["exca*"] # package names should match these glob patterns (["*"] by default)
exclude = [] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
[tool.setuptools.package-data]
# not sufficient in editable mode: https://github.com/python/mypy/issues/13392
# still need to install with: pip install --config-settings editable_mode=strict -e .
"exca" = ["py.typed", ".pyi"]
[tool.pytest.ini_options]
norecursedirs = ["docs/internal"]
addopts = ["--ignore=build", "--ignore=dist"]
[tool.mypy]
plugins = ['pydantic.mypy']
show_error_codes = true
[[tool.mypy.overrides]]
module = ['pytest', 'setuptools', 'cloudpickle', 'mne', 'mne.*', 'nibabel', 'neuralset', 'pyarrow', 'pybv', 'excatest']
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git,.git-meta,.gitignore,.gitattributes,*.css,*.pkl,*.svg,*.pdf,*.min.*'
check-hidden = true
# ignore-regex = ''
# expec: variable name (short for "expected") used in tests
# tring: intentional substring in elided uid hash test fixtures (string=... truncated)
ignore-words-list = 'expec,tring'