-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
142 lines (123 loc) · 3.22 KB
/
Copy pathpyproject.toml
File metadata and controls
142 lines (123 loc) · 3.22 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
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
[project]
name = "postgresql-charms-single-kernel"
description = "Shared and reusable code for PostgreSQL-related charms"
version = "16.3.4"
readme = "README.md"
license = {file = "LICENSE"}
authors = [
{name = "Canonical Data Platform", email = "data-platform@lists.launchpad.net"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: POSIX :: Linux",
]
requires-python = ">=3.8,<4.0"
dependencies = [
"ops>=2.0.0",
"tenacity>=9.0.0",
]
[project.optional-dependencies]
postgresql = [
"httpx; python_version >= '3.12'",
"data-platform-helpers>=0.1.7; python_version >= '3.12'",
"charmlibs-pathops>=1.0.1; python_version >= '3.12'",
"charmlibs-interfaces-tls-certificates>=1.8.3; python_version >= '3.12'",
"charm-refresh; python_version >= '3.12'",
"requests; python_version >= '3.12'",
"tomli; python_version >= '3.12'",
"pydantic>=2.0; python_version >= '3.12'",
"jinja2 >=3.1.6; python_version >= '3.12'",
"charmlibs-rollingops>=1.1.1; python_version >= '3.12'",
]
vm = [
"pysyncobj>=0.3.15; python_version >= '3.12'",
"psutil>=7.2.2; python_version >= '3.12'",
"charmlibs-snap>=1.0.1; python_version >= '3.12'",
"charmlibs-systemd>=1.0.0.post0; python_version >= '3.12'"
]
db-driver = [
"psycopg2>=2.9.10",
]
[build-system]
requires = ["uv_build>=0.11.0,<0.12.0"]
build-backend = "uv_build"
[tool.uv]
exclude-newer = "1 day"
[tool.uv.build-backend]
module-name = "single_kernel_postgresql"
module-root = ""
[dependency-groups]
format = [
"ruff==0.15.21"
]
lint = [
"codespell==2.4.2",
"ty==0.0.59"
]
unit = [
"coverage[toml]==7.15.1",
"pytest==9.1.1"
]
[tool.uv.dependency-groups]
unit = {requires-python = ">=3.12"}
lint = {requires-python = ">=3.12"}
format = {requires-python = ">=3.12"}
# Testing tools configuration
[tool.coverage.run]
branch = true
[tool.coverage.report]
show_missing = true
[tool.pytest.ini_options]
minversion = "6.0"
log_cli_level = "INFO"
# Linting tools configuration
[tool.ruff]
# preview and explicit preview are enabled for CPY001
preview = true
target-version = "py312"
src = ["src", "."]
line-length = 99
[tool.ruff.lint]
explicit-preview-rules = true
select = ["A", "E", "W", "F", "C", "N", "D", "I001", "B", "CPY001", "RUF", "S", "SIM", "UP", "TCH"]
extend-ignore = [
"D203",
"D204",
"D213",
"D215",
"D400",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
]
# Ignore E501 because using black creates errors with this
# Ignore D107 Missing docstring in __init__
ignore = ["E501", "D107"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D100", "D101", "D102", "D103", "D104",
# Asserts
"B011",
# Disable security checks for tests
"S",
]
[tool.ruff.lint.flake8-copyright]
# Check for properly formatted copyright header in each file
author = "Canonical Ltd."
notice-rgx = "Copyright\\s\\d{4}([-,]\\d{4})*\\s+"
min-file-size = 1
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ty.environment]
python = ".tox/lint/"
python-version = "3.12"
[tool.ty.src]
exclude = ["tests", "single_kernel_postgresql/lib"]