-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (147 loc) · 4.9 KB
/
pyproject.toml
File metadata and controls
167 lines (147 loc) · 4.9 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
158
159
160
161
162
163
164
165
166
167
[project]
name = "cpex"
version = "0.1.1.dev1"
description = "CPEX - ContextForge Plugin Extensibility Framework"
classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
]
license = "Apache-2.0"
license-files = ["LICENSE"]
readme = "README.md"
authors = [
{ name = "Fred Araujo", email = "frederico.araujo@ibm.com" },
{ name = "Mihai Criveti", email = "redacted@ibm.com"},
{ name = "Teryl Taylor", email = "terylt@ibm.com" },
]
maintainers = [
{ name = "Fred Araujo", email = "frederico.araujo@ibm.com" },
{ name = "Jonathan Springer", email = "redacted@ibm.com" },
{ name = "Teryl Taylor", email = "terylt@ibm.com" },
]
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.133.1",
"httpx>=0.28.1",
"httpx[http2]>=0.28.1",
"jinja2>=3.1.6",
"mcp>=1.26.0",
"orjson>=3.11.7",
"prometheus-fastapi-instrumentator>=7.1.0",
"prometheus_client>=0.24.1",
"pydantic-settings>=2.13.1",
"pydantic>=2.12.5",
"pyyaml>=6.0.3",
"packaging>=26.0",
"inquirer>=3.4.1",
"rich>=14.3.3",
"pygithub>=2.9.0"
]
[project.scripts]
cpex = "cpex.tools.cli:main"
[project.urls]
Repository = "https://github.com/contextforge-org/cpex"
[project.optional-dependencies]
# dev dependencies
dev = [
"bandit>=1.8.6",
"check-manifest>=0.50",
"interrogate>=1.7.0",
"mypy>=1.18.2",
"pyroma>=5.0",
"pytest-asyncio>=1.2.0",
"pytest-cov>=7.0.0",
"pytest-env>=1.1.5",
"pytest-xdist>=3.8.0",
"pytest>=8.4.2",
"radon>=6.0.1",
"ruff>=0.13.3",
"twine>=6.2.0",
"types-PyYAML>=6.0.0",
"vulture>=2.14",
]
# documentation support
# The doc site uses Hugo (brew install hugo) — no Python deps required.
# This group is reserved for future API reference generation (e.g., pdoc, sphinx).
docs = []
# gRPC transport support (higher performance than MCP/HTTP)
grpc = [
"grpcio-tools>=1.70.0",
"grpcio>=1.70.0",
"protobuf>=5.29.0",
]
# CLI dependencies
cli = [
"chardet>=3.0.2,<6", # pin to range supported by requests (binaryornot pulls chardet 7+)
"cookiecutter>=2.6.0",
"typer>=0.21.2", # docling requires typer < 0.22
]
# All extras
all = ["cpex[grpc,cli]"]
[tool.interrogate]
exclude = ["cpex/templates", "*_pb2.py", "*_pb2_grpc.py"]
fail-under = 100
[tool.radon]
exclude = "cpex/templates/*,*_pb2.py,*_pb2_grpc.py"
[tool.vulture]
min_confidence = 80
exclude = ["cpex/templates", "cpex/framework/observability.py", "*_pb2.py", "*_pb2_grpc.py"]
[tool.ruff]
line-length = 120
exclude = [
"cpex/templates",
]
[tool.check-manifest]
ignore = [
"docs/**",
"tests/**",
".github/**",
"Makefile",
]
# Linter configuration
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Also "D1" for docstring present checks.
# "PL" enables Pylint rules natively in ruff (replaces pylint for these checks).
select = ["E3", "E4", "E7", "E9", "F", "D1", "PL", "I"]
ignore = [
# ---- Rules already disabled in .pylintrc (intentionally relaxed) ----
"PLR0904", # too-many-public-methods (pylint R0904)
"PLR0912", # too-many-branches (pylint R0912)
"PLR0913", # too-many-arguments (pylint R0913)
"PLR0914", # too-many-locals (pylint R0914)
"PLR0915", # too-many-statements (pylint R0915)
# ---- Accepted codebase patterns (high violation count, tolerated by pylint scoring) ----
"PLC0415", # import-outside-top-level (pylint C0415) — lazy-import patterns
"PLW0603", # global-statement (pylint W0603) — config/singleton patterns
"PLR0911", # too-many-returns
"PLR0917", # too-many-positional-args
"PLR1702", # too-many-nested-blocks
# ---- Ruff-only PL rules with no pylint equivalent (out of migration scope) ----
"PLC1901", # compare-to-empty-string (deprecated in pylint)
"PLC2701", # import-private-name (ruff-only)
"PLR2004", # magic-value-comparison (ruff-only)
"PLR5501", # collapsible-else-if (ruff-only)
"PLR6104", # non-augmented-assignment (ruff-only)
"PLR6201", # literal-membership (ruff-only)
"PLR6301", # no-self-use (ruff-only)
"PLW2901", # redefined-loop-name (ruff-only)
]
preview = true
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.pylint]
# Relaxed from the default of 5; existing code has wider try clauses (max observed 38).
max-statements-in-try = 50
# Ignore D1 (docstring checks) and Pylint checks in tests and other non-production code
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D1", "PL"]
"scripts/**/*.py" = ["D1", "PL"]
".github/**/*.py" = ["D1", "PL"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["cpex"]