-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathpyproject.toml
More file actions
123 lines (109 loc) · 3.05 KB
/
pyproject.toml
File metadata and controls
123 lines (109 loc) · 3.05 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
[project]
name = "pyacoustid"
version = "1.2.2"
description = "Bindings for Chromaprint acoustic fingerprinting and the Acoustid API"
authors = [{ name = "Adrian Sampson", email = "adrian@radbox.org" }]
readme = "README.rst"
license = "MIT"
requires-python = ">=3.10"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Sound/Audio :: Conversion",
]
dependencies = [
"audioread",
"requests",
]
[dependency-groups]
dev = [
"pytest >= 8.4.2",
"pytest-cov >= 7.0.0",
]
lint = [
"mypy >= 1.18.2",
"ruff >= 0.6.4",
"types-requests",
]
[project.urls]
Homepage = "https://github.com/beetbox/pyacoustid"
Repository = "https://github.com/beetbox/pyacoustid"
"Bug Tracker" = "https://github.com/beetbox/pyacoustid/issues"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pipx-install]
poethepoet = ">=0.26"
poetry = ">=2.1"
[tool.poetry]
packages = [
{ include = "acoustid.py" },
{ include = "chromaprint.py" },
]
include = [
{ path = "aidmatch.py", format = "sdist" },
{ path = "fpcalc.py", format = "sdist" },
]
[tool.poe.tasks.check-format]
help = "Check the code for style issues"
cmd = "ruff format --config=pyproject.toml --check --diff"
[tool.poe.tasks.check-types]
help = "Check the code for typing issues. Accepts mypy options."
cmd = "mypy"
[tool.poe.tasks.format]
help = "Format the codebase"
cmd = "ruff format --config=pyproject.toml"
[tool.poe.tasks.lint]
help = "Check the code for linting issues. Accepts ruff options."
cmd = "ruff check --config=pyproject.toml"
[tool.poe.tasks.test]
help = "Run tests with pytest"
cmd = "pytest $OPTS"
env.OPTS.default = "-p no:cov"
[tool.poe.tasks.test-with-coverage]
help = "Run tests and record coverage"
ref = "test"
# record coverage for the main packages
# save xml for coverage upload to codecov
# save html report for local dev use
# measure coverage across logical branches
# show which tests cover specific lines in the code (see the HTML report)
env.OPTS = """
--cov=chromaprint
--cov=acoustid
--cov-report=xml:.reports/coverage.xml
--cov-report=html:.reports/html
--cov-branch
--cov-context=test
"""
[tool.ruff]
target-version = "py310"
[tool.ruff.lint]
future-annotations = true
select = [
"E", # pycodestyle
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PT", # flake8-pytest-style
"RUF", # ruff
"UP", # pyupgrade
"TC", # flake8-type-checking
"W", # pycodestyle
]
ignore = [
"TC006", # no need to quote 'cast's since we use 'from __future__ import annotations'
]
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
parametrize-names-type = "csv"