-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
75 lines (59 loc) · 2.17 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
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.
[tool.poetry]
package-mode = false
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.group.format]
optional = true
[tool.poetry.group.format.dependencies]
ruff = "^0.8.0"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
ruff = "^0.8.0"
codespell = "2.3.0"
[tool.poetry.group.integration.dependencies]
pytest = "^8.3.3"
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.1.0", subdirectory = "python/pytest_plugins/github_secrets"}
pytest-operator = "^0.38.0"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.1.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.1.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.1.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
# renovate caret doesn't work: https://github.com/renovatebot/renovate/issues/26940
juju = ">=3.5.2.1"
mysql-connector-python = "~8.0.33"
allure-pytest = "^2.13.5"
# 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"
asyncio_mode = "auto"
markers = ["unstable"]
# Formatting tools configuration
[tool.ruff]
# preview and explicit preview are enabled for CPY001
preview = true
target-version = "py38"
line-length = 99
[tool.ruff.lint]
explicit-preview-rules = true
select = ["A", "E", "W", "F", "C", "N", "D", "I", "CPY001"]
ignore = [
"D107", # Ignore D107 Missing docstring in __init__
"E501", # Ignore E501 Line too long
]
[tool.ruff.lint.per-file-ignores]
"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"