-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (127 loc) · 4.53 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (127 loc) · 4.53 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
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[tool.uv]
required-version = ">=0.7.0"
constraint-dependencies = [
"idna>=3.15",
"protobuf>=6.33.5", # CVE-2026-0994: JSON recursion depth bypass
"requests>=2.33.0", # CVE-2026-25645: insecure temp file reuse in extract_zipped_paths()
"starlette>=1.0.1",
"urllib3>=2.6.3", # CVE-2026-21441 + CVE-2025-66471 + CVE-2025-66418: decompression bomb, streaming, chain bypass
]
[project]
name = "ogx-api"
dynamic = ["version"]
authors = [{ name = "The OGX Contributors", email = "contributors@ogx.dev" }]
description = "API and Provider specifications for OGX - lightweight package with protocol definitions and provider specs"
readme = "README.md"
requires-python = ">=3.12"
license = { "text" = "MIT" }
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
]
dependencies = [
"openai>=2.48.0",
"fastapi>=0.136.3,<1.0",
"pydantic>=2.11.9",
"jsonschema>=4.26.0",
"opentelemetry-sdk>=1.43.0",
"opentelemetry-exporter-otlp-proto-http>=1.44.0",
"opentelemetry-exporter-otlp-proto-grpc>=1.42.1",
]
[project.urls]
Homepage = "https://github.com/ogx-ai/ogx"
[tool.setuptools]
# 1. Map the 'ogx_api' namespace to the current directory (.)
# This anchors the package and ensures it's not empty.
package-dir = {"ogx_api" = "."}
# 2. List ONLY the directories as sub-packages.
# WARNING: Update this list when adding/removing API directories (e.g., new FastAPI routers)
packages = [
"ogx_api.admin",
"ogx_api.responses",
"ogx_api.batches",
"ogx_api.common",
"ogx_api.containers",
"ogx_api.conversations",
"ogx_api.file_processors",
"ogx_api.files",
"ogx_api.inspect_api",
"ogx_api.inference",
"ogx_api.interactions",
"ogx_api.internal",
"ogx_api.messages",
"ogx_api.models",
"ogx_api.providers",
"ogx_api.prompts",
"ogx_api.skills",
"ogx_api.tools",
"ogx_api.vector_io",
"ogx_api.connectors",
"ogx_api.provider",
"ogx_api.types",
]
# 3. List every root-level .py file as a module.
# Because of package-dir above, these will be placed INSIDE the ogx_api folder.
# WARNING: Update this list when adding/removing root-level .py files
py-modules = [
"ogx_api.datatypes",
"ogx_api.filters",
"ogx_api.openai_responses",
"ogx_api.rag_tool",
"ogx_api.resource",
"ogx_api.router_utils",
"ogx_api.schema_utils",
"ogx_api.vector_stores",
"ogx_api.version",
"ogx_api.validators",
]
[tool.setuptools.package-data]
ogx_api = ["py.typed", "**/*.json", "**/*.yaml"]
[tool.setuptools_scm]
root = "../.."
fallback_version = "1.2.1.dev0"
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = [
"UP", # pyupgrade
"B", # flake8-bugbear
"B9", # flake8-bugbear subset
"C", # comprehensions
"E", # pycodestyle
"F", # Pyflakes
"N", # Naming
"W", # Warnings
"DTZ", # datetime rules
"I", # isort (imports order)
"RUF001", # Checks for ambiguous Unicode characters in strings
"RUF002", # Checks for ambiguous Unicode characters in docstrings
"RUF003", # Checks for ambiguous Unicode characters in comments
"PLC2401", # Checks for the use of non-ASCII characters in variable names
]
ignore = [
# The following ignores are desired by the project maintainers.
"E402", # Module level import not at top of file
"E501", # Line too long
"F405", # Maybe undefined or defined from star import
"C408", # Ignored because we like the dict keyword argument syntax
"N812", # Ignored because import torch.nn.functional as F is PyTorch convention
# These are the additional ones we started ignoring after moving to ruff. We should look into each one of them later.
"C901", # Complexity of the function is too high
]
unfixable = [
"PLE2515",
] # Do not fix this automatically since ruff will replace the zero-width space with \u200b - let's do it manually
[tool.ruff.lint.per-file-ignores]
"ogx_api/apis/**/__init__.py" = ["F403"]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = ["classmethod", "pydantic.field_validator"]