-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
215 lines (187 loc) · 5.87 KB
/
pyproject.toml
File metadata and controls
215 lines (187 loc) · 5.87 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'
[tool.hatch.version]
path = 'criteria_pattern/__init__.py'
[tool.hatch.build.targets.sdist]
include = ['criteria_pattern/']
[project]
name = 'criteria-pattern'
description = 'The Criteria Pattern is a Python package that simplifies and standardizes criteria based filtering, validation and selection.'
readme = './README.md'
authors = [{ name = 'Adria Montoto' }]
license = 'MIT'
classifiers = [
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Typing :: Typed',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
]
keywords = [
'python',
'development',
'tools',
'utilities',
'criteria',
'pattern',
'filtering',
'validation',
'selection',
]
requires-python = '>=3.11'
dependencies = ['value-object-pattern>=1.20.0']
dynamic = ['version']
[project.urls]
Homepage = 'https://github.com/adriamontoto/criteria-pattern'
Repository = 'https://github.com/adriamontoto/criteria-pattern'
Issues = 'https://github.com/adriamontoto/criteria-pattern/issues'
[dependency-groups]
audit = ['pip-audit>=2.9.0']
coverage = ['coverage[toml]>=7.0.0', 'smokeshow>=0.5.0']
develop = ['pre-commit>=3.1.0']
format = ['ruff>=0.11.10']
lint = ['ruff>=0.11.10', 'mypy[reports]>=1.0.0', { include-group = 'test' }]
release = ['build>=1.2.2', 'python-semantic-release>=10.0.2']
test = [
'pytest>=8.0.0',
'pytest-randomly>=3.0.0',
'sqlglot[rs] >=27.13.2',
'object-mother-pattern>=3.6.0',
{ include-group = 'coverage' },
]
all = [
{ include-group = 'audit' },
{ include-group = 'coverage' },
{ include-group = 'develop' },
{ include-group = 'format' },
{ include-group = 'lint' },
{ include-group = 'release' },
{ include-group = 'test' },
]
[tool.pytest.ini_options]
pythonpath = '.'
addopts = [
'--strict-config', # fail if an unregistered option is used
'--strict-markers', # fail if an unregistered marker is used
'--color=yes', # color the output
]
markers = ['unit_testing: Check a unique functionality']
xfail_strict = true
[tool.coverage.run]
source = ['criteria_pattern']
parallel = true
branch = true
relative_files = true
[tool.coverage.report]
show_missing = true
skip_covered = true
precision = 2
exclude_lines = [
'pragma: no cover',
'raise NotImplementedError',
'if TYPE_CHECKING:',
'if typing.TYPE_CHECKING:',
'@overload',
'@typing.overload',
'typing.assert_never',
'assert_never',
]
omit = ['*mother.py']
[tool.coverage.paths]
source = ['criteria_pattern']
[tool.ruff]
indent-width = 4
line-length = 120
target-version = 'py313'
output-format = 'grouped'
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 120
indent-style = 'space'
quote-style = 'single'
skip-magic-trailing-comma = false
[tool.ruff.lint]
select = [
'F', # pyflakes
'S', # flake8-bandit
'B', # flake8-bugbear
'DTZ', # flake8-datetimez
'C4', # flake8-comprehensions
'SIM', # flake8-simplify
'I', # isort
'C90', # mccabe
'N', # pep8-naming
'PERF', # perflint
'E', # pycodestyle
'W', # pycodestyle
'D', # pydocstyle
'UP', # pyupgrade
'RUF', # ruff
]
ignore = [
'UP035', # Checks for uses of deprecated imports based on the minimum supported Python version.
'UP036', # Checks for conditional blocks gated on sys.version_info comparisons that are outdated for the minimum supported Python version.
'E111', # Checks for indentation with a non-multiple of 4 spaces.
'E114', # Checks for indentation of comments with a non-multiple of 4 spaces.
'E117', # Checks for over-indented code.
'W191', # Checks for indentation that uses tabs.
'D200', # Checks for single-line docstrings that are broken across multiple lines.
'D205', # 1 blank line required between summary line and description.
'D206', # Checks for docstrings that are indented with tabs.
'D212', # Checks for docstring summary lines that are not positioned on the first physical line of the docstring.
'D401', # First line of docstring should be in imperative mood.
'D300', # Checks for docstrings that use '''triple single quotes''' instead of 'triple double quotes'.
'RUF100', # Checks for unused noqa directives.
'RUF043', # Checks for containing groups in patterns in match= statements.
]
[tool.ruff.lint.per-file-ignores]
'__init__.py' = [
'F401', # Checks for unused imports.
'D104', # Checks for undocumented public package definitions.
]
'**test**.py' = [
'S101', # Use of `assert` detected.
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = 'pep257'
[tool.ruff.lint.isort]
case-sensitive = true
extra-standard-library = ['typing_extensions']
known-first-party = ['criteria_pattern']
combine-as-imports = true
[tool.mypy]
strict = true
warn_unreachable = true
enable_error_code = [
'redundant-expr',
'possibly-undefined',
'truthy-bool',
'explicit-override',
]
[tool.semantic_release]
allow_zero_version = true
commit_message = 'bump: new version {version} released'
commit_parser = 'conventional'
major_on_zero = true
no_git_verify = false
tag_format = 'v{version}'
version_variables = ['criteria_pattern/__init__.py:__version__']
[tool.semantic_release.commit_parser_options]
minor_tags = ['feat']
patch_tags = ['fix', 'perf', 'build']
allowed_tags = ['feat', 'fix', 'perf', 'build']
default_bump_level = 0
parse_squash_commits = false
ignore_merge_commits = true
[tool.semantic_release.changelog]
template_dir = 'docs/changelog_template'
mode = 'update'
exclude_commit_patterns = ['''Merged? .*''']