-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathpyproject.toml
More file actions
168 lines (156 loc) · 3.47 KB
/
Copy pathpyproject.toml
File metadata and controls
168 lines (156 loc) · 3.47 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
[project]
name = "wordpress-k8s-operator"
version = "0.0.0"
description = "WordPress is an OSS to create a beautiful website."
readme = "README.md"
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",
]
dependencies = [
"cosl==1.4.0",
"mysql-connector-python==9.5.0",
"ops==3.5.1",
"pydantic==2.12.5",
"requests==2.32.5",
]
[dependency-groups]
fmt = [
"ruff",
]
lint = [
"codespell",
"juju>=3.6,<4",
"kubernetes",
"mypy",
"pep8-naming",
"pillow",
"pytest==9.0.2",
"pytest-cov",
"pytest-operator",
"python-keystoneclient",
"python-swiftclient",
"ruff",
"types-pyyaml",
"types-requests",
"websockets<17",
]
static = [
"bandit[toml]",
"toml",
]
unit = [
"coverage[toml]",
"pytest",
]
coverage-report = [
"coverage[toml]",
"pytest",
]
integration = [
"allure-pytest>=2.8.18",
"allure-pytest-collection-report @ git+https://github.com/canonical/data-platform-workflows@v24.0.0#subdirectory=python/pytest_plugins/allure_pytest_collection_report",
"juju>=2.9,<3",
"kubernetes",
"pillow",
"pytest==9.0.2",
"pytest-cov",
"pytest-operator",
"python-keystoneclient",
"python-swiftclient",
"types-pyyaml",
"types-requests",
"websockets<17",
]
integration-juju3 = [
"juju==3.6.1.3",
"kubernetes",
"macaroonbakery==1.3.4",
"pillow",
"pytest==9.0.2",
"pytest-cov",
"pytest-operator",
"python-keystoneclient",
"python-swiftclient",
"types-pyyaml",
"types-requests",
]
[tool.uv]
package = false
conflicts = [ [ { group = "integration" }, { group = "integration-juju3" }, { group = "lint" } ] ]
[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"
[tool.pytest.ini_options]
markers = [
"slow: marks slow and not very important tests",
"requires_secret: mark tests that require external secrets",
]
[tool.coverage.run]
branch = true
[tool.coverage.report]
fail_under = 90
show_missing = true
[tool.mypy]
ignore_missing_imports = true
allow_redefinition = true
plugins = [ "pydantic.mypy" ]
[tool.bandit]
exclude_dirs = [ "/venv/" ]
[tool.bandit.assert_used]
skips = [ "*/integration/helper.py", "*/*test*" ]