-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (107 loc) · 3.21 KB
/
Copy pathpyproject.toml
File metadata and controls
127 lines (107 loc) · 3.21 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
[project]
name = "cerbos"
description = "SDK for working with Cerbos: an open core, language-agnostic, scalable authorization solution"
readme = "README.md"
authors = [{ name = "Cerbos Developers", email = "sdk+python@cerbos.dev" }]
license = { text = "Apache-2.0" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Security",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"dataclasses-json>=0.5.7",
"requests-toolbelt>=0.9.1",
"httpx[http2]>=0.22.0",
"anyio>=3.6.1",
"tenacity>=8.1.0",
"grpcio-tools>=1.54.2",
"types-protobuf>=4.24.0.1",
"protoc-gen-openapiv2>=0.0.1",
"googleapis-common-protos>=1.62.0",
"protobuf>=6.31.0",
"grpcio-status>=1.73.0",
"circuitbreaker>=2.1.3",
]
requires-python = ">=3.10"
dynamic = ["version"]
[project.urls]
Homepage = "https://cerbos.dev"
[project.optional-dependencies]
testcontainers = ["testcontainers>=4.13.3"]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.pyprojectx]
pdm = "pdm"
ruff = "ruff"
isort = "isort"
twine = "twine"
cz = "cz"
[tool.pyprojectx.aliases]
generate = "pdm run python utils/gen_unasync.py"
install = "pdm install"
run = "pdm run"
outdated = "pdm update --outdated"
pytest = "pdm run pytest tests"
test = "pw@generate && pw@pytest"
lint = "pdm lint"
format = "pdm format"
test_upload = "twine upload -r testpypi dist/*"
tag_release = "pdm run cz bump --changelog --increment"
changelog = "pdm run cz changelog"
[tool.pyright]
venvPath = "."
venv = ".venv"
extraPaths = ["__pypackages__/3.10/lib/"]
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
pythonpath = "src/"
[tool.isort]
profile = 'black'
[tool.commitizen]
name = "cz_customize"
version_provider = "scm"
tag_format = "v$major.$minor.$patch$prerelease"
annotated_tag = true
update_changelog_on_bump = true
[tool.commitizen.customize]
commit_parser = "^(?P<change_type>feat|fix|enhancement|docs|chore)(\\\\(.*?\\\\))?:\\s(?P<message>.*)?"
change_type_map = { "feat" = "Features", "fix" = "Bug fixes", "enhancement" = "Enhancements", "docs" = "Documentation", "chore" = "Chores" }
change_type_order = ["feat", "enhancement", "fix", "docs"]
[tool.pdm.version]
source = "scm"
[tool.pdm.dev-dependencies]
lint = ["ruff>=0.11.13", "isort>=5.10.1"]
test = ["pytest>=7.3.1"]
[tool.pdm.build]
includes = ["src/cerbos/", "src/google/", "src/buf/"]
[tool.pdm.scripts]
isort = { cmd = "isort src/cerbos/sdk tests" }
ruff_format = { cmd = "ruff format src/cerbos/sdk tests utils" }
lint = { cmd = "ruff check --fix src/cerbos/sdk tests utils" }
format = { composite = ["isort", "ruff_format"] }
unasync = { cmd = "python utils/gen_unasync.py" }
test = { cmd = "pytest" }
pre_build = { composite = ["unasync", "format", "lint"] }
pre_test = { composite = ["unasync", "format", "lint"] }
[tool.ruff.lint]
ignore = ["B008", "F403", "F405"]
[dependency-groups]
tools = [
"setuptools>=63.2.0",
"commitizen>=3.2.2",
"ptpython>=3.0.23",
"pyyaml>=6.0.1",
"ruff>=0.11.13",
"jedi-language-server>=0.45.1",
"ast-comments>=1.2.2",
"tokenize-rt>=6.2.0",
"mypy>=1.17.1",
]