-
Notifications
You must be signed in to change notification settings - Fork 82
/
pyproject.toml
177 lines (155 loc) · 4.74 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
165
166
167
168
169
170
171
172
173
174
175
176
177
[tool.pytest.ini_options]
collect_ignore = ["setup.py", "benchmark/"]
[tool.coverage.run]
branch = true
source = ['tiatoolbox']
omit = ['tests/*', 'tiatoolbox/__main__.py', '*/utils/env_detection.py', 'tiatoolbox/typing.py']
[tool.coverage.report]
exclude_lines = [
'if self.debug:',
'pragma: no cover',
'raise NotImplementedError',
'if __name__ == .__main__.:',
]
ignore_errors = true
omit = ['tests/*', 'tiatoolbox/__main__.py', '*/utils/env_detection.py', 'tiatoolbox/typing.py']
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.distutils.bdist_wheel]
universal = true
[tool.poetry]
name = "TIA Centre"
version = "1.5.1"
description = "test"
authors = ["TIA Centre <[email protected]>"]
[tool.poetry_bumpversion.file."tiatoolbox/__init__.py"]
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'
[[tool.poetry_bumpversion.replacements]]
files = ["setup.py"]
search = 'version="{current_version}"'
replace = 'version="{new_version}"'
[[tool.poetry_bumpversion.replacements]]
files = ["CITATION.cff"]
search = 'version: {current_version} # TIAToolbox version'
replace = 'version: {new_version} # TIAToolbox version'
[[tool.poetry_bumpversion.replacements]]
files = [".github/workflows/docker-publish.yml"]
search = 'TOOLBOX_VER: {current_version}'
replace = 'TOOLBOX_VER: {new_version}'
[tool.ruff]
lint.select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"D", # pydocstyle, need to enable for docstrings check.
"E", # pycodestyle - Error
"F", # pyflakes
"G", # flake8-logging-format
"I", # Isort
"N", # pep8-naming
"S", # flake8-bandit
"W", # pycodestyle - Warning
"Q", # flake8-quotes
"C4", # flake8-comprehensions
"FA", # flake8-future-annotations
"EM", # flake8-errmsg
"PD", # pandas-vet
"PL", # Pylint
"PT", # flake8-pytest-style
"TD", # flake8-todos
"UP", # pyupgrade
"C90", # mccabe
"T10", # flake8-debugger
"T20", # flake8-print
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"BLE", # flake8-blind-except
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"ERA", # eradicate
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"NPY", # NumPy-specific rules
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"TRY", # tryceratops
"YTT", # flake8-2020
"PERF", # Perflint
"SLOT", # flake8-slots
"ASYNC", # flake8-async
]
# Ignore rules which conflict with ruff formatter.
lint.ignore = ["COM812", "ISC001",]
# Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
lint.fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
lint.unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".eggs",
".git",
".ruff_cache",
".svn",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"venv",
]
# Ignore `F401` (import violations) in all `__init__.py` files.
lint.per-file-ignores = {"__init__.py" = ["F401"], "tests/*" = ["T201", "PGH001", "SLF001", "S101", "PLR2004"], "benchmarks/*" = ["T201", "INP001"], "pre-commit/*" = ["T201", "INP001"], "tiatoolbox/cli/*" = ["PLR0913"]}
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Minimum Python version 3.9.
target-version = "py39"
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 14
# need to enable for docstrings check.
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.format]
exclude = [
".eggs",
".git",
".ruff_cache",
".svn",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"venv",
".hg",
".mypy_cache",
"buck-out",
"docs",
"data",
"setup.py",
]
skip-magic-trailing-comma = false
[tool.mypy]
ignore_missing_imports = true
python_version = 3.9