-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (134 loc) · 3.5 KB
/
Copy pathpyproject.toml
File metadata and controls
148 lines (134 loc) · 3.5 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
146
147
148
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "setuptools-scm"]
[project]
name = "hermeto"
license = "GPL-3.0-only"
license-files = ["LICENSE"]
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"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",
]
dynamic = ["version"]
dependencies = [
"aiohttp",
"aiohttp-retry",
"createrepo-c ; sys_platform == 'linux'",
"gitpython",
"packageurl-python",
"packaging",
"pyarn",
"pydantic",
"pydantic-settings",
"pypi-simple",
"pyyaml",
"requests",
"semver",
"tenacity",
"tomlkit",
"typer",
]
[project.optional-dependencies]
dev = [
"mkdocs-material",
"mypy",
"nox",
"ruff",
"typing-extensions",
]
test = [
"filelock",
"jsonschema",
"podman-compose",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-env",
"pytest-xdist",
]
[project.scripts]
cachi2 = "hermeto.interface.cli:app"
hermeto = "hermeto.interface.cli:app"
[tool.setuptools]
packages = ["hermeto"]
[tool.setuptools_scm]
fallback_version = "0.0.0+dev.fallback"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"W", # pycodestyle warnings
"E", # pycodestyle errors
"F", # pyflakes
"D1", # Missing docstrings only
"I", # isort
"S", # bandit security rules
"ARG", # flake8 unused arguments
]
ignore = [
"D100", # missing docstring in public module
"D104", # missing docstring in public package
"D105", # missing docstring in magic method
"E501", # line too long
"E731", # do not assign a lambda expression
"S404", # import subprocess
"S603", # subprocess_without_shell_equals_true
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
"S101", # use of assert detected (expected in tests)
"S108", # hardcoded temp paths (acceptable in tests)
"S113", # requests call without timeout (acceptable in tests)
"S202", # tarfile-unsafe-members (acceptable in tests)
"S311", # suspicious-non-cryptographic-random-usage (acceptable in tests)
"ARG", # flake8 unused arguments (expected in tests - mocking)
]
[tool.ruff.format]
# Use Black-compatible formatting
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
python_version = "3.10"
plugins = ["pydantic.mypy"]
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
# TODO: pyarn does not currently have type annotations
[[tool.mypy.overrides]]
module = "pyarn.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "nox.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "noxfile"
disallow_untyped_decorators = false
[tool.coverage.report]
skip_covered = true
show_missing = true
exclude_lines = [
"def __repr__",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"return NotImplemented",
]
[tool.pytest.ini_options]
addopts = "--doctest-modules -n auto"
log_cli_level = "DEBUG"
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
markers = [
"no_proxy_mode: marks tests that are incompatible with HERMETO_TEST_LOCAL_NEXUS_PROXY=1",
]
tmp_path_retention_count = 1