-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
99 lines (81 loc) · 2.54 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
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.
[tool.poetry]
name = "postgresql-test-app"
version = "0.0.1-dev.0"
description = ""
authors = []
license = "Apache-2.0"
readme = "README.md"
homepage = "https://charmhub.io/postgresql-test-app"
repository = "https://github.com/canonical/postgresql-test-app"
[tool.poetry.dependencies]
python = "^3.10"
ops-lib-pgsql = "^1.4"
ops = "^2.16.0"
tenacity = "^9.0.0"
psycopg2 = "^2.9.9"
[tool.poetry.group.charm-libs.dependencies]
# data_platform_libs/v0/data_interfaces.py
ops = ">=2.0.0"
[tool.poetry.group.format]
optional = true
[tool.poetry.group.format.dependencies]
ruff = "^0.6.3"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
codespell = "2.3.0"
[tool.poetry.group.integration]
optional = true
[tool.poetry.group.integration.dependencies]
pytest = "^8.3.2"
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.1", subdirectory = "python/pytest_plugins/github_secrets"}
pytest-operator = "^0.36.0"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.1", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.1", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
# renovate caret doesn't work: https://github.com/renovatebot/renovate/issues/26940
juju = "<=3.5.2.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# Formatting tools configuration
[tool.black]
line-length = 99
target-version = ["py38"]
# Linting tools configuration
[tool.ruff]
# preview and explicit preview are enabled for CPY001
preview = true
target-version = "py38"
src = ["src", "."]
line-length = 99
[tool.ruff.lint]
explicit-preview-rules = true
select = ["A", "E", "W", "F", "C", "N", "D", "I001", "CPY001"]
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"]
[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+"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "google"