-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
153 lines (134 loc) · 3.79 KB
/
Copy pathpyproject.toml
File metadata and controls
153 lines (134 loc) · 3.79 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "crossplane-function-pythonic"
description = 'A Python centric Crossplane Function'
readme = "README.md"
requires-python = ">=3.12,<3.15"
license = "Apache-2.0"
keywords = []
authors = [{ name = "Patrick J McNerthney", email = "pat@mcnerthney.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dynamic = ["version"]
dependencies = [
"grpcio==1.80.0",
"inflect==7.5.0",
"kr8s==0.20.15",
"protobuf==7.35.0",
"pyyaml==6.0.3",
]
[project.optional-dependencies]
packages = ["kopf==1.44.5"]
pip-install = ["pip==26.1.1"]
[project.urls]
Documentation = "https://github.com/crossplane-contrib/function-pythonic#readme"
Issues = "https://github.com/crossplane-contrib/function-pythonic/issues"
Source = "https://github.com/crossplane-contrib/function-pythonic"
[project.scripts]
function-pythonic = "crossplane.pythonic.main:main"
[tool.hatch.version]
path = "crossplane/pythonic/__about__.py"
validate-bump = false
[tool.hatch.envs.generate]
type = "virtual"
path = ".venv-generate"
post-install-commands = [
"pip install --no-deps grpcio-tools==1.80.0",
]
[tool.hatch.envs.generate.scripts]
protoc = "python -m grpc_tools.protoc --proto_path=. --python_out=. --pyi_out=. --grpc_python_out=. crossplane/pythonic/proto/v1/run_function.proto"
[tool.hatch.build.targets.wheel]
ignore-vcs = true
packages = ["crossplane"]
[tool.hatch.build.targets.sdist]
ignore-vcs = true
packages = [
"crossplane",
"examples",
]
[tool.hatch.envs.default]
features = ["packages"]
type = "virtual"
path = ".venv-default"
dependencies = ["ipython==9.11.0"]
packages = ["crossplane"]
[tool.hatch.envs.default.scripts]
production = "python -m crossplane.pythonic.main grpc --insecure"
development = "python -m crossplane.pythonic.main grpc --insecure --debug --render-unknowns"
#development = "python -m crossplane.pythonic.main grpc --insecure --debug"
packages = "python -m crossplane.pythonic.main grpc --insecure --debug --render-unknowns --packages --packages-secrets"
[tool.hatch.envs.lint]
type = "virtual"
detached = true
path = ".venv-lint"
dependencies = ["ruff==0.15.7"]
packages = ["crossplane"]
[tool.hatch.envs.lint.scripts]
check = "ruff check crossplane tests && ruff format --diff crossplane tests"
[tool.hatch.envs.test]
type = "virtual"
path = ".venv-test"
dependencies = [
"pytest==9.0.2",
"pytest-asyncio==1.3.0",
"pytest-cov==7.1.0",
]
post-install-commands = [
"pip install --no-deps grpcio-tools==1.80.0",
]
packages = ["crossplane"]
[tool.hatch.envs.test.scripts]
all = "python -m pytest tests -x --verbose --verbose --cov --cov-report=term --cov-report=html:reports"
protobuf = "python -m pytest tests/test_protobuf_*.py -x --verbose --verbose --cov --cov-report=term --cov-report=html:reports"
ci = "python -m pytest tests --verbose --verbose --junitxml=reports/pytest-junit.xml --cov --cov-report=term --cov-report=xml:reports/pytest-coverage.xml"
[tool.ruff]
target-version = "py314"
exclude = ["crossplane/pythonic/proto/*"]
[tool.ruff.lint]
select = [
"A",
"ARG",
"ASYNC",
"B",
"C",
"D",
"DTZ",
"E",
"EM",
"ERA",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"T",
"TID",
"UP",
"W",
"YTT",
]
ignore = ["ISC001"] # Ruff warns this is incompatible with ruff format.
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"] # Don't require docstrings for tests.
[tool.ruff.lint.isort]
known-first-party = ["crossplane"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pep8-naming]
# gRPC requires this PascalCase function name.
extend-ignore-names = ["RunFunction"]