-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (128 loc) · 3.4 KB
/
pyproject.toml
File metadata and controls
145 lines (128 loc) · 3.4 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "opsbox"
version = "0.3.1"
description = "A comprehensive Python library for server operations including backup scripts, encrypted mail functionality, and utility tools"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.12"
authors = [
{name = "OpsBox Team", email = "opsbox@example.com"},
]
keywords = ["server", "operations", "backup", "encryption", "mail", "utilities"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
]
dependencies = [
"dbus-python>=1.4.0",
"dotenv>=0.9.9",
"envelope>=2.3.0",
"pytest>=9.0.2",
"pyyaml>=6.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"mypy>=1.5.0",
"bandit>=1.7.0",
"ruff>=0.1.0",
"pre-commit>=3.3.0",
"types-setuptools",
"types-PyYAML>=6.0.0",
"pip-audit>=1.0.0",
"pyinstaller>=6.0.0",
]
[project.urls]
Homepage = "https://github.com/MarcSchuh/OpsBox"
Repository = "https://github.com/MarcSchuh/OpsBox"
Documentation = "https://opsbox.readthedocs.io"
"Bug Tracker" = "https://github.com/MarcSchuh/OpsBox/issues"
[project.scripts]
opsbox = "opsbox.main:main"
[tool.hatch.build.targets.wheel]
packages = ["src/opsbox"]
# Ruff configuration
[tool.ruff]
line-length = 88
target-version = "py312"
src = ["src"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"E501", # Line too long (handled by formatter)
"G004", # f-string
"D400",
"D415",
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*" = ["S101", "S105", "S106", "S108", "PLR0913", "ANN001", "ANN003", "PLR2004", "SIM117", "ARG001", "ARG002", "SLF001"]
"src/opsbox/db_snapshot/db_backup.py" = ["BLE001"]
"src/opsbox/rsync/rsync_manager.py" = ["BLE001", "N999"]
# MyPy configuration
[tool.mypy]
python_version = "3.12"
warn_return_any = true
disallow_untyped_defs = true
check_untyped_defs = true
show_error_codes = true
explicit_package_bases = true
namespace_packages = true
mypy_path = "src"
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "envelope"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "dbus.*"
ignore_missing_imports = true
# Pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["*_test.py", "test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--cov=src/opsbox",
"--cov-report=term-missing",
"--cov-report=xml",
]
# Coverage configuration
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/test_*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[dependency-groups]
dev = [
"pre-commit>=4.5.0",
"pyinstaller>=6.14.2",
"pytest-cov>=7.0.0",
"types-PyYAML>=6.0.0",
]