Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (124 loc) · 3.46 KB
/
Copy pathpyproject.toml
File metadata and controls
138 lines (124 loc) · 3.46 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
[project]
name = "common-expression-language"
description = "Python bindings for the Common Expression Language (CEL)"
readme = "README.md"
license = "Apache-2.0"
authors = [
{name = "Brian Thorne", email = "brian@hardbyte.nz"}
]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Rust",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Interpreters",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
"typer>=0.12.0",
"rich>=13.0.0",
"prompt-toolkit>=3.0.0",
"pygments>=2.0.0",
]
[project.scripts]
cel = "cel.cli:cli_entry"
[project.urls]
Homepage = "https://github.com/hardbyte/python-common-expression-language"
Repository = "https://github.com/hardbyte/python-common-expression-language"
[build-system]
# 1.14 is the first maturin that discovers free-threaded (3.14t+) interpreters.
requires = ["maturin>=1.14,<2.0"]
build-backend = "maturin"
[tool.maturin]
features = ["pyo3/extension-module"]
python-source = "python"
[dependency-groups]
dev = [
"pytest>=8.4.1",
"maturin>=1.8.0",
"ruff>=0.16.3,<0.17",
"mypy>=1.17.1",
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.0.0",
"mkdocstrings>=0.24.0",
"mkdocstrings-python>=1.8.0",
"pygments>=2.0.0",
"mktestdocs>=0.2.0",
]
[tool.ruff]
target-version = "py311"
line-length = 100
extend-exclude = [
".venv",
"target",
"__pycache__",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
]
ignore = [
"E501", # line too long (handled by formatter)
"F403", # star imports (needed for Rust extension)
"F405", # undefined from star imports (expected with Rust extension)
"F401", # unused imports (CLI module imported for side effects)
"RUF001", # ambiguous unicode characters (intentional in tests)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# Ruff 0.16 began formatting Python code blocks inside Markdown. Docs snippets
# are laid out for readability, so leave them to the doc tests (tests/test_docs.py).
exclude = ["*.md"]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
show_error_codes = true
namespace_packages = true
exclude = [
"tests/",
".venv/",
"target/",
"shell/",
"test_tui_complete.py",
]
[[tool.mypy.overrides]]
module = ["cel.cli"]
ignore_errors = true
[[tool.mypy.overrides]]
module = ["pygments", "pygments.lexer"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
]