Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (99 loc) · 3.16 KB
/
Copy pathpyproject.toml
File metadata and controls
112 lines (99 loc) · 3.16 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "thrash-protect"
dynamic = ["version"]
description = "Simple-Stupid user-space program doing 'kill -STOP' and 'kill -CONT' to protect from thrashing"
readme = "README.rst"
license = {text = "GPL-3.0-or-later"}
authors = [
{name = "Tobias Brox", email = "tobias@redpill-linpro.com"}
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: No Input/Output (Daemon)",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"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 :: System :: Monitoring",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
]
keywords = ["thrashing", "swap", "memory", "linux", "system-administration"]
[project.urls]
Homepage = "https://github.com/tobixen/thrash-protect"
Repository = "https://github.com/tobixen/thrash-protect"
Issues = "https://github.com/tobixen/thrash-protect/issues"
[project.scripts]
thrash-protect = "thrash_protect:main"
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.1.0",
"pre-commit>=3.0",
]
yaml = ["PyYAML>=5.0"]
toml = ["tomli>=1.0; python_version < '3.11'"]
all-formats = [
"PyYAML>=5.0",
"tomli>=1.0; python_version < '3.11'",
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
[tool.hatch.build.targets.wheel]
packages = ["thrash_protect.py"]
[tool.ruff]
target-version = "py39"
line-length = 120
exclude = [
"tests/thrash-bot*.py", # Utility scripts
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter, also many existing long lines)
"B007", # unused loop control variable
"B904", # raise without from (existing code pattern)
"SIM105", # use contextlib.suppress (existing code pattern)
"SIM108", # use ternary operator (existing code patterns, readability preference)
"UP031", # Use format specifiers instead of percent format (many existing)
"UP032", # Use f-string instead of format call (many existing % formats)
"E731", # do not assign lambda (existing code pattern)
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["B", "SIM"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v --tb=short"
pythonpath = ["."]
[tool.coverage.run]
source = ["thrash_protect"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]