-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
156 lines (139 loc) · 3.17 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
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools>=43.0.0", "wheel"] # PEP 508 specifications.
[tool.black]
# https://black.readthedocs.io/en/stable/?badge=stable
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \\datafold.egg-info
| \.idea
| \.vscode
| \.ruff_cache
| \.run
| \.venv
| \__pycache__
| \.pytest_cache
| \.mypy_cache
| \build
| \\dist
| \\joss\_paper
| \\coverage
)/
)
'''
[tool.pytest.ini_options]
# https://docs.pytest.org/en/stable/customize.html
minversion = "7.0"
pythonpath = "/datafold"
[tool.coverage.run]
# https://coverage.readthedocs.io/en/latest/config.html#
source=["datafold"]
omit=["*/tests/*",
"datafold/_version.py",
"datafold/_decorators.py",
"datafold/__init__.py",
"datafold/*/__init__.py",
"datafold/utils/_systems.py",
"datafold/utils/plot.py"]
[tool.coverage.report]
exclude_lines =["pragma: no cover",
"if __name__ == .__main__.:"]
[tool.ruff]
include = ["*.py"]
# mostly taken from pandas
line-length = 95
target-version = "py39"
fix = false
unfixable = ["E711"]
select = [
# pyflakes
"F",
# pycodestyle
"E",
"W",
# pydocstyle
# "D",
# flake8-2020
"YTT",
# flake8-builtins
"A",
# flake8-bugbear
"B",
# flake8-quotes
"Q",
# pylint
"PLE", "PLR", "PLW",
# misc lints
"PIE",
# tidy imports
"TID",
# implicit string concatenation
"ISC",
# type-checking imports
"TCH",
# NumPy
"NPY",
# flake8-use-pathlib
"PTH",
"RUF100",
# TODO: may be included in the future
# Pandas # may require some configuration
# "PD",
# "C90" # detects too complex functions
# "pydocstyle" # requires a lot of work
# "ANN" # requires a lot of work
]
ignore = [
# space before : (needed for how black formats slicing)
# "E203", # not yet implemented
# module level import not at top of file
"E402",
# tailing whitespace (already included in autoformatters in black and pre-commit hook)
"W291",
# do not assign a lambda expression, use a def
"E731",
# controversial
"B008",
# Too many arguments to function call
"PLR0913",
# Too many returns
"PLR0911",
# Too many branches
"PLR0912",
# Too many statements
"PLR0915",
# Function definition does not bind loop variable
"B023",
# Checks that don't pass yet
# Within an except clause, raise exceptions with ...
"B904",
# Magic number
"PLR2004",
# Outer loop variable overwritten by inner assignment
"PLW2901",
# Consider `elif` instead of `else` then `if` to remove indentation level
"PLR5501",
]
exclude = [
".mypy_cache/",
".pytest_cache/",
".venv/",
"datafold.egg-info/",
".run/",
"coverage/",
"build/",
]
[tool.ruff.pydocstyle]
convention = "numpy" # only set if ruleset "D" is included sometime in the future
[tool.ruff.per-file-ignores]
# relative imports allowed for asv_bench
"datafold/*/__init__.py" = ["F401"]
[tool.isort]
# https://pycqa.github.io/isort/
# see https://pycqa.github.io/isort/docs/configuration/black_compatibility.html
profile = "black"