forked from NVIDIA-NeMo/Switchyard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
149 lines (132 loc) · 4.42 KB
/
Copy pathpyproject.toml
File metadata and controls
149 lines (132 loc) · 4.42 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
[build-system]
requires = ["maturin>=1.9,<2.0"]
build-backend = "maturin"
[project]
name = "nemo-switchyard"
version = "0.2.0"
description = "Typed, composable LLM routing with request/response translation and multi-backend orchestration"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.12"
authors = [{ name = "NVIDIA Corporation" }]
maintainers = [{ name = "NVIDIA Corporation" }]
keywords = ["llm", "switchyard", "routing", "openai", "nemo"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = []
[project.optional-dependencies]
# CLI dependencies — prompt-toolkit for Claude Code launcher and ShellTUI.
# Only needed for users running the switchyard CLI.
cli = [
"prompt-toolkit>=3.0.52,<4.0",
]
# Dev tooling lives in a PEP 735 dependency group rather than an optional
# extra so it is not advertised in the published wheel's METADATA. This
# keeps pytest / ruff / mypy / pygments-via-pytest out of downstream
# vulnerability scans, since they're never installed by `pip install
# nemo-switchyard` or any of the user-facing extras above.
#
# Install dev tooling with `uv sync` (the `dev` group is uv's default and
# is installed automatically) or `uv sync --group dev` to be explicit.
# With pip >= 25.1, use `pip install --group dev .` from a checkout.
[dependency-groups]
dev = [
"maturin>=1.9,<2.0",
"pytest>=9.0.3,<10.0",
"pytest-asyncio>=1.3.0,<2.0",
"pytest-timeout>=2.4.0,<3.0",
"ruff>=0.15.12,<1.0",
"mypy>=1.20.2,<2.0",
# Harbor is needed for local evaluation runs and supports the package floor.
# Package users still do not see it in published metadata.
"harbor @ git+https://github.com/harbor-framework/harbor.git@v0.6.4 ; python_version >= '3.12'",
"nemo-switchyard[cli]",
"pytest-markdown-docs>=0.9.2",
]
docs = [
"mkdocs>=1.6.0,<2.0",
"mkdocs-material>=9.5.0,<10.0",
"watchdog>=4.0.0,<5.0",
]
[tool.uv]
managed = true
[project.scripts]
switchyard = "switchyard.cli.switchyard_cli:main"
[project.urls]
Homepage = "https://github.com/NVIDIA-NeMo/Switchyard"
Repository = "https://github.com/NVIDIA-NeMo/Switchyard"
Issues = "https://github.com/NVIDIA-NeMo/Switchyard/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["switchyard*"]
[tool.setuptools.package-data]
switchyard = [
"py.typed",
"cli/defaults/*.toml",
]
switchyard_rust = ["py.typed", "*.pyi"]
[tool.maturin]
manifest-path = "crates/switchyard-py/Cargo.toml"
module-name = "switchyard_rust._switchyard_rust"
python-source = "."
python-packages = ["switchyard", "switchyard_rust"]
include = [
{ path = "LICENSE", format = "sdist" },
{ path = "NOTICE", format = "sdist" },
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
timeout = 120 # Default timeout for all tests (2 minutes)
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
"perf: marks tests as performance benchmarks (deselect with '-m \"not perf\"')",
]
# For integration/production tests, recommend using -x to stop on first failure:
# pytest tests/offline_production_tests/ -v -x
addopts = "-x" # Stop on first failure by default (use --no-x to override)
[tool.mypy]
python_version = "3.12"
strict = true
files = ["switchyard", "switchyard_rust"]
warn_return_any = true
warn_unused_configs = true
warn_unreachable = true
ignore_missing_imports = true
# Readability
pretty = true
show_error_codes = true
show_column_numbers = true
[tool.pyright]
include = ["switchyard"]
exclude = [
".agents",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
".worktrees",
"build",
"tests",
]
pythonVersion = "3.12"
[tool.ruff]
line-length = 100
target-version = "py312"
exclude = [".agents", ".worktrees"]
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "B", "C4"]
# Keep runtime compatibility aliases and existing generics stable in this
# packaging PR. PEP 695 aliases are not drop-in replacements for public class
# aliases, and `StrEnum` changes enum stringification.
ignore = ["E501", "UP040", "UP042", "UP046", "UP047"]
[tool.ruff.lint.isort]
known-first-party = ["switchyard"]