-
Notifications
You must be signed in to change notification settings - Fork 65
/
pyproject.toml
146 lines (130 loc) · 3.39 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "mplhep"
dynamic = ["version"]
description = "Matplotlib styles for HEP"
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
authors = [
{ name = "andrzejnovak", email = "[email protected]" },
]
classifiers = [
"Framework :: Matplotlib",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = [
"matplotlib>=3.4",
"mplhep-data>=0.0.4",
"numpy>=1.16.0",
"packaging",
"uhi>=0.2.0",
]
[project.optional-dependencies]
dev = [
"bumpversion",
"jupyter",
"pre-commit",
"twine",
]
test = [
"boost_histogram",
"hist",
"pytest-mock",
"pytest-mpl",
"pytest>=6.0",
"scikit-hep-testdata",
"scipy>=1.1.0",
"uproot",
"uproot4",
]
all = [
"mplhep[dev,test]",
]
[project.urls]
Homepage = "https://github.com/scikit-hep/mplhep"
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/mplhep/_version.py"
[tool.uv]
environments = [
"python_version >= '3.10'",
]
dev-dependencies = [
"mplhep[test]",
]
[tool.mypy]
files = ["src"]
python_version = 3.8
warn_unused_configs = true
allow_redefinition = true
# disallow_any_generics = true
# disallow_subclassing_any = true
# disallow_untyped_calls = true
# disallow_untyped_defs = true
# disallow_incomplete_defs = true
check_untyped_defs = false
# disallow_untyped_decorators = true
# no_implicit_optional = true
# warn_redundant_casts = true
# warn_unused_ignores = true
# warn_return_any = true
# no_implicit_reexport = true
# strict_equality = true
[[tool.mypy.overrides]]
module = ["matplotlib.*", "cycler", "scipy.*", "mpl_toolkits.*", "mplhep_data"]
ignore_missing_imports = true
# Additional configuration is in matplotlib/testing/conftest.py.
[tool.pytest.ini_config]
minversion = 6.0
testpaths = ["tests"]
python_files = "test*.py"
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
"FURB", # refurb
"PYI", # flake8-pyi
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"ISC001", # Conflicts with formatter
"NPY002", # np.random.Generator
"G004", # Logging with f-string
"PD011", # .values vs .to_numpy can get confused
"PT013", # Import from pytest
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20"]
"docs/conf.py" = ["T20"]