-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (128 loc) · 3.63 KB
/
Copy pathpyproject.toml
File metadata and controls
148 lines (128 loc) · 3.63 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "config-mate"
dynamic = ["version"]
description = 'Library to recursively read YAML/JSON/XML configurations with JSON Reference'
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = []
authors = [
{ name = "Fabrice Brito", email = "info@terradue.com" },
{ name = "Simone Tripodi", email = "info@terradue.com"}
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"click==8.4.2",
"ruamel.yaml==0.19.1",
"jsonref==1.1.0",
"loguru==0.7.3",
"xmltodict==1.0.4",
"pydantic==2.13.4",
"session-adapters==0.5.0"
]
[project.urls]
Documentation = "https://terradue.github.io/config-mate/"
Issues = "https://github.com/Terradue/config-mate/issues"
Source = "https://github.com/Terradue/config-mate"
[project.scripts]
config-mate = "config_mate.main:main"
[tool.hatch.version]
path = "src/config_mate/__about__.py"
[tool.coverage.run]
source = ["config_mate"]
branch = true
parallel = true
omit = [
"src/config_mate/__about__.py",
]
[tool.coverage.paths]
config_mate = ["src/config_mate", "*/config-mate/src/config_mate"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.hatch.envs.default]
skip-install = false
[tool.hatch.envs.prod]
path = "/app/envs/config-mate"
[tool.hatch.envs.test]
skip-install = false
dependencies = [
"pytest>=8.4,<10",
"pytest-cov>=6.2,<8",
]
[tool.hatch.envs.test.scripts]
test = "pytest {args:tests}"
testv = "pytest --verbose {args:tests}"
test-cov = "pytest --cov=config_mate --cov-report=term-missing {args:tests}"
test-show-setup = "pytest --setup-show"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"--strict-config",
"--strict-markers",
]
[[tool.mypy.overrides]]
module = [
"jsonref",
"session_adapters.*",
]
ignore_missing_imports = true
[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]
[tool.hatch.envs.dev]
skip-install = false
dependencies = [
"pytest>=8.4,<10",
"mypy>=2.3.0",
"ruff>=0.16.0",
"bandit>=1.9.4",
]
[tool.ruff.lint]
# Start with the essential rules
select = [
"F", # Pyflakes (Critical for bugs)
"E", # pycodestyle Errors
"W", # pycodestyle Warnings
"I", # isort (Import sorting)
"UP", # pyupgrade (Modern syntax)
"B", # flake8-bugbear (Common bugs)
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"FA", # flake8-future-annotations
"TC", # flake8-type-checking
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"C90", # McCabe Complexity (Enables C901)
]
# Ignore rules that conflict with the formatter (Ruff Format/Black)
ignore = [
"E501", # Line too long (handled by formatter)
"W191", # Tab indentation (handled by formatter)
"E111", # Indentation issues (handled by formatter)
"E114", # Indentation issues (handled by formatter)
"E117", # Over-indented (handled by formatter)
]
[tool.ruff.lint.mccabe]
# Flag errors (C901) whenever complexity exceeds 10 (default is 10)
max-complexity = 10
[tool.hatch.envs.dev.scripts]
typecheck = "mypy --install-types --non-interactive {args:src tests}"
lint = "ruff format {args:src tests}"
check = "ruff check --fix {args:src tests}"
security = "bandit -r {args:src}"