-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
156 lines (130 loc) · 3.79 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
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry]
name = "images-upload-cli"
version = "0.0.0"
description = "Upload images via APIs"
authors = ["DeadNews <deadnewsgit@gmail.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/DeadNews/images-upload-cli"
repository = "https://github.com/DeadNews/images-upload-cli"
documentation = "https://deadnews.github.io/images-upload-cli"
keywords = ["cli", "imgur", "image-upload", "upload-images", "upload-pictures"]
classifiers = ["Environment :: Console", "Operating System :: OS Independent"]
[tool.poetry.scripts]
images-upload-cli = "images_upload_cli._cli:cli"
[tool.poetry.dependencies]
python = "^3.10"
click = "^8.1.7"
httpx = "^0.28.0"
loguru = "^0.7.2"
pillow = "^11.0.0"
pyperclip = "^1.9.0"
python-dotenv = "^1.0.1"
rich = "^13.9.4"
[tool.poetry.group.lint.dependencies]
mypy = "^1.13.0"
poethepoet = "^0.31.1"
pyright = "^1.1.390"
ruff = "^0.8.3"
[tool.poetry.group.test.dependencies]
pytest = "^8.3.4"
pytest-asyncio = "^0.25.0"
pytest-benchmark = "^5.1.0"
pytest-cov = "^6.0.0"
pytest-httpx = "^0.35.0"
pytest-mock = "^3.14.0"
logot = "^1.3.0"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.1"
mkdocs-click = "^0.8.1"
mkdocs-gen-files = "^0.5.0"
mkdocs-literate-nav = "^0.6.1"
mkdocs-material = "^9.5.48"
mkdocstrings = "^0.27.0"
mkdocstrings-python = "^1.12.2"
[tool.poetry.group.build.dependencies]
nuitka = { version = "^2.5.6", platform = "win32" }
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
[tool.poe.tasks]
mypy = "mypy ."
pyright = "pyright ."
ruff = "ruff check ."
ruff-fmt = "ruff format ."
lint.sequence = ["ruff", "ruff-fmt", "mypy", "pyright"]
[tool.poe.tasks.nuitka]
cmd = """
python -m nuitka
--assume-yes-for-downloads
--onefile
--output-dir=dist
--output-file=${outfile}
--script-name=src/images_upload_cli/__main__.py
"""
[tool.poe.tasks.nuitka.args.outfile]
options = ["--output-file"]
default = "images-upload-cli.exe"
help = "Output file name."
[tool.poe.tasks.test]
cmd = "pytest -m 'not (online or benchmark)'"
[tool.poe.tasks.benchmark]
cmd = "pytest -m 'benchmark and not online' --benchmark-autosave --benchmark-compare"
[tool.poe.tasks.benchmark-online]
cmd = "pytest -m 'benchmark and online' --benchmark-autosave --benchmark-compare"
[tool.pytest.ini_options]
addopts = "--verbose --cov=./src --cov-report=term --cov-report=xml"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
markers = [
"benchmark: Run benchmarks",
"online: Run tests that require internet connection",
]
[tool.coverage.report]
exclude_lines = [
"# pragma: no cover",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.mypy]
disallow_untyped_defs = true
follow_imports = "normal"
ignore_missing_imports = true
show_column_numbers = true
show_error_codes = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
[tool.pyright]
include = ["src"]
ignore = ["tests"]
typeCheckingMode = "standard"
[tool.ruff]
line-length = 99
target-version = "py310" # Until Poetry v2
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # Trailing comma missing
"FBT001", # Boolean positional arg in function definition
"FBT002", # Boolean default value in function definition
"ISC001", # Checks for implicitly concatenated strings on a single line
"PLR0913", # Too many arguments to function call
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["ANN", "D", "E501", "PLC1901", "PLR2004", "S"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.pycodestyle]
max-doc-length = 129
max-line-length = 129
[tool.ruff.lint.pydocstyle]
convention = "google"