forked from sean2077/jsonpath-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (105 loc) · 3.47 KB
/
pyproject.toml
File metadata and controls
120 lines (105 loc) · 3.47 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "jsonpath-python"
version = "1.1.4"
description = "A lightweight and powerful JSONPath implementation for Python"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "sean2077", email = "sean2077@users.noreply.github.com" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"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 :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup",
]
keywords = ["jsonpath", "json", "path", "parser", "extractor"]
requires-python = ">=3.8"
dependencies = []
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-benchmark[histogram]>=4.0",
"ruff>=0.3",
"poethepoet",
]
[project.urls]
Homepage = "https://github.com/sean2077/jsonpath-python"
Repository = "https://github.com/sean2077/jsonpath-python"
Issues = "https://github.com/sean2077/jsonpath-python/issues"
[tool.hatch.build.targets.wheel]
packages = ["jsonpath"]
[tool.ruff]
target-version = "py38"
line-length = 120
fix = true
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"B", # flake8-bugbear
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"C4", # flake8-comprehensions
"PLC", # pylint conventions
]
ignore = [
"E501", # line length handled by ruff format
"B008", # function calls in argument defaults
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"PLC0415", # allow imports inside functions in tests
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
markers = [
"perf: marks tests as performance benchmarks (deselect with '-m \"not perf\"')",
"slow: marks tests as slow running (deselect with '-m \"not slow\"')",
]
# Development Tasks (using poethepoet)
[tool.poe.tasks.format]
cmd = "ruff format . && ruff check . --fix --select I"
help = "Format code and organize imports"
[tool.poe.tasks.lint]
cmd = "ruff check ."
help = "Run linter"
[tool.poe.tasks.test]
cmd = "pytest"
help = "Run tests"
[tool.poe.tasks.perf]
sequence = [
{ cmd = "pytest tests/test_performance.py --benchmark-only --benchmark-autosave --benchmark-histogram --benchmark-compare" },
{ cmd = "python scripts/save_benchmark.py latest" },
{ cmd = "python scripts/compare_benchmarks.py" },
]
help = "Run performance tests, save to benchmarks/ with latest suffix"
[tool.poe.tasks.perf-version]
sequence = [
{ cmd = "pytest tests/test_performance.py --benchmark-only --benchmark-autosave --benchmark-histogram --benchmark-compare" },
{ cmd = "python scripts/save_benchmark.py" },
]
help = "Run performance tests, save to benchmarks/ with version suffix"
[tool.poe.tasks.perf-compare]
cmd = "python scripts/compare_benchmarks.py"
help = "Compare benchmark-latest.json with newest version benchmark"
[tool.poe.tasks.perf-list]
cmd = "pytest-benchmark list"
help = "List all saved benchmarks"
[tool.poe.tasks.update-deps]
cmd = "uv sync --all-extras --upgrade --index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/"
help = "Update all dependencies"