-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (116 loc) · 3.28 KB
/
pyproject.toml
File metadata and controls
133 lines (116 loc) · 3.28 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
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "platform_problem_monitoring_core"
version = "0.1.11"
description = "A tool for monitoring platform problems using Elasticsearch logs"
authors = [
{name = "Platform Team"}
]
readme = "README.md"
requires-python = ">=3.10"
license = {text = "Proprietary"}
dependencies = [
"boto3>=1.28.0",
"drain3>=0.9.6",
"jinja2>=3.0.0",
"argparse>=1.4.0",
"requests>=2.25.0",
"matplotlib>=3.7.0",
"seaborn>=0.12.0",
"typing-extensions>=4.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.1.0",
"black>=23.0.0",
"flake8>=6.0.0",
"mypy>=1.0.0",
"isort>=5.12.0",
"ruff>=0.1.9",
"pre-commit>=3.3.2",
"bandit>=1.7.5",
"types-requests>=2.0.0",
"types-boto3>=1.0.0",
"types-seaborn>=0.12.0",
]
[tool.setuptools]
packages = ["platform_problem_monitoring_core"]
package-dir = {"" = "src"}
# Add package data to include resources in the wheel
[tool.setuptools.package-data]
platform_problem_monitoring_core = ["resources/*.html"]
# Add data files to include configuration templates
[tool.setuptools.data-files]
"etc/platform_problem_monitoring_core" = ["etc/*.dist"]
"bin" = ["bin/*"]
[tool.black]
line-length = 120
target-version = ["py310", "py311", "py312", "py313"]
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = "drain3.*"
ignore_missing_imports = true
[tool.isort]
profile = "black"
line_length = 120
multi_line_output = 3
[tool.pytest]
testpaths = ["src/tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "--strict-markers"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
]
[tool.coverage.run]
source = ["platform_problem_monitoring_core"]
omit = ["*/tests/*", "*/venv/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError",
]
[tool.ruff]
# General configuration
line-length = 120
target-version = "py313"
[tool.ruff.lint]
# Enable pycodestyle (E), Pyflakes (F), McCabe complexity (C90), isort (I),
# pep8-naming (N), flake8-builtins (A), flake8-bugbear (B), flake8-comprehensions (C4),
# flake8-docstrings (D), flake8-errmsg (EM), flake8-logging-format (G), flake8-simplify (SIM),
# flake8-unused-arguments (ARG), flake8-pytest-style (PT), flake8-use-pathlib (PTH)
select = ["E", "F", "C90", "I", "N", "A", "B", "C4", "D", "EM", "G", "SIM", "ARG", "PT", "PTH"]
ignore = ["D203", "D212"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.bandit]
exclude_dirs = ["venv"]
skips = ["B101"] # Skip assert warning as we use it in tests