-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
164 lines (143 loc) · 3.94 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
154
155
156
157
158
159
160
161
162
163
164
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "log-tool"
dynamic = ["version"]
description = 'DESCRIPTION'
readme = "README.md"
requires-python = ">=3.8"
license = "MIT"
keywords = []
authors = [
{ name = "Flavio Amurrio", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"pyfunctional",
"rich",
"typer",
"typing-extensions",
]
[project.scripts]
log-tool = "log_tool:app_logtool"
[project.urls]
Documentation = "https://github.com/FlavioAmurrioCS/log-tool#readme"
Issues = "https://github.com/FlavioAmurrioCS/log-tool/issues"
Source = "https://github.com/FlavioAmurrioCS/log-tool"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/log_tool/_version.py"
[tool.hatch.envs.default]
dependencies = [
"coverage[toml]>=6.5",
"pytest",
"setuptools-scm",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
test-cov = "coverage run -m pytest {args:tests}"
cov-report = [
"- coverage combine",
"coverage report",
]
cov = [
"test-cov",
"cov-report",
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.types]
dependencies = [
"mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/log_tool tests}"
[tool.coverage.run]
source_pkgs = ["log_tool", "tests"]
branch = true
parallel = true
omit = [
"src/log_tool/__about__.py",
]
[tool.coverage.paths]
log_tool = ["src/log_tool", "*/log-tool/src/log_tool"]
tests = ["tests", "*/log-tool/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
# COMMON SETTINGS BELOW
[tool.pyright]
pythonVersion = "3.8"
[tool.mypy]
python_version = "3.8"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[tool.hatch.envs.hatch-static-analysis]
config-path = "none"
[tool.ruff]
line-length = 100
select = [
"ALL",
]
ignore = [
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"COM812", # missing-trailing-comma
"D100", # undocumented-public-module
"D101", # undocumented-public-class
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D107", # undocumented-public-init
"ERA001", # commented-out-code
"I", # isort # DO NOT ENABLE https://github.com/astral-sh/ruff/issues/4670
"ISC001", # single-line-implicit-string-concatenation
"PGH003", # blanket-type-ignore
"PTH", # flake8-use-pathlib # DO NOT ENABLE, we prefere non pathlib
"T20", # flake8-print # DO NOT ENABLE, we use prints
"D203", # one-blank-line-before-class
"D212", # multi-line-summary-first-line
"D401", # non-imperative-mood
]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 100
# https://github.com/astral-sh/ruff/issues/4368
[tool.ruff.per-file-ignores]
"tests/**/*.py" = [
"S101", # assert
"E501", # line-too-long
"INP001", # implicit-namespace-package
]
[tool.tox]
legacy_tox_ini = """
[tox]
skip_missing_interpreters = True
envlist = py38, py39, py310, py311, py312
[testenv]
deps = pytest
commands =
; mypy --ignore-missing-imports --scripts-are-modules comma
pytest -W ignore::DeprecationWarning -W ignore::PendingDeprecationWarning {posargs:tests}
"""