generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
111 lines (93 loc) · 3.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
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
[tool.poetry]
package-mode = false
[tool.poetry.dependencies]
python = "^3.10"
# breaking change in ops 2.10.0: https://github.com/canonical/operator/pull/1091#issuecomment-1888644075
ops = "^2.9.0, <2.10"
lightkube = "^0.15.3"
tenacity = "^8.5.0"
jinja2 = "^3.1.4"
poetry-core = "^1.9.0"
requests = "^2.32.3"
[tool.poetry.group.charm-libs.dependencies]
# data_platform_libs/v0/data_interfaces.py
ops = ">=2.0.0"
# loki-k8s/v1/loki_push_api.py and prometheus_k8s/v0/prometheus_scrape.py
cosl = "*"
# tempo_coordinator_k8s/v0/charm_tracing.py
opentelemetry-exporter-otlp-proto-http = "1.21.0"
# tempo_coordinator_k8s/v0/tracing.py
pydantic = "*"
# tls_certificates_interface/v1/tls_certificates.py
cryptography = "*"
jsonschema = "*"
[tool.poetry.group.format]
optional = true
[tool.poetry.group.format.dependencies]
ruff = "^0.4.5"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
ruff = "^0.4.5"
codespell = "^2.3.0"
[tool.poetry.group.unit.dependencies]
pytest = "^8.2.2"
pytest-xdist = "^3.6.1"
pytest-forked = "^1.6.0" # Workaround to deal with memory leaks in scenario tests
pytest-cov = "^5.0.0"
ops-scenario = "^6.0.3, <6.0.4" # 6.0.4 requires ops >= 2.12
ops = "^2.9.0"
[tool.poetry.group.integration.dependencies]
pytest = "^8.2.2"
pytest-operator = "^0.35.0"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.0.2", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.0.2", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
juju = "^3.5.2.0"
mysql-connector-python = "~8.0.33"
pyyaml = "^6.0.1"
tenacity = "^8.5.0"
allure-pytest = "^2.13.5"
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.0.2", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
[tool.coverage.run]
branch = true
[tool.coverage.report]
show_missing = true
[tool.pytest.ini_options]
minversion = "6.0"
log_cli_level = "INFO"
markers = ["unstable"]
# Formatting 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", "I", "CPY001"]
ignore = [
# Missing docstring in public method (pydocstyle doesn't look for docstrings in super class
# https://github.com/PyCQA/pydocstyle/issues/309) TODO: add pylint check? https://github.com/PyCQA/pydocstyle/issues/309#issuecomment-1284142716
"D102",
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D403", # First word of the first line should be capitalized (false positive on "MySQL")
"D415", # Docstring first line punctuation (doesn't make sense for properties)
"E501", # Line too long (because using black creates errors with this)
"N818", # Exception name should be named with an Error suffix
"W505", # Doc line too long (so that strings in comments aren't split across lines)
]
[tool.ruff.lint.per-file-ignores]
# D100, D101, D102, D103: Ignore missing docstrings in tests
"tests/*" = ["D1"]
[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"