forked from microsoft/agent-governance-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (117 loc) · 5.14 KB
/
Copy pathpyproject.toml
File metadata and controls
126 lines (117 loc) · 5.14 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "agent_os_kernel"
version = "5.0.0"
description = "Deprecated. Previously published as agent-os-kernel. Install agent-governance-toolkit-core instead."
license = {text = "MIT"}
requires-python = ">=3.11"
authors = [
{name = "Microsoft Corporation", email = "agentgovtoolkit@microsoft.com"},
]
dependencies = ["agent-governance-toolkit-core>=5.0.0,<6.0"]
# The published wheel is a dep-only deprecation stub (see [project] above), but
# the agent_os source tree under src/ (and tests/) is still exercised in CI via
# `pip install -e ".[dev]"`. PR #2794 stripped [project.optional-dependencies]
# entirely, which silently turned `.[dev]` into a no-op and left the test suite
# unable to import fastapi/pynacl/cryptography/aiohttp — every `pytest tests/`
# run failed at COLLECTION (ModuleNotFoundError) on Python 3.11-3.13. The `dev`
# extra below restores exactly the test/dev dependencies the suite needs to
# collect and run; the component extras mirror the pre-#2794 structure so the
# `dev` bundle stays self-describing. This does NOT change the published runtime
# dependency surface (the [project] stub still ships only the -core redirect).
[project.optional-dependencies]
# Test/dev dependencies required for `pytest tests/` to collect and run.
# fastapi: tests/test_server.py, tests/cloud_board/test_api_auth.py,
# services/cloud-board/api/* (imported by the cloud_board tests).
# pynacl: tests/cloud_board/test_api_auth.py (nacl.signing).
# cryptography: tests/test_cmd_sign.py, modules/nexus (imported transitively
# by the cloud_board tests via services/cloud-board/api/main.py).
# aiohttp: modules/nexus.client (same transitive import path as above).
# pyyaml: tests/test_cmd_sign.py and several others (import yaml).
dev = [
"pytest>=9.1.1,<10.0",
"pytest-asyncio>=1.4.0,<2.0",
"pytest-cov>=7.1.0,<8.0",
"mypy>=2.3.0,<3.0",
"ruff>=0.16.1,<1.0",
"import-linter>=2.0,<3.0",
"pyyaml>=6.0.3,<7.0",
"typer>=0.9.0,<1.0",
"rich>=15.0.0,<16.0",
"numpy>=1.20.0,<3.0",
"httpx>=0.28.1,<1.0",
"fastapi>=0.141.1,<1.0",
"uvicorn>=0.52.1,<1.0",
"anyio>=4.12.1,<5.0",
"aiohttp>=3.13.4,<4.0",
"structlog>=26.1.0,<27.0",
"redis>=4.0.0,<8.0",
"cryptography>=50.0.0,<51.0",
"pynacl>=1.6.2,<2.0",
"eval_type_backport>=0.2.0; python_version < '3.10'",
"tzdata>=2024.1,<2027.0",
]
# Optional local backend for the (default-off) embedding evidence signal in
# `agent_os.prompt_injection_embedding`. Never required: the module is inert
# unless explicitly enabled, and an embedder can be injected instead.
embedding = [
"fastembed>=0.3.0,<1.0",
]
[project.urls]
Homepage = "https://github.com/microsoft/agent-governance-toolkit"
"Migration Guide" = "https://github.com/microsoft/agent-governance-toolkit/blob/main/docs/package-consolidation/MIGRATION.md"
# Dep-only deprecation stub: the published wheel ships NO source, it only
# redirects to agent-governance-toolkit-core (see [project].dependencies). The
# `agent_os` top-level package is owned solely by -core, which force-includes
# ../agent-os/src/agent_os. Shipping it here too would put the same top-level
# import path in two distributions and cause an order/version-dependent
# "Frankenstein" install. bypass-selection tells hatchling to build a wheel with
# no package of its own. The src/ tree stays in-repo for CI (which imports it via
# the editable -core install) and as the source of truth force-included by -core.
[tool.hatch.build.targets.wheel]
bypass-selection = true
# ============================================================================
# Ruff - Fast Python Linter & Formatter
#
# The published wheel is a dep-only deprecation stub (see [project] above), but
# the agent_os source tree under src/ is still linted and tested in CI. These
# dev-tooling sections were dropped during the package consolidation in #2794;
# without per-file-ignores, ruff reports E402/F401 on previously-clean files
# such as agent_os/integrations/__init__.py. Restoring them keeps CI green.
# ============================================================================
[tool.ruff]
target-version = "py311"
line-length = 100
src = ["src", "modules"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"src/agent_os/integrations/*.py" = ["E402"]
[tool.ruff.lint.isort]
known-first-party = ["agent_os"]
# ============================================================================
# Pytest
# ============================================================================
[tool.pytest.ini_options]
testpaths = ["tests", "modules/*/tests"]
asyncio_mode = "auto"
addopts = "-v --tb=short"
markers = [
"benchmark: performance benchmark tests",
"slow: long-running tests (skip with -m 'not slow')",
"integration: end-to-end integration tests",
]