|
1 | | -[tool.black] |
| 1 | +[build-system] |
| 2 | +requires = ["setuptools>=61.0", "wheel"] |
| 3 | +build-backend = "setuptools.build_meta" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "speechbrain" |
| 7 | +dynamic = ["version"] |
| 8 | +description = "All-in-one speech toolkit in pure Python and Pytorch" |
| 9 | +readme = "README.md" |
| 10 | +license = {text = "Apache-2.0"} |
| 11 | +authors = [ |
| 12 | + {name = "Mirco Ravanelli, Titouan Parcollet, Adel Moumen, Sylvain de Langen, Cem Subakan, Peter Plantinga, Yingzhi Wang, Pooneh Mousavi, Luca Della Libera, Artem Ploujnikov, Francesco Paissan, Davide Borra, Salah Zaiem, Zeyu Zhao, Shucong Zhang, Georgios Karakasidis, Sung-Lin Yeh, Pierre Champion, Aku Rouhe, Rudolf Braun, Florian Mai, Juan Zuluaga-Gomez, Seyed Mahed Mousavi, Andreas Nautsch, Ha Nguyen, Xuechen Liu, Sangeet Sagar, Jarod Duret, Salima Mdhaffar, Gaelle Laperriere, Mickael Rouvier, Renato De Mori, Yannick Esteve"} |
| 13 | +] |
| 14 | +classifiers = [ |
| 15 | + "Programming Language :: Python :: 3", |
| 16 | + "License :: OSI Approved :: Apache Software License", |
| 17 | +] |
| 18 | +requires-python = ">=3.8.1" |
| 19 | +dependencies = [ |
| 20 | + "hyperpyyaml", |
| 21 | + "joblib", |
| 22 | + "numpy", |
| 23 | + "packaging", |
| 24 | + "scipy", |
| 25 | + "sentencepiece", |
| 26 | + "torch>=1.9", |
| 27 | + "torchaudio", |
| 28 | + "tqdm", |
| 29 | + "huggingface_hub", |
| 30 | +] |
| 31 | +keywords = ["speech", "audio", "pytorch", "deep-learning"] |
| 32 | + |
| 33 | +[project.urls] |
| 34 | +Homepage = "https://speechbrain.github.io/" |
| 35 | + |
| 36 | +[project.optional-dependencies] |
| 37 | +dev = [ |
| 38 | + "ruff==0.12.4", |
| 39 | + "pytest==7.4.0", |
| 40 | + "yamllint==1.35.1", |
| 41 | + "pre-commit>=2.3.0", |
| 42 | + "pandas>=1.0.1", |
| 43 | + "transformers>=4.30.0", |
| 44 | + "codespell>=2.3.0", |
| 45 | +] |
| 46 | + |
| 47 | +[tool.setuptools.dynamic] |
| 48 | +version = {file = "speechbrain/version.txt"} |
| 49 | + |
| 50 | +[tool.setuptools.packages.find] |
| 51 | +exclude = ["tests", "tests.*"] |
| 52 | + |
| 53 | +[tool.setuptools.package-data] |
| 54 | +speechbrain = ["version.txt", "log-config.yaml"] |
| 55 | + |
| 56 | +[tool.ruff] |
| 57 | +target-version = "py38" |
2 | 58 | line-length = 80 |
3 | | -target-version = ['py38'] |
4 | | -exclude = ''' |
5 | | -
|
6 | | -( |
7 | | - /( |
8 | | - \.eggs # exclude a few common directories in the |
9 | | - | \.git # root of the project |
10 | | - | \.mypy_cache |
11 | | - | \.tox |
12 | | - | \.venv |
13 | | - )/ |
14 | | -) |
15 | | -''' |
| 59 | +exclude = [ |
| 60 | + ".eggs", |
| 61 | + ".git", |
| 62 | + ".mypy_cache", |
| 63 | + ".tox", |
| 64 | + ".venv", |
| 65 | + "tests/tmp", |
| 66 | +] |
| 67 | + |
| 68 | +[tool.ruff.lint] |
| 69 | +select = [ |
| 70 | + "E", # pycodestyle errors |
| 71 | + "W", # pycodestyle warnings |
| 72 | + "F", # pyflakes |
| 73 | + "I", # isort (import sorting) |
| 74 | + "B", # flake8-bugbear |
| 75 | + "C4", # flake8-comprehensions |
| 76 | + "UP", # pyupgrade |
| 77 | +] |
| 78 | +ignore = [ |
| 79 | + "B007", # Loop control variable not used within loop body |
| 80 | + "B904", # Within an `except` clause, raise exceptions with `raise ... from err` |
| 81 | + "B028", # No explicit `stacklevel` keyword argument found |
| 82 | + "C400", # Unnecessary generator (rewrite as a `list` comprehension) |
| 83 | + "C401", # Unnecessary generator (rewrite as a `set` comprehension) |
| 84 | + "C403", # Unnecessary `list` comprehension (rewrite as a `set` comprehension) |
| 85 | + "C404", # Unnecessary `list` call within `sorted()` |
| 86 | + "C405", # Unnecessary `list` literal (rewrite as a `set` literal) |
| 87 | + "C408", # Unnecessary `dict`/`list` call (rewrite as literal) |
| 88 | + "C409", # Unnecessary `tuple` literal passed to `tuple()` |
| 89 | + "C414", # Unnecessary `list` call within `sorted()` |
| 90 | + "C416", # Unnecessary `list` comprehension (rewrite using `list()`) |
| 91 | + "C417", # Unnecessary `map` usage (rewrite using a `list` comprehension) |
| 92 | + "C419", # Unnecessary list comprehension |
| 93 | + "E203", # whitespace before ':' (black compatibility) |
| 94 | + "E266", # too many leading '#' for block comment |
| 95 | + "E501", # line too long (handled by formatter) |
| 96 | + "E721", # Do not compare types, use `isinstance()` |
| 97 | + "F601", # Dictionary key literal repeated |
| 98 | + "UP008", # Use `super()` instead of `super(__class__, self)` |
| 99 | + "UP028", # Replace `yield` over `for` loop with `yield from` |
| 100 | + "UP030", # Use implicit references for positional format fields |
| 101 | + "UP031", # Use format specifiers instead of percent format |
| 102 | + "B008", # do not perform function calls in argument defaults |
| 103 | + "B006", # do not use mutable data structures for argument defaults |
| 104 | + "B011", # Do not `assert False` (`python -O` removes these calls), raise `AssertionError()` |
| 105 | + "B019", # Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks |
| 106 | + "B023", # Function definition does not bind loop variable |
| 107 | + "B026", # Star-arg unpacking after a keyword argument is strongly discouraged |
| 108 | +] |
| 109 | + |
| 110 | +[tool.ruff.lint.isort] |
| 111 | +# Import sorting configuration (black-compatible) |
| 112 | +combine-as-imports = true |
| 113 | +force-wrap-aliases = true |
| 114 | +known-first-party = ["speechbrain"] |
| 115 | +known-third-party = ["torch", "torchaudio", "numpy", "scipy", "hyperpyyaml", "joblib", "packaging", "sentencepiece", "tqdm", "huggingface_hub"] |
| 116 | +split-on-trailing-comma = false |
| 117 | + |
| 118 | +[tool.ruff.lint.per-file-ignores] |
| 119 | +"__init__.py" = ["F401"] |
| 120 | + |
| 121 | +[tool.ruff.format] |
| 122 | +quote-style = "double" |
| 123 | +indent-style = "space" |
| 124 | +skip-magic-trailing-comma = false |
| 125 | +line-ending = "auto" |
| 126 | +docstring-code-format = true |
16 | 127 |
|
17 | 128 | [tool.codespell] |
18 | 129 | skip = "./tests/tmp,./**/result,*.csv,*train.txt,*test.txt" |
19 | | - |
20 | | -[tool.isort] |
21 | | -profile = "black" |
22 | | -line_length = 80 |
23 | | -filter_files = true |
|
0 commit comments