-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (123 loc) · 4.15 KB
/
Copy pathpyproject.toml
File metadata and controls
157 lines (123 loc) · 4.15 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
154
155
156
157
[project]
name = "spec_objects_security"
dynamic = ["version"]
license = "AGPL-3.0-or-later"
[tool.poetry]
name = "spec_objects_security"
version = "0.1.0" # Placeholder, dynamically replaced
description = "Filament Module: tier-2 security and identity ObjectTypes (threat, control, risk, asset, policy, auth_flow, role, scope, jwt_claim, secret)"
authors = ["Agent IX <agents@agent-ix.dev>"]
packages = [{ include = "spec_objects_security" }]
include = [
{ path = "spec_objects_security/manifest.yaml", format = ["sdist", "wheel"] },
{ path = "spec_objects_security/skeletons/*.md", format = ["sdist", "wheel"] },
]
[tool.poetry.dependencies]
python = ">=3.13,<3.14"
[tool.poetry.group.dev.dependencies]
black = "^26.1.0"
poetry-dynamic-versioning = "^1.9.1"
poethepoet = "^0.34.0"
py-deps = "*"
py-project = "^0.4.4"
pytest = "^9.0.2"
pytest-cov = "^7.0.0"
pytest-json-report = "^1.5.0"
ruff = "^0.14.13"
pytest-results = { version = "^0.2.0", python = ">=3.12" }
[tool.poetry.scripts]
build-tools = "scripts.build_tools:main"
[tool.poe.tasks]
[tool.poe.tasks.version]
cmd = "build-tools version"
help = "Print computed version"
[tool.poe.tasks.info]
cmd = "build-tools info"
help = "Show git and version info"
[tool.poe.tasks.build]
cmd = "build-tools build"
help = "Build distribution (wheel + sdist)"
[tool.poe.tasks.clean]
cmd = "build-tools clean"
help = "Remove build artifacts"
[tool.poe.tasks.test]
cmd = "pytest"
help = "Run tests with coverage"
[tool.poe.tasks.test-integrations]
cmd = "pytest tests_integration/ -v -s --no-cov -m integration"
help = "Run integration tests (requires Kind cluster)"
[tool.poe.tasks.lint]
sequence = ["ruff-check", "black-check"]
help = "Run all linters (ruff + black)"
[tool.poe.tasks.ruff-check]
cmd = "ruff check ."
help = "Check with ruff"
[tool.poe.tasks.black-check]
cmd = "black --check ."
help = "Check with black"
[tool.poe.tasks.format]
sequence = ["black", "ruff-fix"]
help = "Format code (black + ruff --fix)"
[tool.poe.tasks.black]
cmd = "black ."
help = "Format with black"
[tool.poe.tasks.ruff-fix]
cmd = "ruff check --fix ."
help = "Fix with ruff"
# Package Management (py-deps integration with conditional locking)
# Exit 0 = no change, Exit 1 = change detected (need lock), Exit 2 = error
[tool.poe.tasks.update-deps]
shell = "py-deps update --keep-major || [ $? -eq 1 ] && poetry lock"
help = "Update deps (keep major versions)"
[tool.poe.tasks.update-deps-latest]
shell = "py-deps update || [ $? -eq 1 ] && poetry lock"
help = "Update deps (latest versions)"
[tool.poe.tasks.add-dep]
shell = "py-deps add ${package} || [ $? -eq 1 ] && poetry lock"
help = "Add a dependency"
[tool.poe.tasks.add-dev-dep]
shell = "py-deps add ${package} --dev || [ $? -eq 1 ] && poetry lock"
help = "Add a dev dependency"
[tool.poe.tasks.use-local-dep]
shell = "py-deps use-local ${package} || [ $? -eq 1 ] && poetry lock"
help = "Switch dep to local registry"
[tool.poe.tasks.use-upstream-dep]
shell = "py-deps use-upstream ${package} || [ $? -eq 1 ] && poetry lock"
help = "Switch dep to upstream registry"
[tool.pytest.ini_options]
addopts = "--cov=spec_objects_security --cov-report=term-missing --cov-fail-under=100 --json-report --json-report-file=report.json"
# ALL WARNINGS MUST BE TREATED AS ERRORS, NO EXCEPTION!
filterwarnings = ["error"]
markers = [
"integration: Integration tests (require Kind cluster)",
]
[tool.ruff]
line-length = 88
target-version = "py313"
[tool.ruff.lint]
# Enable the same rules that flake8 was checking
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"TID", # flake8-tidy-imports
]
# Match the flake8 ignores
ignore = ["E203"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[[tool.poetry.source]]
name = "internal-pypi"
url = "https://us-west1-python.pkg.dev/agent-ix/internal-pypi/simple/"
priority = "supplemental"
[[tool.poetry.source]]
name = "local-pypi"
url = "http://pypi.ix/root/dev/+simple/"
priority = "explicit"
[tool.poetry-dynamic-versioning]
enable = true
style = "pep440"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"