-
Notifications
You must be signed in to change notification settings - Fork 14
/
pyproject.toml
122 lines (107 loc) · 3.64 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
112
113
114
115
116
117
118
119
120
121
122
[tool.poetry]
name = "mongodb"
version = "0.0.1"
description = ""
license = "Apache-2.0"
authors = []
readme = "README.md"
homepage = "https://charmhub.io/mongodb?channel=6/edge"
repository = "https://github.com/canonical/mongodb-operator"
[tool.poetry.dependencies]
python = "^3.10.12"
ops = "~2.15.0"
overrides = "^7.7.0"
pymongo = "^4.7.3"
tenacity = "^8.2.3"
pyyaml = "^6.0.1"
jinja2 = "^3.1.3"
poetry-core = "^1.9.0"
data-platform-helpers = "^0.1.3"
pyOpenSSL = "^24.2.1"
[tool.poetry.group.charm-libs.dependencies]
ops = "~2.15.0"
pydantic = "^1.10.7" # cos_agent lib
cryptography = "^42.0.5" # tls_certificates lib v3
jsonschema = "^4.22.0" # tls_certificates lib v3
cosl = "^0.0.16" # loki_push_api
pyOpenSSL = "^24.2.1"
[tool.poetry.group.format]
optional = true
[tool.poetry.group.format.dependencies]
black = "^24.4.2"
isort = "^5.13.2"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
flake8 = "^7.0.0"
flake8-docstrings = "^1.7.0"
flake8-copyright = "^0.2.4"
flake8-builtins = "^2.5.0"
pyproject-flake8 = "^7.0.0"
pep8-naming = "^0.13.3"
codespell = "^2.2.6"
shellcheck-py = "^0.10.0.1"
black = "^24.4.2"
isort = "^5.13.2"
[tool.poetry.group.unit.dependencies]
coverage = {extras = ["toml"], version = "^7.5.0"}
pytest = "^8.1.1"
parameterized = "^0.9.0"
pymongo = "^4.7.3"
# should not be updated unless https://github.com/juju/python-libjuju/issues/1093 is fixed
juju = "==3.5.0"
[tool.poetry.group.integration.dependencies]
allure-pytest = "^2.13.5"
ops = "~2.15.0"
tenacity = "^8.2.3"
pymongo = "^4.7.3"
parameterized = "^0.9.0"
# should not be updated unless https://github.com/juju/python-libjuju/issues/1093 is fixed
juju = "==3.5.0"
pytest = "^8.1.1"
pytest-asyncio = "^0.21.1"
pytest-mock = "^3.14.0"
pytest-operator = "^0.36.0"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
[build-system]
requires = ["poetry-core>=1.9.0"]
build-backend = "poetry.core.masonry.api"
# 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"
markers = ["unstable"]
asyncio_mode = "auto"
filterwarnings = [
"error:RuntimeWarning"
]
# Formatting tools configuration
[tool.black]
line-length = 99
target-version = ["py310"]
[tool.isort]
profile = "black"
# Linting tools configuration
[tool.flake8]
max-line-length = 99
max-doc-length = 99
max-complexity = 10
exclude = [".git", "__pycache__", ".tox", "build", "dist", "*.egg_info", "venv", "*.json", "tests/integration/*/lib/*"]
select = ["E", "W", "F", "C", "N", "R", "D", "H"]
# Ignore W503, E501 because using black creates errors with this
# Ignore D107 Missing docstring in __init__
ignore = ["W503", "E501", "D107", "N818"]
# D100, D101, D102, D103: Ignore missing docstrings in tests
per-file-ignores = ["tests/*:D100,D101,D102,D103,D104"]
docstring-convention = "google"
# Check for properly formatted copyright header in each file
copyright-check = "True"
copyright-author = "Canonical Ltd."
copyright-regexp = "Copyright\\s\\d{4}([-,]\\d{4})*\\s+%(author)s"