-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathpyproject.toml
More file actions
136 lines (119 loc) · 4.27 KB
/
pyproject.toml
File metadata and controls
136 lines (119 loc) · 4.27 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
# Copyright 2020 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
[project]
name = "cel-python"
version = "0.5.0"
description = "Pure Python implementation of Google Common Expression Language"
readme = "README.rst"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python"
]
authors = [
{ name = "S.Lott", email = "slott56@gmail.com" }
]
requires-python = ">=3.10"
dependencies = [
# 3.13 needs at least this version, which started publishing wheels for Python 3.13.
# Ref: https://github.com/google/re2/issues/516
"google-re2>=1.1.20240702",
"google-re2>=1.1.20250722; python_version == '3.13'",
"jmespath>=1.0.1",
"lark>=1.2.2",
"pendulum>=3.1.0",
"pyyaml>=6.0.2",
"tomli >= 1.1.0 ; python_version < '3.11'",
]
[project.scripts]
cel-python = "cel_python:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/celpy"]
[[tool.uv.index]]
url = "https://buf.build/gen/python"
[dependency-groups]
dev = [
"behave>=1.2.6",
"coverage>=7.8.1",
"google-cel-spec-protocolbuffers-pyi==32.1.0.1.20250512201741+dffb8c8cf781",
"google-cel-spec-protocolbuffers-python==32.1.0.1.20250512201741+dffb8c8cf781",
"google-re2-stubs",
"jinja2>=3.1.6",
"mypy>=1.15.0",
"protobuf>=6.32.1",
"pytest-cov>=6.3.0",
"pytest>=8.3.5",
"ruff>=0.11.10",
"sphinx>=7.4.7",
"sphinxcontrib-plantuml>=0.30",
"sphinxcontrib-programoutput>=0.18",
"toml>=0.10.2",
"tox-uv>=1.25.0",
"tox>=4.24",
"types-protobuf>=6.30.2.20250914",
"types-pyyaml>=6.0.12.20250516",
"types-toml>=0.10.8.20240310",
]
[tool.tox]
envlist = ["py310", "py311", "py312", "py313", "lint", "tools"]
minversion = "4.24.0"
[tool.tox.env_run_base]
description = "test suite"
dependency_groups = ["dev"]
setenv = { PYTHONPATH = "./src" }
commands = [
["pytest", "-vv"],
["pytest", "-v", "--doctest-modules", "src"],
["pytest", "-v", "--doctest-modules", "README.rst"],
["behave", "--tags=~@wip", "--tags=~@future", "-D", "env='{envname}'", "-f", "rerun", "--stop"],
["behave", "--tags=~@wip", "--tags=~@future", "-D", "env='{envname}'", "-D", "runner='compiled'", "-f", "rerun", "--stop"],
["python", "-m", "doctest", "{toxinidir}/docs/source/api.rst", "{toxinidir}/docs/source/cli.rst", "docs/source/index.rst", "docs/source/integration.rst"],
["pytest", "-v", "-o", "python_classes='PYTest*'", "tools"]
]
[tool.tox.env.tools]
description = "conformance suite conversion tools"
commands = [["pytest", "-v", "tools"]]
[tool.tox.env.wip]
description = "work-in-progress test suite"
commands = [["behave", "--tags=@wip"]]
[tool.tox.env.conformance]
commands = [["behave", "--tags=@conformance", "--tags=~@wip"]]
[tool.tox.env.conformance-compiled]
description = "compiled runner"
commands = [["behave", "--tags=@conformance", "--tags=~@wip", "-D", "runner='compiled'"]]
[tool.tox.env.conformance-wip]
description = "work in progress"
commands = [["behave", "--tags=@conformance", "--tags=@wip"]]
[tool.tox.env.conformance-wip-compiled]
description = "work in progress + compiled runner"
commands = [["behave", "--tags=@conformance", "--tags=@wip", "-D", "runner='compiled'"]]
[tool.tox.env.lint]
description = "check types, formatting, and best practices"
commands = [
["mypy", "--lineprecision-report", "type_check", "--strict", "--disable-error-code", "type-arg", "--show-error-codes", "src", "tools"],
["ruff", "check", "src", "tools"],
["ruff", "format", "--diff", "src", "tools"]
]
[tool.tox.env.coverage]
description = "generate coverage reports"
commands = [
["coverage", "erase"],
["pytest", "-vv", "-x", "--cov=src", "--cov-report=term-missing"],
["coverage", "html"],
["coverage", "xml"],
]