-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
110 lines (99 loc) · 3.6 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "recurtools"
description = "Tools for handling recursive sequences (of sequences of sequences of ...)"
readme = "README.md"
license = {text = "MIT"}
authors = [{name = "Mike Foster"}]
dynamic = ["version"]
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
"Natural Language :: English",
]
[project.urls]
Homepage = "https://github.com/MusicalNinjaDad/recurtools"
Documentation = "https://musicalninjadad.github.io/recurtools/"
Repository = "https://github.com/MusicalNinjaDad/recurtools"
Issues = "https://github.com/MusicalNinjaDad/recurtools/issues"
Changelog = "https://github.com/MusicalNinjaDad/recurtools/blob/main/CHANGELOG.md"
[tool.setuptools.dynamic]
version = {file = "__version__"}
[tool.setuptools.packages.find]
where = ["."]
[project.optional-dependencies]
dev = [
"black",
"mkdocs",
"mkdocstrings[python]",
"mkdocs-material",
"numpy",
"pytest",
"pytest-doctest-mkdocstrings",
"ruff",
]
[tool.pytest.ini_options]
xfail_strict=true
addopts = [
"--doctest-modules",
"--doctest-mdcodeblocks",
"--doctest-glob='*.md'",
]
[tool.coverage.run]
branch=true
omit=["test_*"]
dynamic_context = "test_function"
[tool.ruff]
line-length = 120
format.skip-magic-trailing-comma = false
format.quote-style = "double"
[tool.ruff.lint]
select = ["ALL"]
flake8-pytest-style.fixture-parentheses = false
flake8-annotations.mypy-init-return = true
pydocstyle.convention = "numpy"
ignore = [
"D105", # Document magic methods in main docstring, not in own docstring
"D203", # We want D211 - no blank line before class docstring
"D204", # No blank line after class docstring
"D212", # We want D213 - Multiline docstrings start on second line
"D401", # First line of docstring does not need to be in imperative mood
"D406", # Finish headings with colon (:)
"D407", # We're not underlining sections
"D417", # Undocumented arguments - need to switch off if wrapping args in `arg`
"E701", # One-line ifs are not great, one-liners with suppression are worse
"ANN101", # Type annotation for `self`
"ANN202", # Return type annotation for private functions
"ANN401", # Using Any often enough that supressing individually is pointless
"W291", # Double space at EOL is linebreak in md-docstring
"W292", # Too much typing to add newline at end of each file
"W293", # Whitespace only lines are OK for us
]
extend-select = [
"D211", # We want D211 - no blank line before class docstring
"D213", # We want D213 - Multiline docstrings start on second line
"D400", # First lines should end in a period (.)
"D403", # First word of the first line should be capitalized
"D404", # First word of the docstring should not be "This"
"D405", # Section name should be properly capitalized
"D406", # Section name should end with a newline
]
[tool.ruff.lint.per-file-ignores]
# Additional ignores for tests
"**/test_*.py" = [
"INP001", # Missing __init__.py
"ANN", # Missing type annotations
"S101", # Use of `assert`
"PLR2004", # Magic number comparisons are OK in tests
"D1", # Don't REQUIRE docstrings for tests - but they are nice
]
"**/__init__.py" = [
"D104", # Don't require module docstring in __init__.py
"F401", # Unused imports are fine: using __init__.py to expose them with implicit __ALL__
]