-
Notifications
You must be signed in to change notification settings - Fork 33
/
pyproject.toml
213 lines (184 loc) · 4.98 KB
/
pyproject.toml
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# ===== PROJECT ===========================================================
#
[project]
name = 'opensmile'
authors = [
{name = 'Christop Hausner'},
{name = 'Johannes Wagner', email= '[email protected]'},
{name = 'Hagen Wierstorf', email = '[email protected]'},
]
description = 'Python wrapper for common openSMILE feature sets'
readme = 'README.rst'
license = {file = 'LICENSE'}
keywords = [
'audio',
'tools',
'feature',
'opensmile',
'audeering',
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering',
]
dependencies = [
'audobject >=0.6.1',
'audinterface >=0.7.0',
]
# Get version dynamically from git
# (needs setuptools_scm tools config below)
dynamic = ['version']
[project.urls]
repository = 'https://github.com/audeering/opensmile-python/'
documentation = 'https://audeering.github.io/opensmile-python/'
# ===== BUILD-SYSTEM ======================================================
#
# Requirements for building the Python package
[build-system]
requires = ['setuptools>=45', 'setuptools_scm[toml]>=6.2']
build-backend = 'setuptools.build_meta'
# ===== TOOL ==============================================================
#
# ----- codespell ---------------------------------------------------------
[tool.codespell]
builtin = 'clear,rare,informal,usage,names'
skip = './opensmile.egg-info,./build,./docs/api,./docs/_templates,./docs/examples'
# ----- pytest ------------------------------------------------------------
#
[tool.pytest.ini_options]
cache_dir = '.cache/pytest'
xfail_strict = true
addopts = '''
--doctest-plus
--cov=opensmile
--cov-fail-under=100
--cov-report term-missing
--cov-report xml
'''
# ----- ruff --------------------------------------------------------------
#
[tool.ruff]
cache-dir = '.cache/ruff'
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
'D', # pydocstyle
'E', # pycodestyle errors
'F', # Pyflakes
'I', # isort
'N', # pep8-naming
'W', # pycodestyle warnings
]
extend-ignore = [
'D100', # Missing docstring in public module
'D103', # Missing docstring in public function
'D104', # Missing docstring in public package
'D107', # Missing docstring in `__init__`
]
[tool.ruff.lint.per-file-ignores]
'__init__.py' = [
'F401', # * imported but unused
]
'define.py' = [
'N815', # e.g. Variable `eGeMAPS` in class scope should not be mixedCase
'D102', # Missing docstring in public method
]
'lib.py' = [
'D101', # Missing docstring in public class
'D102', # Missing docstring in public method
'D105', # Missing docstring in magic method
'N818', # Exception name `OpenSmileException` should be named with an Error suffix
]
# ----- I: isort -----
#
# Check correct order/syntax of import statements
#
[tool.ruff.lint.isort]
# All from imports have their own line, e.g.
#
# from .utils import util_a
# from .utils import util_b
#
force-single-line = true
# Sort by module names
# and not import before from, e.g.
#
# from datetime import date
# import os
#
force-sort-within-sections = true
# Ensure we have two empty lines
# after last import
lines-after-imports = 2
# Group all audEERING packages into a separate section, e.g.
#
# import os
#
# import numpy as np
#
# import audb
#
section-order = [
'future',
'standard-library',
'third-party',
'audeering',
'first-party',
'local-folder',
]
[tool.ruff.lint.isort.sections]
'audeering' = [
'audb',
'audbackend',
'audeer',
'audfactory',
'audformat',
'audiofile',
'audinterface',
'audmath',
'audmetric',
'audobject',
'audonnx',
'audplot',
'audresample',
'audsp',
'audtorch',
'sphinx-audeering-theme',
]
# ----- N: pep8-naming -----
#
# Check variable/class names follow PEP8 naming convention
#
[tool.ruff.lint.pep8-naming]
ignore-names = [
'config', # allow lowercase class name
'test_*', # allow uppercase name when testing a class
]
# ----- W: pycodestyle -----
#
# Check docstrings follow selected convention
#
[tool.ruff.lint.pydocstyle]
convention = 'google'
# ----- setuptools --------------------------------------------------------
#
# Disable package data to only select the matching binary in setup.py
[tool.setuptools]
include-package-data = false
# Find all (sub-)modules of the Python package
[tool.setuptools.packages.find]
# ----- setuptools_scm ----------------------------------------------------
#
# Use setuptools_scm to get version from git
[tool.setuptools_scm]