-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (131 loc) · 2.87 KB
/
Copy pathpyproject.toml
File metadata and controls
144 lines (131 loc) · 2.87 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
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
[project]
name = "aproxy-operator"
version = "0.0.1"
description = "A subordinate charm that deploys the aproxy application."
readme = "README.md"
requires-python = ">=3.8.6"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"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",
]
dependencies = [
"charmlibs-snap>=0.8.0,<2",
"ops>=2.23.0",
"pydantic>=2.10.6",
]
[dependency-groups]
fmt = [
"ruff",
]
lint = [
"codespell",
"jubilant",
"mypy",
"ops[testing]",
"pep8-naming",
"pytest",
"requests",
"ruff",
"types-pyyaml",
"types-requests",
]
unit = [
"coverage[toml]",
"ops[testing]",
"pytest",
]
coverage-report = [
"coverage[toml]",
"pytest",
]
static = [
"bandit[toml]",
]
integration = [
"jubilant",
"opcli @ git+https://github.com/canonical/charm-ci.git ; python_full_version >= '3.12'",
"pytest",
]
[tool.uv]
package = false
[tool.ruff]
target-version = "py310"
line-length = 99
# enable ruff linters:
# A flake8-builtins
# B flake8-bugbear
# CPY flake8-copyright
# D pydocstyle
# E/W pycodestyle
# F Pyflakes
# I isort
# N pep8-naming
# RUF Ruff-specific rules
# S flake8-bandit
# SIM flake8-simplify
# TC flake8-type-checking
# UP pyupgrade
lint.select = [ "A", "B", "C", "CPY", "D", "E", "F", "I", "N", "RUF", "S", "SIM", "TC", "UP", "W" ]
lint.ignore = [
"B904",
"D107",
"D203",
"D204",
"D205",
"D213",
"D215",
"D400",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
"E501",
"S105",
"S603",
"TC002",
"TC006",
"UP006",
"UP007",
"UP035",
"UP045",
]
lint.per-file-ignores."tests/*" = [ "B011", "D100", "D101", "D102", "D103", "D104", "D212", "D415", "D417", "S" ]
lint.flake8-copyright.author = "Canonical Ltd."
lint.flake8-copyright.min-file-size = 1
lint.flake8-copyright.notice-rgx = "Copyright\\s\\d{4}([-,]\\d{4})*\\s+"
lint.mccabe.max-complexity = 10
lint.pydocstyle.convention = "google"
[tool.codespell]
skip = "build,lib,venv,icon.svg,.tox,.git,.mypy_cache,.ruff_cache,.coverage,htmlcov,uv.lock,grafana_dashboards"
ignore-words-list = "iif"
[tool.pytest.ini_options]
minversion = "6.0"
log_cli_level = "INFO"
pythonpath = [ "lib", "src" ]
[tool.coverage.run]
branch = true
[tool.coverage.report]
show_missing = true
[tool.mypy]
check_untyped_defs = true
disallow_untyped_defs = true
explicit_package_bases = true
ignore_missing_imports = true
namespace_packages = true
[[tool.mypy.overrides]]
disallow_untyped_defs = false
module = "tests.*"
[tool.bandit]
exclude_dirs = [ "/venv/" ]
[tool.bandit.assert_used]
skips = [ "*/*test.py", "*/test_*.py", "*tests/*.py" ]