-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
154 lines (140 loc) · 3.37 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
[project]
name = "pympljstyle"
version = "0.4.0"
description = "Apply journal styles and requirements to `matplotlib` figures"
readme = "README.md"
requires-python = ">=3.10"
keywords = []
authors = [
{ name = "Damien Mannion", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"matplotlib>=3.9.2",
"pint>=0.24.4",
]
[project.optional-dependencies]
interactive = [
"ipython>=8.29.0",
"pickleshare>=0.7.5",
"pyqt6>=6.7.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
dev-dependencies = [
"black>=24.8.0",
"mypy>=1.11.2",
"pytest>=8.3.3",
"pytest-cov>=5.0.0",
"repo-review>=0.11.2",
"ruff>=0.6.7",
"sp-repo-review[cli]>=2024.8.19",
]
[project.urls]
Documentation = "https://github.com/djmannion/pympljstyle#readme"
Issues = "https://github.com/djmannion/pympljstyle/issues"
Source = "https://github.com/djmannion/pympljstyle"
# until uv gets a task runner
[tool.poe.tasks]
test = "uv run pytest --cov --cov-report term-missing"
typecheck = "uv run mypy ."
lint = "uv run ruff check"
style = "uv run black ."
repo-review = "uv run repo-review"
ipython = "uv run --extra interactive ipython"
[tool.black]
line-length = 88
preview = false
skip-source-first-line = false
skip-string-normalization = false
skip-magic-trailing-comma = false
[tool.ruff]
exclude = ["docs", "tests"]
lint.select = [
"E", # error
"F", # pyflakes
"UP", # pyupgrade
"N", # pep8-naming
"ANN", # flake8-annotations
"A", # flake8-builtins
"PTH", # flake8-usepathlib
"B", # flake8-bugbear
"Q", # flake8-quotes
"ARG", # flake8-unused-arguments
"NPY", # numpy
"PERF", # perflint
"RUF", # ruff
]
lint.ignore = [
"ANN101", # typing self
"PERF203", # performance overhead from try/catch in loops
]
[tool.mypy]
# corresponding to --strict
strict = true
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = false
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
extra_checks = true
warn_unreachable = true
untyped_calls_exclude = []
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
plugins = [
]
exclude = ["docs", "tests"]
[[tool.mypy.overrides]]
module = [
"pint",
]
ignore_missing_imports = true
[tool.repo-review]
ignore = [
"RTD", # not using readthedocs
"RF102", # not a fan of isort
"PC", "PY006", # not using pre-commit
"PY007", # poe not recognised as a task runner
]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = ["error"]
log_cli_level = "info"
testpaths = ["tests"]
[tool.coverage.run]
omit = ["tests/*"]
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]