-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
pyproject.toml
106 lines (87 loc) · 2.67 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
[project]
name = "hyprshade"
dynamic = ["version"]
description = "Hyprland shade configuration tool"
authors = [{ name = "John Bernard", email = "loqusion@gmail.com" }]
readme = "README.md"
requires-python = ">=3.11,<4.0"
license = { text = "MIT" }
dependencies = ["click>=8.1.7", "more_itertools>=10.1.0", "chevron>=0.14.0"]
[project.urls]
Issues = "https://github.com/loqusion/hyprshade/issues"
Source = "https://github.com/loqusion/hyprshade"
[project.scripts]
hyprshade = "hyprshade.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = [
"coverage>=7.3.0",
"hatchling>=1.18.0",
"mypy>=1.5.1",
"pip>=23.2.1",
"pytest>=7.4.1",
"ruff>=0.0.287",
"freezegun>=1.4.0",
"tomlkit>=0.12.4",
"syrupy>=4.6.1",
]
[tool.rye.scripts]
test = { chain = ["test:coverage-report"] }
lint = { chain = ["lint:style", "lint:typing"] }
fmt = "ruff format ."
fix = "ruff check --fix ."
release = "./scripts/release.sh"
"test:pytest" = "pytest tests/"
"test:coverage" = "coverage run -m pytest tests/"
"test:_coverage-report" = "coverage report"
"test:coverage-report" = { chain = ["test:coverage", "test:_coverage-report"] }
"lint:typing" = "mypy --install-types --non-interactive src/hyprshade tests"
"lint:style" = { chain = ["lint:ruff", "lint:formatting"] }
"lint:ruff" = "ruff check ."
"lint:formatting" = "ruff format --check ."
[tool.hatch.version]
path = "src/hyprshade/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["src/hyprshade", "tests", "shaders"]
[tool.hatch.build.targets.wheel]
packages = ["src/hyprshade"]
[tool.hatch.build.targets.wheel.shared-data]
"shaders" = "share/hyprshade/shaders"
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"ERA", # flake8-eradicate/eradicate
"I", # isort
"N", # pep8-naming
"PGH", # pygrep
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"RUF", # ruff checks
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"YTT", # flake8-2020
]
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = ["I002"]
"src/hyprshade/__init__.py" = ["I002"]
"src/hyprshade/__main__.py" = ["I002"]
[tool.ruff.lint.isort]
known-first-party = ["hyprshade"]
required-imports = ["from __future__ import annotations"]
[tool.mypy]
check_untyped_defs = true
[tool.pytest.ini_options]
addopts = ["-r", "a", "--import-mode=importlib"]
markers = ["requires_hyprland: Tests that require hyprland to be running"]
pythonpath = "."
[tool.coverage.run]
source = ["src/"]
omit = ["src/hyprshade/__init__.py", "src/hyprshade/__main__.py"]
[tool.coverage.report]
exclude_also = ["if TYPE_CHECKING:"]