-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
153 lines (126 loc) · 5.33 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
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
[tool.poetry] # https://python-poetry.org/docs/pyproject/
name = "orval"
version = "0.0.8"
description = "A Python package containing a small set of utility functions not found in Python's standard library. It is lightweight, written in pure Python, and has no dependencies."
authors = ["Maarten Huijsmans <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/lukin0110/orval/"
classifiers = [
"Typing :: Typed",
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet",
"Topic :: Utilities",
]
[build-system] # https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies] # https://python-poetry.org/docs/dependency-specification/
python = ">=3.10.0,<4.0"
[tool.poetry.group.dev.dependencies] # https://python-poetry.org/docs/master/managing-dependencies/
coverage = { extras = ["toml"], version = ">=7.4.1" }
ipython = ">=8.18.1"
mypy = "1.13.0"
poethepoet = ">=0.29.0"
pre-commit = ">=4.0.1"
pytest = ">=8.3.3"
pytest-clarity = ">=1.0.1"
pytest-mock = ">=3.14.0"
ruff = ">=0.8.4"
safety = ">=2.3.5,!=2.3.5"
shellcheck-py = ">=0.10.0"
typeguard = ">=4.4.1"
[[tool.poetry.source]] # https://python-poetry.org/docs/repositories/
name = "pypi"
priority = "primary"
[tool.coverage.report] # https://coverage.readthedocs.io/en/latest/config.html#report
fail_under = 89
precision = 1
show_missing = true
skip_covered = true
[tool.coverage.run] # https://coverage.readthedocs.io/en/latest/config.html#run
branch = true
command_line = "--module pytest"
data_file = "reports/.coverage"
source = ["src"]
[tool.coverage.xml] # https://coverage.readthedocs.io/en/latest/config.html#xml
output = "reports/coverage.xml"
[tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
junit_xml = "reports/mypy.xml"
strict = true
disallow_subclassing_any = false
disallow_untyped_decorators = false
explicit_package_bases = true
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
mypy_path = "src"
[tool.pytest.ini_options] # https://docs.pytest.org/en/latest/reference/reference.html#ini-options-ref
addopts = "--color=yes --doctest-modules --exitfirst --failed-first --strict-config --strict-markers --typeguard-packages=orval --verbosity=2 --junitxml=reports/pytest.xml"
filterwarnings = ["error", "ignore::DeprecationWarning"]
testpaths = ["src", "tests"]
xfail_strict = true
log_file_level = "info"
pythonpath = "src"
[tool.ruff] # https://github.com/charliermarsh/ruff
fix = true
line-length = 120
src = ["src", "tests"]
target-version = "py313"
force-exclude = true # https://docs.astral.sh/ruff/settings/#force-exclude
preview = true # https://docs.astral.sh/ruff/preview/
[tool.ruff.lint] # https://github.com/charliermarsh/ruff
ignore = ["D10", "FBT002", "G004", "D203", "D213", "E501", "EM101", "EM102", "FBT001", "ISC001", "RET504", "S101", "TRY003", "TRY300", "W505"]
select = ["A", "ASYNC", "B", "BLE", "C4", "C90", "D", "DTZ", "E", "EM", "ERA", "F", "FBT", "FLY", "FURB", "G", "I", "ICN", "INP", "INT", "ISC", "LOG", "N", "NPY", "PERF", "PGH", "PIE", "PLC", "PLE", "PLR", "PLW", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "S", "SIM", "SLF", "SLOT", "T10", "T20", "TCH", "TID", "TRY", "UP", "W", "YTT"]
unfixable = ["ERA001", "F401", "F841", "T201", "T203"] # https://docs.astral.sh/ruff/settings/#unfixable
[tool.ruff.lint.extend-per-file-ignores] # https://docs.astral.sh/ruff/settings/#extend-per-file-ignores
# Ignore missing __init__.py files in tests.
"tests/*" = ["INP001", "PLR2004"]
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["classmethod", "pydantic.validator", "pydantic.root_validator"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 100
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.poe.tasks] # https://poethepoet.natn.io/index.html
[tool.poe.tasks.lint]
help = "Lint this package"
[[tool.poe.tasks.lint.sequence]]
shell = '[ -d ".git" ] || { echo "\n\\033[0;31mGit is not initialized in this directory. Please run \"git init\" to fix linting.\\033[0m\n"; exit 1; }'
[[tool.poe.tasks.lint.sequence]]
cmd = """
pre-commit run
--all-files
--color always
"""
[tool.poe.tasks.safety]
help = "Run safety checks on this package"
shell = "safety check --continue-on-error --full-report"
[tool.poe.tasks.test]
help = "Test this package"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage run"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage report"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage xml"