-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpyproject.toml
150 lines (128 loc) · 3.65 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
[project]
name = "nrkdownload"
description = "Download content from NRK TV."
dynamic = ["version"]
authors = [{ name = "Martin Høy", email = "[email protected]" }]
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Typing :: Typed",
"Environment :: Console",
# Specify the Python versions you support here.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"loguru>=0.7.3",
"pydantic>=2.10.6",
"typer>=0.15.1",
"requests>=2.32.3",
"python-ffmpeg>=2.0.12",
]
[dependency-groups]
docs = [
"mkdocs>=1.6.1",
"mkdocs-material>=9.6.5",
"mkdocs-git-revision-date-localized-plugin>=1.3.0",
]
dev = [
"ipykernel>=6.29.5",
"nox>=2025.2.9",
"pre-commit>=3.5.0",
"pytest>=8.3.4",
"pytest-cov>=5.0.0",
"types-requests>=2.32.0.20241016",
]
[project.scripts]
nrkdownload = "nrkdownload.cli:app"
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
# FIXME: temporary workaround until https://github.com/pypa/setuptools/issues/4759 is fixed
[tool.setuptools]
license-files = []
[tool.setuptools_scm]
# Use the git tags to determine the version
[tool.uv]
# Rebuild if pyproject.toml changes, or if the git commit or tags changes
cache-keys = [
{ file = "pyproject.toml" },
{ file = "**/*.py" },
{ git = { commit = true, tags = true } },
]
[tool.ruff]
# Consider packages in the src directory as first-party code
src = ["src"]
# Run ruff on Notebooks as well
extend-include = ["*.ipynb"]
[tool.ruff.lint.per-file-ignores]
# Allow the use of assert in tests
"tests/*" = ["S101"]
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle
"W", # pycodestyle
"C90", # mccabe
"I", # isort
"ICN", # flake8-import-conventions
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"ANN", # flake8-annotations
"S", # flake8-bandit
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PD", # pandas-vet
"PLC", # Pylint convention
"PLE", # Pylint error
# "PLR", # Pylint refactor
"NPY", # NumPy
"FAST", # FastAPI
"RUF", # Ruff-specific rules
]
ignore = []
[tool.ruff.lint.pydocstyle]
convention = "google"
# mypy configuration, taken from pydantic documentation
[tool.mypy]
plugins = ["pydantic.mypy"]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[[tool.mypy.overrides]]
module = ["ffmpeg.*"]
follow_untyped_imports = true
[tool.pytest.ini_options]
addopts = "--verbose --cov-report term-missing:skip-covered --cov=nrkdownload"
markers = [
"download: tests that downloads content (deselect with '-m \"not download\"')",
]
# Ignore deprecation warnings from third party packages
filterwarnings = ["ignore::DeprecationWarning:past.*"]
[tool.coverage.run]
omit = ["src/nrkdownload/__main__.py"]