-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathpyproject.toml
More file actions
159 lines (142 loc) · 4.8 KB
/
pyproject.toml
File metadata and controls
159 lines (142 loc) · 4.8 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
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See file LICENSE for terms.
[tool.codespell]
# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override -
# this is only to allow you to run codespell interactively
skip = "./.git,./.github,./cpp/build,.*egg-info.*,./.mypy_cache"
# ignore short words, and typename parameters like OffsetT
ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b"
ignore-words-list = "inout,unparseable,falsy,couldn,Couldn,thirdparty"
builtin = "clear"
quiet-level = 3
[tool.isort]
# Define known first party modules explicitly to avoid directory name dependency.
# Without this the isort/cython checks may fail if the repository clone is not
# named `rapidsmpf`.
known_first_party = ["rapidsmpf", "librapidsmpf"]
[tool.mypy]
exclude = ["_deps/*"]
ignore_missing_imports = true
warn_return_any = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = "rapidsmpf.*"
disallow_untyped_defs = true
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib", # Dask subprocesses fail to import RAPIDSMPF otherwise
]
[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py311"
fix = true
[tool.ruff.lint]
select = [
"E", # pycodestyle
"W", # pycodestyle
"F", # Pyflakes
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # flake8-docstrings
"D213", # Augment NumPy docstring convention: Multi-line docstring summary should start at the second line
"D417", # Augment NumPy docstring convention: Missing argument descriptions
"I", # isort
"ISC", # flake8-implicit-str-concat
"INP", # flake8-no-pep420 (namespace packages)
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"PLC", # pylint-convention
"PLE", # pylint-error
# Not enabling PLR (pylint-refactor) since it conflicts with other rules
"PLW", # pylint-warning
"PERF", # perflint
"UP", # pyupgrade
"PT", # flake8-pytest-style
# https://docs.astral.sh/ruff/rules/#flake8-return-ret
"RET502", # no implicit return
"RET503", # no implicit return
"RET504", # no implicit return
"RUF", # Ruff-specific rules
"PTH", # flake8-use-pathlib
"FA", # flake8-future-annotations
"PIE", # flake8-pie
"TD", # flake8-todos
"TRY", # tryceratops
"FBT", # flake8-boolean-trap
]
ignore = [
# Line length regulated by formatter
"E501",
# pydocstyle: http://www.pydocstyle.org/en/stable/error_codes.html
"D401", # Relax NumPy docstring convention: First line should be in imperative mood
# pylint
"PLC0415", # import-outside-top-level
# flake8-pytest-style:
"PT011", # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception
# flake8-simplify
"SIM108", # Use ternary operator
# flake8-todos
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
# tryceratops
"TRY003", # Avoid specifying long messages outside the exception class
# Lints below are turned off because of conflicts with the ruff
# formatter
# See https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191", # tab-indentation
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"Q002", # bad-quotes-docstring
"Q003", # avoidable-escaped-quote
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
]
fixable = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"**/tests/**/*.py" = ["D", "INP001"]
[tool.ruff.lint.flake8-pytest-style]
# https://docs.astral.sh/ruff/settings/#lintflake8-pytest-style
fixture-parentheses = false
mark-parentheses = false
parametrize-names-type = "csv"
parametrize-values-type = "list"
parametrize-values-row-type = "tuple"
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.flake8-bugbear]
# Allow default arguments of classes we consider immutable, e.g., `data: Options = Options()`.
extend-immutable-calls = ["rapidsmpf.config.Options"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.ruff.lint.isort]
case-sensitive = true
combine-as-imports = true
order-by-type = true
default-section = "third-party"
section-order = [
"future",
"standard-library",
"third-party",
"rapids",
"rapidsmpf",
"first-party",
"local-folder"
]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.isort.sections]
rapidsmpf = ["rapidsmpf"]
rapids = ["rmm", "pylibcudf", "cudf"]
[tool.ruff.format]
docstring-code-format = true