forked from materialsvirtuallab/matgl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
123 lines (114 loc) · 2.9 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
[build-system]
requires = [
# pin NumPy version used in the build
"oldest-supported-numpy",
"setuptools>=58.0.3",
]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 120
target-version = ['py39']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| test_files
)/
)
'''
[tool.ruff]
target-version = "py39"
line-length = 120
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle error
"EXE", # flake8-executable
"F", # pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PD", # pandas-vet
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PYI", # flakes8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TCH", # flake8-type-checking
"TID", # tidy imports
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle warning
"YTT", # flake8-2020
]
ignore = [
"B019", # functools.lru_cache on methods can lead to memory leaks
"D105", # Missing docstring in magic method
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"PD901", # df-bad-var-name
"PERF203", # try-except-in-loop
"PLR", # pylint refactor
"PLW0603", # Using the global statement to update variables is discouraged
"PLW2901", # redefined-loop-name
"RET504", # unnecessary-assign
"SIM105", # Use contextlib.suppress(OSError) instead of try-except-pass
]
pydocstyle.convention = "google"
isort.required-imports = ["from __future__ import annotations"]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
"setup.py" = ["D"]
"tasks.py" = ["D"]
"tests/**/*" = ["D", "PERF"]
"docs/**/*" = ["D"]
"examples/**/*" = ["D"]
[tool.pytest.ini_options]
addopts = "--durations=30 --quiet -rXs --color=yes -p no:warnings"
[tool.mypy]
ignore_missing_imports = true
explicit_package_bases = true
no_implicit_optional = false
exclude = ['examples', 'tests']
[[tool.mypy.overrides]]
module = ["requests.*", "tabulate.*"]
ignore_missing_imports = true
[tool.codespell]
ignore-words-list = "mater,te,nd,bu"
check-filenames = true
[tool.coverage.run]
relative_files = true
[tool.coverage.report]
exclude_lines = [
"@deprecated",
"def __repr__",
"except PackageNotFoundError:",
"if 0:",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"if self.debug:",
"if settings.DEBUG",
"input",
"logging.basicConfig",
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"raise RuntimeError",
]