-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
117 lines (105 loc) · 3.4 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
[tool.poetry]
name = "checkmk-dev-tools"
version = "0.0.0" # will-be-updated-automatically
description = "Checkmk DevOps tools"
authors = [
"Frans Fürst <[email protected]>",
"Jonas Scharpf <[email protected]>",
"Niko Wenselowski <[email protected]>",
"Timotheus Bachinger <[email protected]>"
]
repository = "https://github.com/Checkmk/checkmk-dev-tools"
readme = "README.md"
packages = [
{include = "cmk_dev/**/*.py"}
]
exclude = ["cmk_dev/out"]
[tool.poetry.scripts]
activity-from-fs = 'cmk_dev.activity_from_fs:main'
binreplace = 'cmk_dev.binreplace:main'
check-rpath = 'cmk_dev.check_rpath:main'
ci-artifacts = 'cmk_dev.ci_artifacts:main'
cmk-dev = 'cmk_dev.cli:main'
cpumon = 'cmk_dev.cpumon:main'
decent-output = 'cmk_dev.decent_output:main'
job-resource-usage = 'cmk_dev.job_resource_usage:main'
last-access = 'cmk_dev.last_access:main'
# not-picked = 'cmk_dev.not_picked:main'
procmon = 'cmk_dev.procmon:main'
pycinfo = 'cmk_dev.pycinfo:main'
[tool.poetry.dependencies]
python = "^3.10.4" # currently lowest supported Python version (CI Build Nodes)
python-jenkins = "^1" # needed for ci-artifacts
pydantic = "^2" # jenkins_utils/*, docker_shaper/*
rich = "*" # activity_from_fs.py, docker_shaper/*
trickkiste = "^0.2.1"
# trickkiste = {path = "../../_HOME/trickkiste", develop = true}
# actual dependencies, but kept back
[tool.poetry.group.dev.dependencies]
aiofiles = "^23.2.1" # procmon.py
ttrace = "^0.1.13" # procmon.py
# [tool.poetry.group.dev.dependencies]
pytest = "*"
mypy = "*"
ruff = "^0.6"
twine = "*"
yamllint = "*"
pytest-cov = "*"
snippets2changelog = "^1.6.0"
poetry-dynamic-versioning = "^1.3.0"
types-pyyaml = "*"
types-requests = "*"
types-aiofiles = "*"
pre-commit = "*"
# https://github.com/mtkennerly/poetry-dynamic-versioning/tree/v1.3.0
# > poetry self add "poetry-dynamic-versioning[plugin]"
# it is not enough to add it to the projects pyproject.toml file
[tool.poetry-dynamic-versioning]
enable = true
format-jinja-imports = [
{ module = "subprocess", item = "check_output" },
]
format-jinja = """{{ check_output(["python3", "-c", "from pathlib import Path; exec(Path('cmk_dev/version.py').read_text()); print(__version__)"]).decode().strip() }}"""
# format-jinja = "{{ env.get('PROJECT_VERSION') }}"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.ruff]
target-version = "py311"
line-length = 100
[flake8-annotations]
suppress-dummy-args = true
[mccabe]
max-complexity = 15
[tool.ruff.lint]
select = ["C", "E", "F", "I", "W", "C90", "PL", "PLR"]
ignore = [
"C401", # Unnecessary generator
"C417", # Unnecessary "map" usage
"C901", # "main" is too complex
# "E402", # module level import not on top of the file
"E501", # line too long, 100s of fails. Fixable.
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
]
# [tool.ruff.lint.per-file-ignores]
# "filename" = ["E123"]
[tool.mypy]
python_version = "3.11"
strict="True"
disallow_untyped_defs = "True"
disallow_any_unimported = "True"
no_implicit_optional = "True"
check_untyped_defs = "True"
warn_return_any = "True"
warn_unused_ignores = "True"
show_error_codes = "True"
mypy_path="typeshed"
exclude = [
# folders
'\.venv',
# files
'cmk_dev/procmon\.py',
]