Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
executable file
·191 lines (173 loc) · 5.23 KB
/
Copy pathpyproject.toml
File metadata and controls
executable file
·191 lines (173 loc) · 5.23 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
[build-system]
# Define build dependencies and backend
requires = ["setuptools>=61", "build"]
build-backend = "setuptools.build_meta"
[project]
name = "torchsig"
description = "Signal Processing Machine Learning Toolkit"
authors = [
{name = "TorchSig Team"},
]
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
license-files = ["LICENSE.md"]
keywords = ["signal processing", "machine learning"]
dynamic = ["version"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
# === RUNTIME DEPENDENCIES (What the end-user needs) ===
dependencies = [
# Core Libraries
"torch",
"torchaudio",
"lightning",
"tqdm",
"numpy>=2",
"scipy",
"h5py",
"matplotlib",
"PyYAML",
"opencv-python>=4.10",
"numba>=0.60",
"soundfile",
]
# === OPTIONAL DEVELOPMENT DEPENDENCIES (What developers need) ===
[project.optional-dependencies]
dev = [
"torchsig[docs]",
# Testing & Linting
"pytest",
"pylint",
"pytest-cov",
"pytest-benchmark",
"pytest-xdist",
"ruff",
"pygal",
"pre-commit",
]
docs = [
"Sphinx>=7.2,<10",
"sphinx-rtd-theme>=3.1,<4",
"sphinxcontrib-jquery>=4,<5",
"six==1.17.0",
"numba==0.67.0",
"better-apidoc>=0.3.2"
]
notebooks = [
"jupyter",
"nbconvert",
"nbclient",
"notebook",
"ipykernel",
"ipywidgets",
"nb-clean",
"tqdm",
"sigmf",
]
examples = [
"torchsig[notebooks]",
"opencv-python>=4.10",
]
[project.urls]
Homepage = "https://torchsig.com/"
Documentation = "https://torchsig.readthedocs.io/en/latest/index.html"
Repository = "https://github.com/TorchDSP/torchsig.git"
Issues = "https://github.com/TorchDSP/torchsig/issues"
[tool.setuptools.packages.find]
where = ["."]
[tool.setuptools.dynamic]
# Dynamically read version from torchsig.__version__
version = {attr = "torchsig.__version__"}
[tool.coverage.run]
branch = true
source = ["torchsig"]
[tool.coverage.report]
show_missing = true
skip_covered = true
omit = []
[tool.pytest.ini_options]
markers = [
"full: marks tests as full (run with --full option)",
"slow: skipped in fast mode",
"slow_no_gpu: skipped in fast mode only when no GPU is available",
]
# addopts = "-m 'not full' --cov=torchsig --cov-report=xml --cov-report=term-missing --junitxml=report.xml"
addopts = "-m 'not full'"
testpaths = ["tests", "benchmarks"]
python_files = ["benchmark_*.py", "test_*.py"]
python_functions = ["test_*", "benchmark_*"]
[tool.ruff]
line-length = 200
target-version = "py310"
exclude = ["docs"]
[tool.ruff.lint]
# Enable all rules by default
select = ["ALL"]
# Ignore specific rules
ignore = [
"ANN", # flake8-annotations
"COM", # flake8-commas
"C90", # mccabe complexity
"DJ", # django
"EXE", # flake8-executable
"T10", # debugger
"TID", # flake8-tidy-imports
"B006", # Do not use mutable data structures for argument defaults
"E501", # Line too long (handled by line-length)
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D107", # Missing docstring in __init__
"D204", # 1 blank line required after class docstring
"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
"D413", # Missing blank line after last section
"D415", # First line should end with a period, question mark, or exclamation point
"D417", # Missing argument description in the docstring for `__init__`: `**kwargs`
"C901", # Function too complex
"PLR0913", # Too many arguments
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"PLW2901", # Redefined loop name
"ANN101", # Missing type annotation for self
"ANN102", # Missing type annotation for cls
"TD002", # Missing author in TODO
"TD003", # Missing issue link in TODO
"TRY003", # external messages in exceptions are too verbose
"FIX002", # Line contains TODO
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"E722", # Do not use bare `except`
"EM101", # Exception must not use a string literal
"EM102", # Exception must not use an f-string literal
"G004", # Logging statement uses f-string
"COM812", # Trailing comma missing
"ISC001", # Implicitly concatenated string literals
"D203", # One blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"T201", # `print` found
]
[tool.ruff.format]
# Enable auto-formatting
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.ruff.lint.per-file-ignores]
# Ignore specific rules for test files
"tests/*" = [
"S101", # Use of assert
"PLR2004", # Magic value used in comparison
"ARG001", # Unused function argument
"D103", # Missing docstring in public function
]
"benchmarks/*" = [
"S101", # Use of assert
"PLR2004", # Magic value used in comparison
"ARG001", # Unused function argument
"D102", # Missing docstring in public function
]