forked from keboola/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (122 loc) · 4 KB
/
Copy pathpyproject.toml
File metadata and controls
138 lines (122 loc) · 4 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 = "keboola-cli"
version = "0.63.3"
description = "AI-friendly CLI for managing Keboola projects"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
authors = [
{ name = "Keboola", email = "dev@keboola.com" },
]
dependencies = [
"typer[all]>=0.12",
"rich>=13",
"httpx>=0.27",
"pydantic>=2.5",
"platformdirs>=4",
"mcp>=1.0.0,<2.0.0",
"jsonschema>=4.20",
"pyyaml>=6",
"packaging>=23",
"prompt-toolkit>=3.0",
"kai-client>=0.11.0",
"croniter>=2.0",
"cryptography>=48.0.1",
]
[project.optional-dependencies]
server = [
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
"sse-starlette>=2.1",
"python-multipart>=0.0.31",
]
[project.scripts]
kbagent = "keboola_agent_cli.cli:app"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/keboola_agent_cli"]
# The CustomBuildHook below populates ``src/keboola_agent_cli/_ui_dist/``
# (gitignored) right before wheel collection, so the React SPA ships
# inside the installed package and ``kbagent serve --ui`` works after
# ``uv tool install git+...`` or ``pip install`` from PyPI without the
# user needing the ``web/`` source tree.
#
# ``force-include`` overrides the default ``.gitignore`` exclusion so the
# generated dist actually lands in the wheel. Key on the LHS is the path
# on disk; value on the RHS is the path inside the wheel.
[tool.hatch.build.targets.wheel.force-include]
"src/keboola_agent_cli/_ui_dist" = "keboola_agent_cli/_ui_dist"
# PEP 561: ship the py.typed marker so downstream type checkers treat the
# importable SDK (Client + result_models contracts, issue #428) as typed.
# Forced in explicitly rather than relying on hatchling's default file
# selection, so the marker is guaranteed to land in the wheel.
"src/keboola_agent_cli/py.typed" = "keboola_agent_cli/py.typed"
[tool.hatch.build.targets.wheel.hooks.custom]
path = "scripts/hatch_build.py"
[tool.hatch.build.targets.sdist]
# Include the React source tree in sdist so `pip install` from sdist can
# still build the SPA via the same hook (provided npm is available).
include = [
"src/",
"tests/",
"scripts/",
"web/frontend/",
"web/README.md",
"Makefile",
"README.md",
"CONTRIBUTING.md",
"CLAUDE.md",
"scripts/hatch_build.py",
"pyproject.toml",
]
exclude = [
"web/frontend/node_modules",
"web/frontend/dist",
"web/frontend/tsconfig.tsbuildinfo",
"web/backend",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src", "tests"]
markers = [
"integration: marks tests as integration tests requiring real API credentials (deselect with '-m \"not integration\"')",
"e2e: marks tests as end-to-end tests requiring real API credentials (deselect with '-m \"not e2e\"')",
"e2e_invite: project invite E2E -- requires E2E_MANAGE_TOKEN + E2E_INVITE_PROJECT_ID; opt-in via 'make test-e2e-invite'",
]
[tool.ruff]
target-version = "py312"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "B", "SIM", "RUF"]
ignore = ["E501", "B008"]
[tool.ruff.lint.isort]
known-first-party = ["keboola_agent_cli"]
[dependency-groups]
dev = [
"pytest>=8",
"pytest-cov>=5",
"pytest-httpx>=0.30",
"pytest-asyncio>=0.23",
"ruff>=0.8",
"ty>=0.0.33",
"bandit>=1.9.4",
"pip-audit>=2.10.0",
]
[tool.ty.src]
include = ["src", "tests", "scripts"]
[tool.ty.environment]
# tests/ import shared fixtures via bare `from helpers import ...` (pytest adds
# tests/ to sys.path at runtime); list it here so ty resolves the import too.
extra-paths = ["tests"]
[tool.ty.rules]
unresolved-import = "warn"
[tool.coverage.run]
# Coverage is INFORMATIONAL only -- CI prints a term-missing report but does
# NOT enforce a --cov-fail-under threshold. See `make test-cov` and the `test`
# job in .github/workflows/ci.yml. Branch coverage gives a truer picture of
# the dual-output (JSON vs Rich) and error-path branches that dominate this CLI.
source = ["keboola_agent_cli"]
branch = true