-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (115 loc) · 3.28 KB
/
pyproject.toml
File metadata and controls
134 lines (115 loc) · 3.28 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
[project]
name = "mediafile"
version = "0.17.0"
description = "A simple, cross-format library for reading and writing media file metadata."
authors = [{ name = "Adrian Sampson", email = "adrian@radbox.org" }]
readme = "README.rst"
license = "MIT"
requires-python = ">=3.10"
dynamic = ["version"]
classifiers = [
"Topic :: Multimedia :: Sound/Audio",
"Environment :: Web Environment",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"mutagen >= 1.46",
"filetype >= 1.2.0",
]
[dependency-groups]
dev = [
"pytest >= 8",
"pytest-cov >= 7.0.0",
]
lint = [
"docstrfmt >= 1.11.1",
"mypy >= 1.18.2",
"ruff >= 0.6.4",
"sphinx-lint >= 1.0.0",
]
[project.optional-dependencies]
docs = ["sphinx >= 7.4.7"]
[project.urls]
Documentation = "https://mediafile.readthedocs.io"
Hopepage = "https://mediafile.readthedocs.io"
Repository = "https://github.com/beetbox/mediafile"
"Bug Tracker" = "https://github.com/beetbox/mediafile/issues"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pipx-install]
poethepoet = ">=0.32"
poetry = ">=2.1"
[tool.poe.tasks.check-docs-links]
help = "Check the documentation for broken URLs"
cmd = "make -C docs linkcheck"
[tool.poe.tasks.check-format]
help = "Check the code for style issues"
cmd = "ruff format --check --diff"
[tool.poe.tasks.check-types]
help = "Check the code for typing issues. Accepts mypy options."
cmd = "mypy"
[tool.poe.tasks.docs]
help = "Build documentation"
args = [{ name = "COMMANDS", positional = true, multiple = true, default = "html" }]
cmd = "make -C docs $COMMANDS"
[tool.poe.tasks.format]
help = "Format the codebase"
cmd = "ruff format"
[tool.poe.tasks.format-docs]
help = "Format the documentation"
cmd = "docstrfmt docs *.rst -pA"
[tool.poe.tasks.lint]
help = "Check the code for linting issues. Accepts ruff options."
cmd = "ruff check"
[tool.poe.tasks.lint-docs]
help = "Lint the documentation"
shell = "sphinx-lint --enable all --disable default-role $(git ls-files '*.rst')"
[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 in mediafile package
# 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=mediafile
--cov-report=xml:.reports/coverage.xml
--cov-report=html:.reports/html
--cov-branch
--cov-context=test
"""
[tool.docstrfmt]
line-length = 80
extend-exclude = [
"docs/_templates/**/*",
"docs/api/**/*",
"README_kr.rst",
]
[tool.ruff]
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"W", # pycodestyle
"UP", #pyupgrade
]
ignore = [
"TC006", # no need to quote 'cast's since we use 'from __future__ import annotations'
]
[tool.ruff.format]
quote-style = "double"