-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (162 loc) · 3.73 KB
/
Copy pathpyproject.toml
File metadata and controls
180 lines (162 loc) · 3.73 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
# vscode-python-2020.7.0 automatically loads if this file is present.
# https://github.com/microsoft/vscode-python/blob/master/CHANGELOG.md#enhancements-1
[tool.poetry]
name = "THAIF"
version = "0.0.0"
description = "MedShift"
authors = ["None <none@none.pt>"]
readme = "README.md"
license = "MIT"
[tool.black]
line-length = 120
color = true
target-version = ['py311']
include = '\.pyi?$'
exclude = '''
(
\.egg
| \.eggs
| \.git
| \.hg
| \.dvc
| \.mypy_cache
| \.pytest_cache
| \.nox
| \.tox
| \.venv
| \.venv-docs
| \.venv-dev
| \.venv-note
| \.venv-dempy
| _build
| build
| dist
| setup.py
)
'''
# `isort` configurations
[tool.isort]
# https://github.com/timothycrosley/isort
py_version = 311
profile = "black"
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 120
skip_gitignore = true
color_output = true
#known_typing = ["typing", "types", "typing_extensions", "mypy", "mypy_extensions"]
# `coverage` configurations
[tool.coverage.run]
source = ["src/thaif"]
branch = true
command_line = '-m pytest'
[tool.coverage.report]
exclude_lines = [
"pragma: nocover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"raise AssertionError",
]
show_missing = true
ignore_errors = true
skip_covered = true
#fail_under = 100
#precision = 1
omit = [
"test/*",
".venv*",
]
# `pytest` configurations
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-vv", "--doctest-modules"]
doctest_optionflags = "NORMALIZE_WHITESPACE"
testpaths = ["test"]
filterwarnings = ["ignore::DeprecationWarning"]
[tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html
python_version = 3.11
pretty = true
show_traceback = true
color_output = true
warn_return_any = true
warn_no_return = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
[tool.vulture]
paths = ["src"]
min_confidence = 65
[tool.pydocstyle]
convention = "google"
#ignore = "D205,D415"
[tool.interrogate]
# https://github.com/econchick/interrogate#configuration
ignore-init-method = true
fail-under = 95
color = true
# possible values: 0 (minimal output), 1 (-v), 2 (-vv)
verbose = 0
quiet = false
exclude = ["setup.py", "docs", "build"]
[tool.nbqa.config]
black = "pyproject.toml"
isort = "pyproject.toml"
[tool.nbqa.mutate]
isort = 1
black = 1
pyupgrade = 1
[tool.nbqa.addopts]
pyupgrade = ["--py36-plus"]
[tool.nbqa.files]
isort = "^notebooks/"
black = "^notebooks/"
flake8 = "^notebooks/"
mypy = "^notebooks/"
pydocstyle = "^notebooks/"
pyupgrade = "^notebooks/"
[tool.bandit]
targets = ["src"]
# (optional) list included test IDs here, eg '[B101, B406]':
tests = ["B201", "B301"]
# (optional) list skipped test IDs here, eg '[B101, B406]':
skips = ["B101", "B601"]
[tool.bandit.assert_used]
exclude = ["*_test.py", "test_*.py"]
# TODO
# https://github.com/terrencepreilly/darglint/issues/130
[tool.cruft]
skip = [".git"]
[tool.commitizen]
name = "cz_bitbucket_jira_conventional"
jira_base_url = "https://jira.fraunhofer.pt"
bitbucket_repo = "thaif"
bitbucket_project = "THAIF"
version = "0.0.0"
tag_format = "v$version"
version_files = [
"setup.py",
"pyproject.toml:version",
"VERSION"
]
bump_message = "release $current_version → $new_version [skip-ci]"
update_changelog_on_bump = true
changelog_incremental = true
unreleased_version = "v1.0.0"
annotated_tag = true
style = [
["qmark", "fg:#ff9d00 bold"],
["question", "bold"],
["answer", "fg:#ff9d00 bold"],
["pointer", "fg:#ff9d00 bold"],
["highlighted", "fg:#ff9d00 bold"],
["selected", "fg:#cc5454"],
["separator", "fg:#cc5454"],
["instruction", ""],
["text", ""],
["disabled", "fg:#858585 italic"]
]