-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (85 loc) · 2.49 KB
/
pyproject.toml
File metadata and controls
95 lines (85 loc) · 2.49 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
[build-system]
requires = ["setuptools", "wheel", "setuptools-scm", "pybind11>=2.8.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "src/psfmodels/_version.py"
[tool.check-manifest]
ignore = [
".github_changelog_generator",
".pre-commit-config.yaml",
"fig.png",
"notebooks/*",
"tests/*",
'src/psfmodels/_version.py',
]
[tool.ruff]
line-length = 88
target-version = "py37"
# https://beta.ruff.rs/docs/rules/
select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"D", # pydocstyle
"I", # isort
"UP", # pyupgrade
"C", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
]
# I do this to get numpy-style docstrings AND retain
# D417 (Missing argument descriptions in the docstring)
# otherwise, see:
# https://beta.ruff.rs/docs/faq/#does-ruff-support-numpy-or-google-style-docstrings
# https://github.com/charliermarsh/ruff/issues/2606
ignore = [
"D100", # Missing docstring in public module
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line should be in imperative mood
"D413", # Missing blank line after last section
"D416", # Section name should end with a colon
]
[tool.ruff.per-file-ignores]
"tests/*.py" = ["D"]
"setup.py" = ["D"]
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src/**/"
# strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
# # module specific overrides
# [[tool.mypy.overrides]]
# module = ["numpy.*",]
# ignore_errors = true
# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
filterwarnings = ["error"]
[tool.cibuildwheel]
# Skip 32-bit builds & PyPy wheels on all platforms
skip = ["*-win32", "pp*", "*i686"]
test-extras = ["testing"]
test-command = "pytest {project}/tests -v"
test-skip = "*-musllinux*"
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
# https://coverage.readthedocs.io/en/6.4/config.html
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"\\.\\.\\.",
"raise NotImplementedError()",
]
[tool.coverage.run]
source = ["src"]