-
Notifications
You must be signed in to change notification settings - Fork 14
/
pyproject.toml
149 lines (132 loc) · 3.74 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "geometer"
dynamic = ["version"]
description = "Python geometry package based on projective geometry and numpy."
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
keywords = ["geometry", "numpy", "mathematics", "projective geometry"]
authors = [
{ name = "Jan Müller", email = "" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"numpy>=1.22,<2.0"
]
[project.optional-dependencies]
docs = [
"sphinx>=7",
"sphinx-rtd-theme>=1.0"
]
[project.urls]
Documentation = "https://github.com/jan-mue/geometer#readme"
Issues = "https://github.com/jan-mue/geometer/issues"
Source = "https://github.com/jan-mue/geometer"
[tool.hatch.version]
path = "geometer/__version__.py"
[tool.hatch.envs.default]
features = [
"docs"
]
dependencies = [
"pytest",
"codecov",
"pre-commit",
"typing-extensions",
"mypy>=1.0.0"
]
[tool.hatch.envs.default.scripts]
tests = "coverage run -m pytest {args:tests}"
rtd-docs = "sphinx-build docs/ _readthedocs/html/"
[tool.black]
target-version = ["py39", "py310", "py311", "py312"]
line-length = 120
[tool.ruff]
target-version = "py39"
line-length = 120
exclude = [
"docs"
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
"TID", # flake8-tidy-imports
"NPY", # numpy-specific rules
"PERF", # perflint
"ARG", # flake8-unused-arguments
"BLE", # flake8-blind-except
"PT", # flake8-pytest-style
"PL", # pylint
"RUF", # ruff-specific rules
"D", # pydocstyle
]
ignore = [
"E501", # line too long, handled by black
"E741", # ambiguous variable name, TODO: fix
"B008", # function call in argument defaults, required for default points
"PLR0912", # too many branches
"PLR0913", # too many arguments to function call
"PLR0911", # too many return statements
"PLR0915", # too many statements
"PLR2004", # magic values
"PLW2901", # for loop variable overwritten
"PLR5501", # use `elif` instead of `else` then `if`, to reduce indentation
"PLR0124", # name compared with itself, required to check custom __eq__
"PLC0105", # type var naming according to variance
"D100", # Missing docstring in public module
"D101", # TODO: fix
"D102", # TODO: fix
"D103", # TODO: fix
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"D417", # TODO: fix
]
unfixable = []
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**" = ["D"]
[tool.ruff.lint.isort]
known-first-party = ["geometer"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
plugins = ["numpy.typing.mypy_plugin"]
strict = true
implicit_reexport = true
disallow_any_generics = false # TODO
warn_return_any = false # TODO
[[tool.mypy.overrides]]
module = "geometer.utils.indexing"
ignore_errors = true
ignore_missing_imports = true
[tool.coverage.report]
exclude_also = [
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@(abc\\.)?abstractmethod",
"@(typing(_extensions)?\\.)?overload",
]
[tool.codespell]
ignore-words-list = "nin"