Skip to content

Commit be19ece

Browse files
authored
test: improve test suite (#599)
* fix: test fixes * chore: add benchmarking capability, CI tbd * ci: enforce conventional commits by a hook * ci: improve tests * build: missing test dep
1 parent b69dbe6 commit be19ece

File tree

9 files changed

+712
-272
lines changed

9 files changed

+712
-272
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ ci:
22
autoupdate_commit_msg: "chore(deps): pre-commit.ci autoupdate"
33

44
repos:
5+
- repo: https://github.com/compilerla/conventional-pre-commit
6+
rev: v4.2.0
7+
hooks:
8+
- id: conventional-pre-commit
9+
stages: [commit-msg]
10+
args: [--verbose]
511
- repo: https://github.com/pre-commit/pre-commit-hooks
612
rev: v6.0.0
713
hooks:
@@ -18,7 +24,7 @@ repos:
1824

1925
- repo: https://github.com/astral-sh/ruff-pre-commit
2026
# Ruff version.
21-
rev: v0.12.12
27+
rev: v0.14.0
2228
hooks:
2329
# Run the linter.
2430
- id: ruff
@@ -27,7 +33,7 @@ repos:
2733
- id: ruff-format
2834

2935
- repo: https://github.com/pre-commit/mirrors-mypy
30-
rev: v1.17.1
36+
rev: v1.18.2
3137
hooks:
3238
- id: mypy
3339
files: src

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ test = [
4949
"pytest-mock",
5050
"pytest-mpl",
5151
"pytest-xdist",
52+
"pytest-benchmark",
5253
"pytest>=6.0",
5354
"scikit-hep-testdata",
5455
"scipy>=1.1.0",
@@ -146,11 +147,10 @@ ignore = [
146147
"G004", # Logging with f-string
147148
"PD011", # .values vs .to_numpy can get confused
148149
"PT013", # Import from pytest
149-
"PD901", # Make examples more readable
150150
"E402", # Make examples more readable
151151
]
152152

153153
[tool.ruff.lint.per-file-ignores]
154-
"tests/**" = ["T20"]
154+
"tests/**" = ["T20", "RUF059"]
155155
"docs/conf.py" = ["T20"]
156156
"src/mplhep/_dev.py" = ["T20"]

0 commit comments

Comments
 (0)