-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (147 loc) · 4.89 KB
/
Copy pathpyproject.toml
File metadata and controls
164 lines (147 loc) · 4.89 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
[project]
name = "guessit"
version = "4.4.0"
description = "GuessIt - a library for guessing information from video filenames."
dynamic = ["readme"]
license = "LGPL-3.0-or-later"
license-files = ["LICENSE"]
authors = [
{ name = "Rémi Alvergnat", email = "toilal.dev@gmail.com" },
]
keywords = [
"python", "library", "release", "parser", "name", "filename",
"movies", "series", "episodes", "animes",
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Multimedia",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"rebulk>=6.0.1,<7",
"babelfish>=0.6.1",
"python-dateutil>=2.8.0",
]
[project.urls]
Homepage = "https://guessit-io.github.io/guessit"
Repository = "https://github.com/guessit-io/guessit"
Documentation = "https://guessit-io.github.io/guessit"
Changelog = "https://github.com/guessit-io/guessit/blob/develop/CHANGELOG.md"
[project.optional-dependencies]
regex = ["regex"]
[project.scripts]
guessit = "guessit.__main__:main"
[dependency-groups]
test = [
"pytest",
"pytest-mock",
"pytest-benchmark",
"pytest-cov",
"PyYAML",
]
lint = [
"ruff",
"mypy",
]
docs = [
"zensical",
]
dev = [
{ include-group = "test" },
{ include-group = "lint" },
{ include-group = "docs" },
# Tooling driven by .pre-commit-config.yaml: the hooks run via `uv run`, so
# these must be in the dev env / uv.lock — pre-commit itself, ruff (via the
# lint group above) and commitizen.
"pre-commit",
"commitizen",
"pyinstaller",
"python-semantic-release",
"tox",
"tox-uv",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["guessit"]
[tool.hatch.metadata.hooks.custom]
path = "hatch_build.py"
[tool.semantic_release]
version_variables = ["guessit/__version__.py:__version__"]
version_toml = ["pyproject.toml:project.version"]
commit_message = "chore(release): release v{version}"
commit_author = "github-actions <actions@github.com>"
# `uv lock` re-stamps the bumped version into uv.lock (which pins guessit's own
# version); `assets` includes it in the release commit so the lockfile never
# drifts behind the released version (a stale lock dirties the tree and would
# break the automated main->develop back-merge). Wheels/sdist/binaries are built
# in the dedicated CI jobs, so no `uv build` is needed here.
build_command = "uv lock"
assets = ["uv.lock"]
[tool.semantic_release.changelog]
# Keep the changelog (and the PyPI long description it feeds via hatch_build.py)
# focused on user-facing changes by dropping noise commit types. Breaking commits
# (type!:) are NOT matched by these patterns, so they still surface.
exclude_commit_patterns = [
"^(?:chore|ci|test|style|docs|refactor|build)(?:\\([^)]*\\))?: ",
]
# commitizen is used only to lint commit messages (Conventional Commits), both
# via the local pre-commit commit-msg hook and the CI `cz check`. Versioning and
# releases stay owned by python-semantic-release above.
[tool.commitizen]
name = "cz_conventional_commits"
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"PIE", # flake8-pie
"RET", # flake8-return
"ISC", # flake8-implicit-str-concat
"TC", # flake8-type-checking
"FA", # flake8-future-annotations
"PT", # flake8-pytest-style
"RUF", # ruff-specific rules
]
# SIM102: collapsing nested `if`s hurts readability with long conditions here.
ignore = ["SIM102"]
[tool.ruff.lint.per-file-ignores]
# Rebulk Rule subclasses declare `dependency`, `consequence`, `properties`, ...
# as class attributes by design — that is the framework API, not a mutable
# default footgun. ClassVar annotations everywhere would be pure noise here.
"guessit/rules/**" = ["RUF012"]
[tool.mypy]
python_version = "3.10"
files = ["guessit"]
strict = true
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "-s --ignore=build --ignore=docs --ignore=hatch_build.py --doctest-modules --doctest-glob='*.rst' -m 'not cross_parser'"
markers = [
"cross_parser: opt-in tests checking guessit against other parsers' labelled fixtures (run with `pytest -m cross_parser`)",
]
[tool.coverage.run]
omit = [
"guessit/__version__.py",
"guessit/test/*",
]
[tool.coverage.report]
exclude_lines = ["pragma: no cover"]