-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
103 lines (87 loc) · 3.21 KB
/
Copy pathpyproject.toml
File metadata and controls
103 lines (87 loc) · 3.21 KB
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
[project]
name = "pytest-benchmem"
dynamic = ["version"]
description = "Memory benchmarking for Python, on the pytest-benchmark suites you already time: a memray peak-memory pass on the same tests, plus param-driven plots and cross-version sweeps."
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
authors = [{ name = "Felix Bumann" }]
keywords = ["benchmark", "memory", "memray", "performance", "pytest", "pytest-benchmark"]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Testing",
"Framework :: Pytest",
"Typing :: Typed",
]
dependencies = [
"pytest>=7",
"pytest-benchmark>=4,<6",
"memray>=1.11,<2; platform_system == 'Linux' or platform_system == 'Darwin'",
"rich>=13",
# the benchmem console script is installed unconditionally, so its runtime must be too;
# compare/sweep/flamegraph need nothing beyond it — only plot pulls the [plot] extra.
"typer>=0.12",
]
[project.optional-dependencies]
plot = ["pandas>=2", "plotly>=5"]
# kaleido (and a Chromium it drives) is only needed to export a plot as a static image
# (plot -o out.png / .svg / .pdf); kept out of [plot] so interactive HTML stays lightweight.
plot-static = ["pytest-benchmem[plot]", "kaleido>=0.2"]
[project.scripts]
benchmem = "pytest_benchmem.cli:app"
[project.entry-points.pytest11]
benchmem = "pytest_benchmem.pytest_plugin"
[project.urls]
Homepage = "https://github.com/fluxopt/pytest-benchmem"
Documentation = "https://fluxopt.github.io/pytest-benchmem/"
Repository = "https://github.com/fluxopt/pytest-benchmem"
Issues = "https://github.com/fluxopt/pytest-benchmem/issues"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[dependency-groups]
# mypy <2.1: 2.1.0 errors on numpy's PEP 695 stub under python_version=3.11. Lift once fixed upstream.
dev = ["ruff>=0.6", "mypy>=1,<2.4", "pre-commit>=3", "pytest-benchmem[plot-static]", { include-group = "docs" }]
docs = [
"jupytext>=1.16",
"ipykernel>=6",
"linopy>=0.8", # the gallery/linopy-memory.md notebook benchmarks a real linopy model build
"mkdocs>=1.6",
"mkdocs-material>=9",
"mkdocs-jupyter>=0.24",
"mkdocstrings[python]>=0.26",
"mkdocs-typer2[mkdocs,termynal]>=0.4.1",
"mkdocs-macros-plugin>=1",
"termynal>=0.14.0",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "D"]
ignore = ["D105", "D107", "D205"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_unused_ignores = true
[tool.hatch.build.targets.wheel]
packages = ["src/pytest_benchmem"]
[[tool.mypy.overrides]]
module = ["pandas", "pandas.*", "plotly", "plotly.*", "memray", "memray.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_calls = false