-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (85 loc) · 3.34 KB
/
pyproject.toml
File metadata and controls
95 lines (85 loc) · 3.34 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
[project]
name = "tryke"
dynamic = ["version"]
description = "Tryke - A Python testing tool"
readme = "README.md"
authors = [{ name = "Justin Chapman", email = "commonmodestudio@gmail.com" }]
requires-python = ">=3.12"
dependencies = []
keywords = ["testing", "test", "framework", "runner", "assertions"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Rust",
"Topic :: Software Development :: Testing",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://github.com/thejchap/tryke"
Documentation = "https://tryke.dev/"
Repository = "https://github.com/thejchap/tryke"
"Bug Tracker" = "https://github.com/thejchap/tryke/issues"
[tool.ty.src]
exclude = ["benchmarks/suites"] # TODO
[tool.ruff]
exclude = ["benchmarks/suites"]
# Treat `python/` as a source root so files like `python/tryke_guard.py`
# are recognised as top-level modules instead of implicit namespace
# packages (INP001). Mirrors maturin's `python-source = "python"`.
src = ["python"]
[tool.ruff.lint]
select = ["ALL"]
ignore = ["D", "COM812"]
# Tryke's public API puts `Depends(...)` in parameter defaults on purpose
# (FastAPI-style dependency injection). B008 (function call in default)
# and PT028 (pytest: default argument on test function parameter) both
# flag that pattern. Exempt files that exercise the @fixture surface.
[tool.ruff.lint.per-file-ignores]
"tests/test_hooks.py" = ["B008", "PT028"]
"python/tryke/hooks.py" = ["B008"]
# This test deliberately spawns subprocesses to prove that the in-source
# testing flag does NOT leak into child processes. The subprocess args are
# fully controlled (sys.executable, fixed -c script), so S603 is spurious.
"tests/test_in_source_guard.py" = ["S603"]
# This sample mirrors the code block on the docs landing page and is the
# source for `scripts/generate_reporter_examples.py`. It deliberately omits
# return-type annotations and an `__init__.py` to keep the example
# minimal and focused on the user-facing API.
"demo/sample.py" = ["INP001", "ANN201"]
[tool.tryke]
exclude = ["benchmarks/suites", "demo"]
# Treat both the repo root and `python/` as source roots for absolute
# import resolution, mirroring `[tool.maturin] python-source = "python"`.
# Without this, `from tryke.worker import ...` in tests/ would not
# resolve to python/tryke/worker.py in the import graph.
src = [".", "python"]
[tool.maturin]
bindings = "bin"
manifest-path = "crates/tryke/Cargo.toml"
python-source = "python"
include = [{ path = "python/tryke_guard.py", format = ["sdist", "wheel"] }]
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.uv.sources]
tryke = { workspace = true }
[dependency-groups]
dev = [
"ruff~=0.15.4",
"ty~=0.0.29",
"zensical>=0.0.26",
"mkdocstrings-python>=1.16.12",
"pygments-ansi-color>=0.3.0",
"tryke",
# Pygments 2.20 added `html.escape` around the formatter's `filename`
# option, which crashes on the `None` that pymdown-extensions 10.21's
# `BlockHtmlFormatter` passes through when a code block has no title.
# Drop this pin once pymdown-extensions stops passing None.
"pygments<2.20",
]