-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
171 lines (157 loc) · 4.38 KB
/
Copy pathpyproject.toml
File metadata and controls
171 lines (157 loc) · 4.38 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["version"]
name = "spd_learn"
description = "Deep Riemannian Learning for Symmetric Positive Definite matrices"
authors = [{ name = "Bruno Aristimunha", email = "b.aristimunha@gmail.com" }]
maintainers = [
{ name = "Bruno Aristimunha", email = "b.aristimunha@gmail.com" },
]
keywords = [
"python",
"deep-learning",
"pytorch",
"spdnet",
"torch",
]
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Development Status :: 3 - Alpha",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"torch",
"einops",
"numpy",
# Array API support (torch backend) lives on pyriemann master / 0.12.
# Hard-pinned to git until 0.12 is released on PyPI. NOTE: a direct-URL
# dependency blocks uploading spd_learn to PyPI; swap to "pyriemann>=0.12"
# once 0.12 ships.
"pyriemann @ git+https://github.com/pyRiemann/pyRiemann.git",
]
[project.optional-dependencies]
tests = [
# pytest 9.1 changed IdMaker's signature, which pytest_cases (<= 3.10.1)
# still calls the old way -> TypeError at collection time. Cap pytest until
# pytest_cases ships 9.1 support.
'pytest<9.1',
'pytest-cov',
'pytest-codeblocks',
'sybil',
'codecov',
'pytest_cases',
'mypy',
]
docs = [
'sphinx',
'pydata-sphinx-theme',
'sphinx_gallery',
'sphinx-copybutton',
'sphinx-sitemap',
'sphinxext-opengraph',
'sphinxcontrib-bibtex',
'numpydoc',
'memory_profiler',
'ipython',
'sphinx_design',
'sphinx-autodoc-typehints',
'hydra-core',
'omegaconf',
'nbformat',
]
brain = [
'moabb',
'braindecode',
'nilearn',
'skada',
]
dev = [
'spd_learn[tests]',
'pre-commit',
'ruff',
'mypy',
'rich', # For enhanced logging
'types-PyYAML',
'types-requests',
]
all = [
'spd_learn[tests]',
'spd_learn[docs]',
'spd_learn[brain]',
'spd_learn[dev]',
]
[tool.setuptools]
[tool.setuptools.dynamic]
version = {attr = "spd_learn.version.__version__"}
[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
include = ["spd_learn*"] # 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.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "W", "I"] # Include isort rules (I)
ignore = []
[tool.ruff.lint.per-file-ignores]
# Sphinx-gallery examples have imports throughout the file
"examples/**/*.py" = ["E402", "E501"]
"docs/**/*.py" = ["E402", "E501", "F841"]
# Tests can have long lines for assertions and descriptive messages
"tests/**/*.py" = ["E501"]
# Allow long lines in functional modules (math formulas in docstrings)
"spd_learn/functional/**/*.py" = ["E501"]
"spd_learn/modules/**/*.py" = ["E501"]
# GitHub scripts
".github/**/*.py" = ["E501"]
[tool.ruff.lint.isort]
known-first-party = ["spd_learn"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
lines-between-types = 1
lines-after-imports = 2
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"gpu: marks tests that require GPU",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.coverage.run]
source = ["spd_learn"]
branch = true
omit = [
"*/tests/*",
"*/__init__.py",
"*/version.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]